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
TypeAdapteris inferred from the return type of the method.
- See Also:
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionintUsed to determine the position of the attribute when the service configuration is presented to a user. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>Acom.sun.identity.sm.ChoiceValuesimplementation that should be used to compute the choice values for the attribute.The server property that determines whether the config attribute should be hidden from the Config UI.The server property that determines whether the config attribute should be hidden from the REST API.booleanWhether the config attribute should be hidden from the config UI.The key to use in the resource bundle.intSpecify that the attribute value cannot be empty.The name of the attribute.booleanSpecify that the attribute is required to have a value.The resource name of the attribute in the REST endpoints.Class<?>[]A list ofServiceAttributeValidatorclasses that will validate the value of the attribute. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUsed 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 ofServiceAttributeValidatorclasses 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.ChoiceValuesimplementation 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.RequiredValueValidatorvalidator.- 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
-
flagEnablingRestApi
String flagEnablingRestApiThe server property that determines whether the config attribute should be hidden from the REST API.- Returns:
- the server property that determines visibility.
- Default:
- ""
-
flagEnablingConfigUi
String flagEnablingConfigUiThe server property that determines whether the config attribute should be hidden from the Config UI.- Returns:
- the server property that determines visibility.
- Default:
- ""
-