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
TypeAdapteris 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 intHIDDENUsed to set an attribute as "hidden" so it is not exposed via UI.
-
Required Element Summary
Required Elements Modifier and Type Required Element Description intorderUsed 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<?>choiceValuesClassAcom.sun.identity.sm.ChoiceValuesimplementation that should be used to compute the choice values for the attribute.booleanhiddenFromConfigUiWhether the config attribute should be hidden from the config UI.Stringi18nKeyThe key to use in the resource bundle.intminLengthSpecify that the attribute value cannot be empty.StringnameThe name of the attribute.booleanrequiredValueSpecify that the attribute is required to have a value.StringresourceNameThe resource name of the attribute in the REST endpoints.Class<?>[]validatorsA list ofServiceAttributeValidatorclasses 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 ofServiceAttributeValidatorclasses 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.ChoiceValuesimplementation 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
-
-