@Service(name="_change-master-password-node") @PerLookup public class ChangeNodeMasterPasswordCommand extends LocalInstanceCommand
| Modifier and Type | Field and Description |
|---|---|
protected static String |
NEW_PASSWORD_ALIAS |
protected String |
node |
protected static String |
OLD_PASSWORD_ALIAS |
protected File |
selectedNodeDir |
checkOneAndOnly, domainName, instanceDir, instanceName, isCreateInstanceFilesystem, nodeDir, nodeDirChild, nodeDirRootDEFAULT_MASTER_PASSWORDargv, ASADMIN, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, lineReader, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, terminal, WARNING| Constructor and Description |
|---|
ChangeNodeMasterPasswordCommand() |
| Modifier and Type | Method and Description |
|---|---|
int |
execute(String... argv)
Execute this command with the given arguemnts.
|
protected int |
executeCommand()
Execute the command using the options in options and the
operands in operands.
|
protected String |
findOldPassword()
Find the old password from the property in the password file with the name
OLD_PASSWORD_ALIAS if it exists, or by prompting the user otherwise. |
protected void |
inject()
Inject this instance with the final values of all the command
parameters.
|
protected void |
setNewPassword()
Set the
newPassword field from the property in the password file
with the name OLD_PASSWORD_ALIAS if it exists, or by prompting the
user twice otherwise. |
protected void |
validate()
The validate method can be used by a subclass to validate
that the type and quantity of parameters and operands matches
the requirements for this command.
|
getDasProperties, getInstallRootPath, getInstanceDirs, getInstanceName, getMasterPasswordFile, getNodeInstallDir, getNodeProperties, getProductRootPath, initInstance, isDirectory, mkdirs, setDasDefaults, setInstanceName, setServerDirs, validateDasOptions, whackFilesystemcheckForSpecialFiles, getAdminAddress, getAdminAddress, getDomainXml, getMasterPassword, getPrevPid, getServerDirs, getServerPid, getUptime, isLocal, isRemote, isRestartable, isRunning, isRunning, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestartbuildLineReader, buildTerminal, checkHelp, closeTerminal, execute, expandManPage, getBooleanOption, getBriefCommandUsage, getCommand, getCommand, getCommandScope, getCommandUsage, getManPage, getName, getOperandModel, getOption, getOptions, getPassword, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, ok, parse, postConstruct, prepare, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, setCommandScope, toString, usageOptionsprotected static final String OLD_PASSWORD_ALIAS
protected static final String NEW_PASSWORD_ALIAS
protected String node
protected File selectedNodeDir
protected void inject()
throws CommandException
CLICommandinject in class CLICommandCommandException - if execution of the command failsCommandValidationException - if there's something wrong
with the options or argumentsprotected void validate()
throws CommandException,
CommandValidationException
CLICommandvalidate in class LocalInstanceCommandCommandException - if execution of the command failsCommandValidationException - if there's something wrong
with the options or argumentsprotected int executeCommand()
throws CommandException
CLICommandexecuteCommand in class CLICommandCommandException - if execution of the command failsCommandValidationException - if there's something wrong
with the options or argumentspublic int execute(String... argv) throws CommandException
CLICommandexecute in class CLICommandargv - Arguments to execute command withCommandException - if execution of the command failsCommandValidationException - if there's something wrong
with the options or argumentsprotected String findOldPassword() throws CommandException
OLD_PASSWORD_ALIAS if it exists, or by prompting the user otherwise.CommandException - if the password is nullprotected void setNewPassword()
throws CommandException
newPassword field from the property in the password file
with the name OLD_PASSWORD_ALIAS if it exists, or by prompting the
user twice otherwise.CommandException - if the passwords don't match or are nullCopyright © 2019. All rights reserved.