com.sun.enterprise.admin.cli.cluster
Class ChangeNodeMasterPasswordCommand

java.lang.Object
  extended by com.sun.enterprise.admin.cli.CLICommand
      extended by com.sun.enterprise.admin.cli.LocalServerCommand
          extended by com.sun.enterprise.admin.cli.cluster.LocalInstanceCommand
              extended by com.sun.enterprise.admin.cli.cluster.ChangeNodeMasterPasswordCommand
All Implemented Interfaces:
org.jvnet.hk2.component.PostConstruct

@Service(name="_change-master-password-node")
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class ChangeNodeMasterPasswordCommand
extends LocalInstanceCommand

The change-master-password command for a node. It takes in a nodeDir and node name

Author:
Bhakti Mehta

Field Summary
protected  java.lang.String node
           
protected  java.lang.String nodeDir
           
protected  boolean savemp
           
 
Fields inherited from class com.sun.enterprise.admin.cli.cluster.LocalInstanceCommand
checkOneAndOnly, domainName, instanceDir, instanceName, isCreateInstanceFilesystem, nodeDirChild, nodeDirRoot
 
Fields inherited from class com.sun.enterprise.admin.cli.CLICommand
argv, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, WARNING
 
Constructor Summary
ChangeNodeMasterPasswordCommand()
           
 
Method Summary
protected  void createMasterPasswordFile()
          Create the master password keystore.
 void encryptKeystore(java.lang.String f)
           
 int execute(java.lang.String... argv)
           
protected  int executeCommand()
           
 
Methods inherited from class com.sun.enterprise.admin.cli.cluster.LocalInstanceCommand
getDasProperties, getInstallRootPath, getInstanceDirs, getMasterPasswordFile, getNodeInstallDir, getProductRootPath, initInstance, isDirectory, mkdirs, setDasDefaults, setServerDirs, validate, validateDasOptions, whackFilesystem
 
Methods inherited from class com.sun.enterprise.admin.cli.LocalServerCommand
checkForSpecialFiles, getAdminAddress, getAdminAddress, getDomainXml, getMasterPassword, getPrevPid, getServerDirs, getUptime, isRestartable, isRunning, isRunning, isRunning, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestart
 
Methods inherited from class com.sun.enterprise.admin.cli.CLICommand
checkHelp, getBooleanOption, getCommand, getManPage, getName, getOperandModel, getOption, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, ok, parse, postConstruct, prepare, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, toString, usageOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nodeDir

protected java.lang.String nodeDir

node

protected java.lang.String node

savemp

protected boolean savemp
Constructor Detail

ChangeNodeMasterPasswordCommand

public ChangeNodeMasterPasswordCommand()
Method Detail

executeCommand

protected int executeCommand()
                      throws CommandException
Specified by:
executeCommand in class CLICommand
Throws:
CommandException

execute

public int execute(java.lang.String... argv)
            throws CommandException
Overrides:
execute in class CLICommand
Throws:
CommandException

createMasterPasswordFile

protected void createMasterPasswordFile()
                                 throws CommandException
Create the master password keystore. This routine can also modify the master password if the keystore already exists

Throws:
CommandException

encryptKeystore

public void encryptKeystore(java.lang.String f)
                     throws CommandException
Throws:
CommandException


Copyright © 2012 GlassFish Community. All Rights Reserved.