org.basex.core.cmd
Class Password

java.lang.Object
  extended by org.basex.core.Proc
      extended by org.basex.core.Command
          extended by org.basex.core.cmd.Password

public final class Password
extends Command

Evaluates the 'password' command and alters the user's password.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.core.Command
args, context, in, mprop, out, perf, prop
 
Fields inherited from class org.basex.core.Proc
listen, updating
 
Constructor Summary
Password(java.lang.String pw)
          Default constructor.
 
Method Summary
 void databases(LockResult lr)
          Adds the names of the databases that may be touched by the process.
protected static boolean isMD5(java.lang.String md5)
          Checks if the specified string is a valid MD5 hash value.
protected  boolean run()
          Executes the command and serializes the result (internal call).
protected  boolean run(int off, boolean opt)
          Runs the command for all users and databases.
protected  boolean run(java.lang.String user, java.lang.String db)
          Runs the command for the specified user and database.
 
Methods inherited from class org.basex.core.Command
build, close, databases, error, execute, execute, getOption, getOption, info, info, newData, result, run, run, setInput, setInput, stoppable, supportsProg, toString, updated, updating
 
Methods inherited from class org.basex.core.Proc
abort, checkStop, det, detail, listen, proc, prog, progress, registered, registered, startTimeout, stop, stopTimeout, tit, title
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Password

public Password(java.lang.String pw)
Default constructor.

Parameters:
pw - password
Method Detail

run

protected boolean run()
Description copied from class: Command
Executes the command and serializes the result (internal call).

Specified by:
run in class Command
Returns:
success of operation

run

protected boolean run(int off,
                      boolean opt)
Runs the command for all users and databases.

Parameters:
off - offset for users and optional databases (off + 1)
opt - indicates if user/database argument is optional
Returns:
success flag

run

protected boolean run(java.lang.String user,
                      java.lang.String db)
Runs the command for the specified user and database.

Parameters:
user - user to be modified
db - database to be modified
Returns:
success flag

isMD5

protected static boolean isMD5(java.lang.String md5)
Checks if the specified string is a valid MD5 hash value.

Parameters:
md5 - string to be checked
Returns:
result of check

databases

public void databases(LockResult lr)
Description copied from class: Proc
Adds the names of the databases that may be touched by the process.

Overrides:
databases in class Proc
Parameters:
lr - Container for lock result to pass around