|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.tools.dsconfig.ArgumentExceptionFactory
public final class ArgumentExceptionFactory
A utility class for converting various admin exception types into argument exceptions.
Method Summary | |
---|---|
static CLIException |
adaptIllegalManagedObjectNameException(IllegalManagedObjectNameException e,
AbstractManagedObjectDefinition<?,?> d)
Creates a CLI exception from an illegal managed object name exception. |
static ArgumentException |
adaptPropertyException(PropertyException e,
AbstractManagedObjectDefinition<?,?> d)
Creates an argument exception from a property exception. |
static void |
displayManagedObjectDecodingException(ConsoleApplication app,
ManagedObjectDecodingException e)
Displays a table listing reasons why a managed object could not be decoded successfully. |
static void |
displayMissingMandatoryPropertyException(ConsoleApplication app,
MissingMandatoryPropertiesException e)
Displays a table listing missing mandatory properties. |
static void |
displayOperationRejectedException(ConsoleApplication app,
OperationRejectedException e)
Displays a table listing the reasons why an operation was rejected. |
static ArgumentException |
incompatiblePropertyModification(java.lang.String arg)
Creates an argument exception which should be used when a property modification argument is incompatible with a previous modification argument. |
static ArgumentException |
missingBindPassword(java.lang.String bindDN)
Creates an argument exception which should be used when the client has not specified a bind password. |
static ArgumentException |
missingMandatoryNonInteractiveArgument(Argument arg)
Creates an argument exception which should be used when an argument, which is mandatory when the application is non-interactive, has not been specified. |
static ArgumentException |
missingNameInPropertyArgument(java.lang.String arg)
Creates an argument exception which should be used when a property value argument is invalid because it does not a property name. |
static ArgumentException |
missingNameInPropertyModification(java.lang.String arg)
Creates an argument exception which should be used when a property modification argument is invalid because it does not a property name. |
static ArgumentException |
missingSeparatorInPropertyArgument(java.lang.String arg)
Creates an argument exception which should be used when a property value argument is invalid because it does not contain a separator between the property name and its value. |
static ArgumentException |
missingSeparatorInPropertyModification(java.lang.String arg)
Creates an argument exception which should be used when a property modification argument is invalid because it does not contain a separator between the property name and its value. |
static ArgumentException |
missingValueInPropertyArgument(java.lang.String arg)
Creates an argument exception which should be used when a property value argument is invalid because it does not a property value. |
static ArgumentException |
missingValueInPropertyModification(java.lang.String arg)
Creates an argument exception which should be used when a property modification argument is invalid because it does not a property value. |
static ArgumentException |
unableToReadBindPasswordInteractively()
Creates an argument exception which should be used when the bind password could not be read from the standard input because the application is non-interactive. |
static ArgumentException |
unableToReadConnectionParameters(java.lang.Exception cause)
Creates an argument exception which should be used when the connection parameters could not be read from the standard input. |
static ArgumentException |
unableToResetMandatoryProperty(AbstractManagedObjectDefinition<?,?> d,
java.lang.String name,
java.lang.String setOption)
Creates an argument exception which should be used when an attempt is made to reset a mandatory property that does not have any default values. |
static ArgumentException |
unableToSetNamingProperty(AbstractManagedObjectDefinition<?,?> d,
PropertyDefinition<?> pd)
Creates an argument exception which should be used when an attempt is made to set the naming property for a managed object during creation. |
static ArgumentException |
unknownCategory(java.lang.String categoryName)
Creates an argument exception which should be used when a component category argument is not recognized. |
static ArgumentException |
unknownProperty(AbstractManagedObjectDefinition<?,?> d,
java.lang.String name)
Creates an argument exception which should be used when a property name is not recognized. |
static ArgumentException |
unknownProperty(java.lang.String name)
Creates an argument exception which should be used when a property name is not recognized. |
static ArgumentException |
unknownSubType(RelationDefinition<?,?> r,
java.lang.String typeName,
java.lang.String typeUsage)
Creates an argument exception which should be used when a sub-type argument in a create-xxx sub-command is not recognized. |
static ArgumentException |
unknownTypeForCategory(java.lang.String typeName,
java.lang.String categoryName)
Creates an argument exception which should be used when a managed object type argument is not associated with a category. |
static CLIException |
wrongManagedObjectType(RelationDefinition<?,?> r,
ManagedObjectDefinition<?,?> d,
java.lang.String subcommandName)
Creates a CLI exception which should be used when a managed object is retrieved but does not have the correct type appropriate for the associated sub-command. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CLIException adaptIllegalManagedObjectNameException(IllegalManagedObjectNameException e, AbstractManagedObjectDefinition<?,?> d)
e
- The illegal managed object name exception.d
- The managed object definition.
public static ArgumentException adaptPropertyException(PropertyException e, AbstractManagedObjectDefinition<?,?> d)
e
- The property exception.d
- The managed object definition.
public static void displayManagedObjectDecodingException(ConsoleApplication app, ManagedObjectDecodingException e)
app
- The console application.e
- The managed object decoding exception.public static void displayMissingMandatoryPropertyException(ConsoleApplication app, MissingMandatoryPropertiesException e)
app
- The console application.e
- The missing mandatory property exception.public static void displayOperationRejectedException(ConsoleApplication app, OperationRejectedException e)
app
- The console application.e
- The operation rejected exception.public static ArgumentException incompatiblePropertyModification(java.lang.String arg)
arg
- The incompatible argument.
public static ArgumentException missingBindPassword(java.lang.String bindDN)
bindDN
- The name of the user requiring a password.
public static ArgumentException missingMandatoryNonInteractiveArgument(Argument arg)
arg
- The missing argument.
public static ArgumentException missingNameInPropertyArgument(java.lang.String arg)
arg
- The argument having the missing property name.
public static ArgumentException missingNameInPropertyModification(java.lang.String arg)
arg
- The argument having the missing property name.
public static ArgumentException missingSeparatorInPropertyArgument(java.lang.String arg)
arg
- The argument having a missing separator.
public static ArgumentException missingSeparatorInPropertyModification(java.lang.String arg)
arg
- The argument having a missing separator.
public static ArgumentException missingValueInPropertyArgument(java.lang.String arg)
arg
- The argument having the missing property value.
public static ArgumentException missingValueInPropertyModification(java.lang.String arg)
arg
- The argument having the missing property value.
public static ArgumentException unableToReadConnectionParameters(java.lang.Exception cause)
cause
- The reason why the connection parameters could not be
read.
public static ArgumentException unableToReadBindPasswordInteractively()
public static ArgumentException unableToResetMandatoryProperty(AbstractManagedObjectDefinition<?,?> d, java.lang.String name, java.lang.String setOption)
d
- The managed object definition.name
- The name of the mandatory property.setOption
- The name of the option which should be used to set the
property's values.
public static ArgumentException unableToSetNamingProperty(AbstractManagedObjectDefinition<?,?> d, PropertyDefinition<?> pd)
d
- The managed object definition.pd
- The naming property definition.
public static ArgumentException unknownCategory(java.lang.String categoryName)
categoryName
- The unrecognized component category.
public static ArgumentException unknownProperty(AbstractManagedObjectDefinition<?,?> d, java.lang.String name)
d
- The managed object definition.name
- The unrecognized property name.
public static ArgumentException unknownProperty(java.lang.String name)
name
- The unrecognized property name.
public static ArgumentException unknownSubType(RelationDefinition<?,?> r, java.lang.String typeName, java.lang.String typeUsage)
r
- The relation definition.typeName
- The unrecognized property sub-type.typeUsage
- A usage string describing the allowed sub-types.
public static ArgumentException unknownTypeForCategory(java.lang.String typeName, java.lang.String categoryName)
categoryName
- The component category.typeName
- The unrecognized component type.
public static CLIException wrongManagedObjectType(RelationDefinition<?,?> r, ManagedObjectDefinition<?,?> d, java.lang.String subcommandName)
r
- The relation definition.d
- The definition of the managed object that was retrieved.subcommandName
- the sub-command name.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |