Annotation Interface Attribute
Indicates that a method describes a configuration attribute of an SMS service.
The annotated method MUST NOT have any parameters. The annotated method MAY have a default implementation, which will be used to determine the default value for the attribute.
The schema created for a particular annotated method is controlled by a TypeAdapter
. The
adapter for a method is chosen as follows:
- If the method has an annotation that implies a
TypeAdapter
, it is used. - Otherwise, the
TypeAdapter
is inferred from the return type of the method.
- See Also:
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionint
Used to determine the position of the attribute when the service configuration is presented to a user. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass<?>
Acom.sun.identity.sm.ChoiceValues
implementation that should be used to compute the choice values for the attribute.boolean
Whether the config attribute should be hidden from the config UI.The key to use in the resource bundle.int
Specify that the attribute value cannot be empty.The name of the attribute.boolean
Specify that the attribute is required to have a value.The resource name of the attribute in the REST endpoints.Class<?>[]
A list ofServiceAttributeValidator
classes that will validate the value of the attribute. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Used to set an attribute as "hidden" so it is not exposed via UI.
-
Field Details
-
HIDDEN
static final int HIDDENUsed to set an attribute as "hidden" so it is not exposed via UI.- See Also:
-
-
Element Details
-
order
int orderUsed to determine the position of the attribute when the service configuration is presented to a user.- Returns:
- the order.
-
-
-
name
String nameThe name of the attribute. If not provided, the name of the annotated method is used.- Returns:
- the name.
- Default:
- ""
-
resourceName
String resourceNameThe resource name of the attribute in the REST endpoints. If not provided, the name of the attribute is used.- Returns:
- the resource name.
- See Also:
- Default:
- ""
-
i18nKey
String i18nKeyThe key to use in the resource bundle. If not provided, the name of the attribute is used.- Returns:
- the i18n key.
- See Also:
- Default:
- ""
-
validators
Class<?>[] validatorsA list ofServiceAttributeValidator
classes that will validate the value of the attribute. If not provided, no validation will be performed.- Returns:
- the validator classes.
- Default:
- {}
-
choiceValuesClass
Class<?> choiceValuesClassAcom.sun.identity.sm.ChoiceValues
implementation that should be used to compute the choice values for the attribute.- Returns:
- The choice values class.
- Default:
- java.lang.Void.class
-
requiredValue
boolean requiredValueSpecify that the attribute is required to have a value. This will add thecom.sun.identity.sm.RequiredValueValidator
validator.- Returns:
- if a value is required.
- Default:
- false
-
minLength
int minLengthSpecify that the attribute value cannot be empty.- Returns:
- the minimum length of the value. -1 if not specified.
- Default:
- -1
-