Class UserExists


public final class UserExists extends StandardFunc
Function implementation.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • UserExists

      public UserExists()
  • Method Details

    • item

      public Item item(QueryContext qc, InputInfo ii) throws QueryException
      Description copied from class: Expr
      Evaluates the expression and returns the resulting item, or Empty.VALUE if the expression yields an empty sequence. If this method is not implemented, Expr.value(QueryContext) must be implemented instead.
      Overrides:
      item in class ParseExpr
      Parameters:
      qc - query context
      ii - input info (only required by Seq instances, which have no input info)
      Returns:
      item or Empty.VALUE
      Throws:
      QueryException - query exception
    • toPatterns

      protected final StringList toPatterns(int i, QueryContext qc) throws QueryException
      Checks if the specified expression contains valid database patterns.
      Parameters:
      i - expression index
      qc - query context
      Returns:
      patterns
      Throws:
      QueryException - query exception
    • toName

      protected final String toName(int i, QueryContext qc) throws QueryException
      Checks if the specified expression is a valid user name.
      Parameters:
      i - expression index
      qc - query context
      Returns:
      name
      Throws:
      QueryException - query exception
    • toUser

      protected final User toUser(int i, QueryContext qc) throws QueryException
      Checks if the specified expression references an existing user.
      Parameters:
      i - expression index
      qc - query context
      Returns:
      user
      Throws:
      QueryException - query exception
    • toPerms

      protected final ArrayList<Perm> toPerms(int i, QueryContext qc) throws QueryException
      Checks if the specified expression contains valid permissions.
      Parameters:
      i - expression index
      qc - query context
      Returns:
      permissions
      Throws:
      QueryException - query exception
    • toString

      protected final String toString(int i, QueryContext qc) throws QueryException
      Checks if the specified expression is a string.
      Parameters:
      i - expression index
      qc - query context
      Returns:
      name of database
      Throws:
      QueryException - query exception
    • toSafeName

      protected final String toSafeName(int i, QueryContext qc) throws QueryException
      Checks if the specified user is currently logged in.
      Parameters:
      i - expression index
      qc - query context
      Returns:
      name
      Throws:
      QueryException - query exception
    • toInactiveUser

      protected final User toInactiveUser(int i, QueryContext qc) throws QueryException
      Checks if the specified user is currently not logged in.
      Parameters:
      i - expression index
      qc - query context
      Returns:
      user
      Throws:
      QueryException - query exception
    • accept

      public final boolean accept(ASTVisitor visitor)
      Description copied from class: Expr
      Traverses this expression, notifying the visitor of declared and used variables, and checking the tree for other recursive properties.
      Overrides:
      accept in class Arr
      Parameters:
      visitor - visitor
      Returns:
      if the walk should be continued