Package org.forgerock.opendj.setup.model
Class Profile.EnumParameter<T3>
- java.lang.Object
-
- org.forgerock.opendj.setup.model.Profile.Parameter<Profile.EnumParameter<T3>,T3>
-
- org.forgerock.opendj.setup.model.Profile.EnumParameter<T3>
-
- Type Parameters:
T3- The parameter concrete class
- Enclosing class:
- Profile
public final class Profile.EnumParameter<T3> extends Profile.Parameter<Profile.EnumParameter<T3>,T3>
Represents a parameter with an enumeration of allowed constants.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,P,E extends Exception>
Raccept(Profile.ParameterVisitor<R,P,E> visitor, P p)Applies aProfile.ParameterVisitorto thisProfile.Parameter.Profile.EnumParameter<T3>expressionAllowed()Specifies that common configuration expressions can be specified for thisprofile parameter.Collection<Profile.EnumConstant<T3>>getEnumConstants()Returns this parameter allowed values.T3parseStringValue(String strValue)Parses provided string value into this parameter type and returns the typed value.-
Methods inherited from class org.forgerock.opendj.setup.model.Profile.Parameter
advanced, defaultValue, defaultValue, defaultValueCanBeDerivedAtSetup, defaultValueFromSetupTool, description, descriptionIfNoValueSet, equals, getAddAnotherValueMsg, getDefaultValue, getDescriptionIfNoValueSetMsg, getDescriptionMsg, getHelpMsg, getOptionalPromptMsg, getPromptForValueMsg, getSyntax, getSyntaxWithoutExpression, getValue, getValueOrExpression, getVariableName, hashCode, help, isAdvanced, isMultivalued, isOptional, multivalued, multivalued, optional, optional, prompt, property, toString
-
-
-
-
Method Detail
-
getEnumConstants
public Collection<Profile.EnumConstant<T3>> getEnumConstants()
Returns this parameter allowed values.- Returns:
- Allowed values for this
enum profile parameter
-
parseStringValue
public T3 parseStringValue(String strValue) throws com.forgerock.opendj.cli.ArgumentException
Description copied from class:Profile.ParameterParses provided string value into this parameter type and returns the typed value.- Specified by:
parseStringValuein classProfile.Parameter<Profile.EnumParameter<T3>,T3>- Parameters:
strValue- A string representing the parameter value to be parsed- Returns:
- The typed value associated to provided string
- Throws:
com.forgerock.opendj.cli.ArgumentException- If an error occurred while parsing provided string value
-
expressionAllowed
public Profile.EnumParameter<T3> expressionAllowed()
Description copied from class:Profile.ParameterSpecifies that common configuration expressions can be specified for thisprofile parameter.- Overrides:
expressionAllowedin classProfile.Parameter<Profile.EnumParameter<T3>,T3>- Returns:
- This
profile parameter
-
accept
public <R,P,E extends Exception> R accept(Profile.ParameterVisitor<R,P,E> visitor, P p) throws E extends Exception
Description copied from class:Profile.ParameterApplies aProfile.ParameterVisitorto thisProfile.Parameter.- Specified by:
acceptin classProfile.Parameter<Profile.EnumParameter<T3>,T3>- Type Parameters:
R- The return type of the visitor's methodsP- The type of the additional parameter to this visitor's methods. UseVoidfor visitors that do not need an additional parameterE- The type of the exception thrown by the visitor method if it fails, orNeverThrowsExceptionif the visitor cannot fail- Parameters:
visitor- The parameter visitorp- Optional additional visitor parameter- Returns:
- A result as specified by the visitor
- Throws:
E- If the visitor failedE extends Exception
-
-