Annotation Type Attribute
-
@SupportedAll @Retention(RUNTIME) @Target(METHOD) public @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:
Config
- If the method has an annotation that implies a
-
-
Field Summary
Fields Modifier and Type Fields Description static int
HIDDEN
Used to set an attribute as "hidden" so it is not exposed via UI.
-
Required Element Summary
Required Elements Modifier and Type Required Element Description int
order
Used to determine the position of the attribute when the service configuration is presented to a user.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>
choiceValuesClass
Acom.sun.identity.sm.ChoiceValues
implementation that should be used to compute the choice values for the attribute.boolean
hiddenFromConfigUi
Whether the config attribute should be hidden from the config UI.String
i18nKey
The key to use in the resource bundle.int
minLength
Specify that the attribute value cannot be empty.String
name
The name of the attribute.boolean
requiredValue
Specify that the attribute is required to have a value.String
resourceName
The resource name of the attribute in the REST endpoints.Class<?>[]
validators
A list ofServiceAttributeValidator
classes that will validate the value of the attribute.
-
-
-
-
name
String name
The name of the attribute. If not provided, the name of the annotated method is used.- Returns:
- the name.
- Default:
- ""
-
-
-
validators
Class<?>[] validators
A 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<?> choiceValuesClass
Acom.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
-
-
hiddenFromConfigUi
boolean hiddenFromConfigUi
Whether the config attribute should be hidden from the config UI. Defaults to false.- Returns:
- true if the attribute should be hidden.
- Default:
- false
-
-