Package org.forgerock.opendj.setup.model
Class Profile.StringParameter
- java.lang.Object
-
- org.forgerock.opendj.setup.model.Profile.Parameter<Profile.StringParameter,CharSequence>
-
- org.forgerock.opendj.setup.model.Profile.StringParameter
-
- Enclosing class:
- Profile
public final class Profile.StringParameter extends Profile.Parameter<Profile.StringParameter,CharSequence>
Represents a parameter whose value is a string.Note: Usage of
CharSequence
instead of string is a hack to avoid the following compilation error: Methods defaultValue(T) from Profile.Parameter and defaultValue(String) from Parameter are inherited with the same signature.
-
-
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.ParameterVisitor
to thisProfile.Parameter
.CharSequence
parseStringValue(String strValue)
Parses provided string value into this parameter type and returns the typed value.Profile.StringParameter
usage(String usage)
Sets this parameter usage.-
Methods inherited from class org.forgerock.opendj.setup.model.Profile.Parameter
advanced, defaultValue, defaultValue, defaultValueCanBeDerivedAtSetup, defaultValueFromSetupTool, description, descriptionIfNoValueSet, equals, expressionAllowed, 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
-
usage
public Profile.StringParameter usage(String usage)
Sets this parameter usage.- Parameters:
usage
- The parameter usage, used when parameter help and value validation error message is displayed- Returns:
- This
string profile parameter
-
parseStringValue
public CharSequence parseStringValue(String strValue)
Description copied from class:Profile.Parameter
Parses provided string value into this parameter type and returns the typed value.- Specified by:
parseStringValue
in classProfile.Parameter<Profile.StringParameter,CharSequence>
- Parameters:
strValue
- A string representing the parameter value to be parsed- Returns:
- The typed value associated to provided string
-
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.Parameter
Applies aProfile.ParameterVisitor
to thisProfile.Parameter
.- Specified by:
accept
in classProfile.Parameter<Profile.StringParameter,CharSequence>
- Type Parameters:
R
- The return type of the visitor's methodsP
- The type of the additional parameter to this visitor's methods. UseVoid
for visitors that do not need an additional parameterE
- The type of the exception thrown by the visitor method if it fails, orNeverThrowsException
if 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
-
-