public final class DocBookGeneratorSubCommandHandler extends Object
dsconfig
command.Modifier and Type | Method and Description |
---|---|
int |
compareTo(org.forgerock.opendj.config.dsconfig.SubCommandHandler o) |
static DocBookGeneratorSubCommandHandler |
create(com.forgerock.opendj.cli.SubCommandArgumentParser parser)
Creates a new
generate-docbook sub-command. |
boolean |
equals(Object obj) |
com.forgerock.opendj.cli.CommandBuilder |
getCommandBuilder()
Gets the command builder associated with this handler.
|
protected com.forgerock.opendj.cli.MenuResult<ManagedObject<?>> |
getManagedObject(DsConfig tool,
ManagementContext context,
ManagedObjectPath<?,?> path,
List<String> args)
Get the managed object referenced by the provided managed object path.
|
com.forgerock.opendj.cli.SubCommand |
getSubCommand()
Gets the sub-command associated with this handler.
|
Set<Tag> |
getTags()
Gets the tags associated with this sub-command handler.
|
protected DurationUnit |
getTimeUnit()
Gets the optional time unit that the user requested.
|
int |
hashCode() |
com.forgerock.opendj.cli.MenuResult<Integer> |
run(DsConfig app,
ManagementContextFactory factory)
Run this sub-command handler.
|
String |
toString()
Get the string representation of this sub-command handler.
|
public com.forgerock.opendj.cli.SubCommand getSubCommand()
public com.forgerock.opendj.cli.MenuResult<Integer> run(DsConfig app, ManagementContextFactory factory) throws com.forgerock.opendj.cli.ArgumentException, com.forgerock.opendj.cli.ClientException
app
- The tool.factory
- The LDAP management context factory context factory.MenuResult.success()
containing zero if the sub-command completed successfully or
non-zero if it did not, or MenuResult.quit()
, or MenuResult.cancel()
, if the sub-command
was run interactively and the user chose to quit or cancel.com.forgerock.opendj.cli.ArgumentException
- If an argument required by the sub-command could not be parsed successfully.com.forgerock.opendj.cli.ClientException
- If the management context could not be created.public static DocBookGeneratorSubCommandHandler create(com.forgerock.opendj.cli.SubCommandArgumentParser parser)
generate-docbook
sub-command.parser
- The sub-command argument parser.public final int compareTo(org.forgerock.opendj.config.dsconfig.SubCommandHandler o)
compareTo
in interface Comparable<org.forgerock.opendj.config.dsconfig.SubCommandHandler>
public final com.forgerock.opendj.cli.CommandBuilder getCommandBuilder()
run()
method.public final Set<Tag> getTags()
public final String toString()
The string representation is simply the sub-command's name.
protected final com.forgerock.opendj.cli.MenuResult<ManagedObject<?>> getManagedObject(DsConfig tool, ManagementContext context, ManagedObjectPath<?,?> path, List<String> args) throws com.forgerock.opendj.cli.ClientException, DefinitionDecodingException, ManagedObjectDecodingException, ConcurrentModificationException, ManagedObjectNotFoundException, LdapException
tool
- The tool.context
- The management context.path
- The managed object path.args
- The list of managed object names required by the path.MenuResult.success()
containing the managed object referenced by the provided managed
object path, or MenuResult.quit()
, or MenuResult.cancel()
, if the sub-command was run
interactively and the user chose to quit or cancel.DefinitionDecodingException
- If the managed object was found but its type could not be determined.ManagedObjectDecodingException
- If the managed object was found but one or more of its properties could not be decoded.ManagedObjectNotFoundException
- If the requested managed object could not be found on the server.ConcurrentModificationException
- If this managed object has been removed from the server by another client.AuthorizationException
- If the server refuses to retrieve the managed object because the client does not have the correct
privileges.com.forgerock.opendj.cli.ClientException
- If one of the naming arguments referenced a managed object of the wrong type.LdapException
- If any other error occurs.protected final DurationUnit getTimeUnit() throws com.forgerock.opendj.cli.ArgumentException
null
if no time unit was specified.com.forgerock.opendj.cli.ArgumentException
- If the user specified an invalid time unit.Copyright 2010-2018 ForgeRock AS.