Package org.forgerock.api.models
Class Parameter
- java.lang.Object
-
- org.forgerock.api.models.Parameter
-
public final class Parameter extends Object
Class that represents the Parameter type in API descriptor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Parameter.Builder
Builder to construct Parameter object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static Parameter
fromAnnotation(Class<?> type, Parameter parameter)
Builds a Parameter object from the data in the annotation.String
getDefaultValue()
Getter of the parameter's default value.LocalizableString
getDescription()
Getter of the parameter description.String[]
getEnumTitles()
Getter of enum-titles.String[]
getEnumValues()
Getter of required enum-values.String
getName()
Getter of the name of the parameter.ParameterSource
getSource()
Getter of the parameter source.String
getType()
Getter of the parameter type.int
hashCode()
Boolean
isRequired()
Getter of the required property.static Parameter.Builder
parameter()
New parameter builder.
-
-
-
Method Detail
-
getName
public String getName()
Getter of the name of the parameter.- Returns:
- Parameter name
-
getType
public String getType()
Getter of the parameter type.- Returns:
- Parameter type
-
getDefaultValue
public String getDefaultValue()
Getter of the parameter's default value.- Returns:
- Parameter default value
-
getDescription
public LocalizableString getDescription()
Getter of the parameter description.- Returns:
- Parameter description
-
getSource
public ParameterSource getSource()
Getter of the parameter source.- Returns:
- Parameter source enum
-
isRequired
public Boolean isRequired()
Getter of the required property.- Returns:
- Required
-
getEnumValues
public String[] getEnumValues()
Getter of required enum-values.- Returns:
- Required enum-values or
null
-
getEnumTitles
public String[] getEnumTitles()
Getter of enum-titles.- Returns:
- Enum-titles or
null
-
parameter
public static Parameter.Builder parameter()
New parameter builder.- Returns:
- Builder
-
fromAnnotation
public static Parameter fromAnnotation(Class<?> type, Parameter parameter)
Builds a Parameter object from the data in the annotation.- Parameters:
type
- The type to resolveLocalizableString
s from.parameter
- The annotation that holds the data- Returns:
- Parameter instance
-
-