Class LocalDomainCommand
- java.lang.Object
-
- com.sun.enterprise.admin.cli.CLICommand
-
- com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
-
- com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
-
- All Implemented Interfaces:
org.glassfish.hk2.api.PostConstruct
- Direct Known Subclasses:
AddKeypairCommand,BackupCommands,ChangeAdminPasswordCommand,ChangeMasterPasswordCommandDAS,DeleteDomainCommand,GenerateEncryptionKey,ListDomainsCommand,StartDomainCommand,StopDomainCommand,VerifyDomainXmlCommand
public abstract class LocalDomainCommand extends LocalServerCommand
A class that's supposed to capture all the behavior common to operation on a "local" domain. It's supposed to act as the abstract base class that provides more functionality to the commands that operate on a local domain.- Author:
- केदार (km@dev.java.net), Byron Nevins (bnevins@dev.java.net)
-
-
Field Summary
Fields Modifier and Type Field Description protected StringdomainDirParam-
Fields inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
DEFAULT_MASTER_PASSWORD
-
Fields inherited from class com.sun.enterprise.admin.cli.CLICommand
argv, ASADMIN, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, lineReader, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, terminal, WARNING
-
-
Constructor Summary
Constructors Constructor Description LocalDomainCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetDomainName()protected FilegetDomainRootDir()protected FilegetDomainsDir()protected voidinitDomain()protected booleanisThisDAS(File ourDir)protected voidprepare()The prepare method must ensure that the commandModel field is set.protected voidsetDomainName(String name)We need this so that @Param values for domainname can be remembered later when the ServerDirs object is made.protected voidvalidate()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.-
Methods inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
checkAdditionalTrustAndKeyStores, checkForSpecialFiles, dataGridEncryptionEnabled, getAdminAddress, getAdminAddress, getDomainXml, getInstallRootPath, getMasterPassword, getMasterPasswordFile, getPrevPid, getServerDirs, getServerPid, getUptime, isLocal, isRemote, isRestartable, isRunning, isRunning, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestart, waitForRestart
-
Methods inherited from class com.sun.enterprise.admin.cli.CLICommand
buildLineReader, buildTerminal, checkHelp, closeTerminal, execute, execute, executeCommand, expandManPage, getBooleanOption, getBriefCommandUsage, getCommand, getCommand, getCommandScope, getCommandUsage, getManPage, getName, getOperandModel, getOption, getOptions, getPassword, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, newLineReaderBuilder, ok, parse, postConstruct, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, setCommandScope, toString, usageOptions
-
-
-
-
Field Detail
-
domainDirParam
protected String domainDirParam
-
-
Method Detail
-
prepare
protected void prepare() throws CommandException, CommandValidationExceptionDescription copied from class:CLICommandThe prepare method must ensure that the commandModel field is set.- Overrides:
preparein classCLICommand- Throws:
CommandExceptionCommandValidationException
-
validate
protected void validate() throws CommandException, CommandValidationExceptionDescription copied from class:CLICommandThe 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.- Overrides:
validatein classCLICommand- Throws:
CommandException- if execution of the command failsCommandValidationException- if there's something wrong with the options or arguments
-
getDomainsDir
protected final File getDomainsDir()
-
getDomainRootDir
protected final File getDomainRootDir()
-
getDomainName
protected final String getDomainName()
-
setDomainName
protected final void setDomainName(String name)
We need this so that @Param values for domainname can be remembered later when the ServerDirs object is made.- Parameters:
name- the user-specified domain name.
-
initDomain
protected void initDomain() throws CommandException- Throws:
CommandException
-
isThisDAS
protected boolean isThisDAS(File ourDir)
-
-