org.opends.server.admin.client.cli
Class DsFrameworkCliServerGroup

java.lang.Object
  extended by org.opends.server.admin.client.cli.DsFrameworkCliServerGroup
All Implemented Interfaces:
DsFrameworkCliSubCommandGroup

public class DsFrameworkCliServerGroup
extends java.lang.Object
implements DsFrameworkCliSubCommandGroup

This class is handling server group CLI.


Field Summary
 SubCommand createGroupSubCmd
          The 'create-group' subcommand.
 
Constructor Summary
DsFrameworkCliServerGroup()
           
 
Method Summary
 java.lang.String getAttributeDisplayName(ADSContext.ServerGroupProperty prop)
          Get the display attribute name for a given attribute.
 java.lang.String getGroupName()
          Indicates subcommand group name.
 java.util.Set<SubCommand> getSubCommands()
          Get the subcommands list.
 void initializeCliGroup(DsFrameworkCliParser argParser, BooleanArgument verboseArg)
          Initialize subcommand related to server group management.
 boolean isHidden()
          Indicates whether this subcommand group should be hidden from the usage information.
 boolean isSubCommand(SubCommand subCmd)
          Indicates if the provided suncommand is part of this group.
 DsFrameworkCliReturnCode performSubCommand(SubCommand subCmd, java.io.OutputStream outStream, java.io.OutputStream errStream)
          Handle the subcommand.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

createGroupSubCmd

public SubCommand createGroupSubCmd
The 'create-group' subcommand.

Constructor Detail

DsFrameworkCliServerGroup

public DsFrameworkCliServerGroup()
Method Detail

getAttributeDisplayName

public java.lang.String getAttributeDisplayName(ADSContext.ServerGroupProperty prop)
Get the display attribute name for a given attribute.

Parameters:
prop - The server property
Returns:
the display attribute name for a given attribute

getSubCommands

public java.util.Set<SubCommand> getSubCommands()
Get the subcommands list.

Specified by:
getSubCommands in interface DsFrameworkCliSubCommandGroup
Returns:
the subcommand list.

isHidden

public boolean isHidden()
Indicates whether this subcommand group should be hidden from the usage information.

Specified by:
isHidden in interface DsFrameworkCliSubCommandGroup
Returns:
true if this subcommand group should be hidden from the usage information, or false if not.

getGroupName

public java.lang.String getGroupName()
Indicates subcommand group name.

Specified by:
getGroupName in interface DsFrameworkCliSubCommandGroup
Returns:
the subcommand group name

initializeCliGroup

public void initializeCliGroup(DsFrameworkCliParser argParser,
                               BooleanArgument verboseArg)
                        throws ArgumentException
Initialize subcommand related to server group management.

Specified by:
initializeCliGroup in interface DsFrameworkCliSubCommandGroup
Parameters:
argParser - The parser in which we should be registered.
verboseArg - The verbose Argument.
Throws:
ArgumentException - If there is a problem with any of the parameters used to create this argument.

isSubCommand

public boolean isSubCommand(SubCommand subCmd)
Indicates if the provided suncommand is part of this group.

Specified by:
isSubCommand in interface DsFrameworkCliSubCommandGroup
Parameters:
subCmd - The actual subcommand with input parameter.
Returns:
True if the provided suncommand is part of this group.

performSubCommand

public DsFrameworkCliReturnCode performSubCommand(SubCommand subCmd,
                                                  java.io.OutputStream outStream,
                                                  java.io.OutputStream errStream)
                                           throws ADSContextException,
                                                  ArgumentException
Handle the subcommand.

Specified by:
performSubCommand in interface DsFrameworkCliSubCommandGroup
Parameters:
subCmd - The actual subcommand with input parameter
outStream - The output stream to use for standard output.
errStream - The output stream to use for standard error.
Returns:
the return code
Throws:
ADSContextException - If there is a problem with when trying to perform the operation.
ArgumentException - If there is a problem with any of the parameters used to execute this subcommand.