org.opends.server.tools
Class InstallDSArgumentParser

java.lang.Object
  extended by org.opends.server.util.args.ArgumentParser
      extended by org.opends.server.tools.InstallDSArgumentParser

public class InstallDSArgumentParser
extends ArgumentParser

Class used to parse the arguments of the setup command-line and to check that there are not conflicting arguments (nor missing arguments in no prompt mode). Note that this class does not perform checks involving network (like if a given port is free) nor the validity of the certificate information provided.


Field Summary
 
Fields inherited from class org.opends.server.util.args.ArgumentParser
argumentGroups, defaultArgGroup, generalArgGroup, ioArgGroup, ldapArgGroup
 
Constructor Summary
InstallDSArgumentParser(java.lang.String mainClassName)
          The default constructor for this class.
 
Method Summary
 java.lang.String getDirectoryManagerPassword()
          Returns the directory manager password provided by the user.
 java.lang.String getKeyStorePassword()
          Returns the key store password provided by the user.
 void initializeArguments()
          Initializes the arguments without parsing them.
 boolean isCli()
          Returns whether the command was launched in CLI mode or not.
 void parseArguments(java.lang.String[] args)
          Parses the provided set of arguments and updates the information associated with this parser accordingly.
 
Methods inherited from class org.opends.server.util.args.ArgumentParser
addArgument, addArgument, addDefaultArgument, addGeneralArgument, addInputOutputArgument, addLdapConnectionArgument, allowsTrailingArguments, checkExternalProperties, getArgument, getArgumentForLongID, getArgumentForShortID, getArgumentList, getArgumentsByLongID, getArgumentsByShortID, getMainClassName, getMaxTrailingArguments, getMinTrailingArguments, getRawArguments, getStandardGroup, getToolDescription, getTrailingArguments, getUsage, getUsage, getUsage, getUsageMessage, isUsageArgumentPresent, isVersionArgumentPresent, parseArguments, parseArguments, printUsageGroupHeaders, setDefaultArgumentGroupDescription, setFilePropertiesArgument, setGeneralArgumentGroupDescription, setInputOutputArgumentGroupDescription, setLdapArgumentGroupDescription, setNoPropertiesFileArgument, setUsageArgument, setUsageArgument, usageOrVersionDisplayed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstallDSArgumentParser

public InstallDSArgumentParser(java.lang.String mainClassName)
The default constructor for this class.

Parameters:
mainClassName - the class name of the main class for the command-line that is being used.
Method Detail

initializeArguments

public void initializeArguments()
                         throws ArgumentException
Initializes the arguments without parsing them.

Throws:
ArgumentException - if there was an error creating or adding the arguments. If this occurs is likely to be a bug.

isCli

public boolean isCli()
Returns whether the command was launched in CLI mode or not.

Returns:
true if the command was launched to use CLI mode and false otherwise.

parseArguments

public void parseArguments(java.lang.String[] args)
                    throws ArgumentException
Parses the provided set of arguments and updates the information associated with this parser accordingly.

Overrides:
parseArguments in class ArgumentParser
Parameters:
args - The raw set of arguments to parse.
Throws:
ArgumentException - If a problem was encountered while parsing the provided arguments.

getDirectoryManagerPassword

public java.lang.String getDirectoryManagerPassword()
Returns the directory manager password provided by the user. This method should be called after a call to parseArguments.

Returns:
the directory manager password provided by the user.

getKeyStorePassword

public java.lang.String getKeyStorePassword()
Returns the key store password provided by the user. This method should be called after a call to parseArguments.

Returns:
the key store password provided by the user.