Package org.opends.server.tools.status
Class StatusCliArgumentParser
- java.lang.Object
-
- com.forgerock.opendj.cli.ArgumentParser
-
- com.forgerock.opendj.cli.SubCommandArgumentParser
-
- org.opends.server.admin.client.cli.SecureConnectionCliParser
-
- org.opends.server.tools.status.StatusCliArgumentParser
-
- All Implemented Interfaces:
ToolRefDocContainer
public class StatusCliArgumentParser extends SecureConnectionCliParser
The class that is used to parse the arguments provided in the status command line.
-
-
Field Summary
-
Fields inherited from class org.opends.server.admin.client.cli.SecureConnectionCliParser
noPropertiesFileArg, propertiesFileArg, secureArgsList, verboseArg
-
Fields inherited from class com.forgerock.opendj.cli.ArgumentParser
argumentGroups, DEFAULT_OPENDJ_CONFIG_DIR, DEFAULT_OPENDJ_PROPERTIES_FILE_EXTENSION, DEFAULT_OPENDJ_PROPERTIES_FILE_NAME, ioArgGroup, PROPERTY_SCRIPT_NAME, PROPERTY_SCRIPT_NAME_LEGACY
-
-
Constructor Summary
Constructors Constructor Description StatusCliArgumentParser(String mainClassName)Creates a new instance of this argument parser with no arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultBindDn()Returns the bind DN default value.StringgetExplicitBindDn()Returns the bind DN explicitly provided in the command-line.intgetRefreshPeriod()Returns the refresh period (in seconds) specified in the command-line.voidinitializeGlobalArguments(OutputStream outStream)Initialize Global option.booleanisInteractive()Tells whether the user specified to have an interactive status CLI or not.booleanisScriptFriendly()Tells whether the user specified to have a script-friendly output or not.-
Methods inherited from class org.opends.server.admin.client.cli.SecureConnectionCliParser
createGlobalArguments, getAdministratorUID, getBindDN, getBindPassword, getConnectTimeout, getHostName, getPort, getTrustManager, initializeGlobalArguments, initializeGlobalArguments, isVerbose, validateGlobalOptions, validateGlobalOptions
-
Methods inherited from class com.forgerock.opendj.cli.SubCommandArgumentParser
addGlobalArgument, addGlobalArgument, addLdapConnectionArgument, getGlobalArgumentForLongID, getGlobalArgumentForShortID, getSubCommand, getSubCommand, getSubCommandUsage, getUsage, hasGlobalArgument, hasSubCommand, parseArguments, replaceArgument, setUsageArgument, setUsageGroupArgument, setUsageHandler
-
Methods inherited from class com.forgerock.opendj.cli.ArgumentParser
addArgument, addArgument, addDefaultArgument, displayMessageAndUsageReference, getArgumentForLongID, getArgumentList, getBindPassword, getDocSubcommandsDescriptionSupplement, getDocToolDescriptionSupplement, getHelpUsageReference, getOptionsRefSect1, getShortToolDescription, getTrailingArguments, isUsageArgumentPresent, isVersionArgumentPresent, parseArguments, parseArguments, setDocSubcommandsDescriptionSupplement, setDocToolDescriptionSupplement, setFilePropertiesArgument, setNoPropertiesFileArgument, setShortToolDescription, setUsageArgument, setUsageOrVersionDisplayed, setVersionHandler, usageOrVersionDisplayed
-
-
-
-
Constructor Detail
-
StatusCliArgumentParser
public StatusCliArgumentParser(String mainClassName)
Creates a new instance of this argument parser with no arguments.- Parameters:
mainClassName- The fully-qualified name of the Java class that should be invoked to launch the program with which this argument parser is associated.
-
-
Method Detail
-
initializeGlobalArguments
public void initializeGlobalArguments(OutputStream outStream) throws ArgumentException
Initialize Global option.- Parameters:
outStream- The output stream used for the usage.- Throws:
ArgumentException- If there is a problem with any of the parameters used to create this argument.
-
isInteractive
public boolean isInteractive()
Tells whether the user specified to have an interactive status CLI or not. This method must be called after calling parseArguments.- Returns:
trueif the user specified to have an interactive status CLI andfalseotherwise.
-
isScriptFriendly
public boolean isScriptFriendly()
Tells whether the user specified to have a script-friendly output or not. This method must be called after calling parseArguments.- Returns:
trueif the user specified to have a script-friendly output andfalseotherwise.
-
getRefreshPeriod
public int getRefreshPeriod()
Returns the refresh period (in seconds) specified in the command-line. If no refresh period was specified, returns -1. The code assumes that the attributes have been successfully parsed.- Returns:
- the specified refresh period in the command-line.
-
getExplicitBindDn
public String getExplicitBindDn()
Returns the bind DN explicitly provided in the command-line.- Returns:
- the bind DN explicitly provided in the command-line.
Returns
nullif no bind DN was explicitly provided.
-
getDefaultBindDn
public String getDefaultBindDn()
Returns the bind DN default value.- Returns:
- the bind DN default value.
-
-