Annotation Interface IdRepoConfig
The methods of the interface annotated with Attribute
form the schema of the Identity Repository,
which will be used by SMS to automatically generate REST endpoints for manipulating the Identity Repository
instances.
All methods MUST be annotated with 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.
Interfaces annotated with this annotation should be registered with the AnnotatedServiceRegistry
,
which will result in the Identity Repository being added to the Identity Repository service and being
available to be created and used.
Example:
@IdRepoConfig
interface MyIdRepoConfig {
@Attribute(order = 100)
String myAttribute();
@Attribute(order = 300)
default int myDefaultedAttribute() {
return 5;
}
@Attribute(order = 200)
@MyType
CustomType anotherAttribute();
}
- Since:
- AM 7.0.0
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe key for the Identity Repository description in the i18n bundle.boolean
Whether the config Identity Repository should be hidden from the config UI.The name of the i18n bundle file (without.properties
suffix), relative to the root package.The name of the Identity Repository.The resource name of the Identity Repository in the REST endpoints.
-
Element Details
-
name
String nameThe name of the Identity Repository. If not provided, the simple name of the annotated interface is used.- Returns:
- the name.
- Default:
- ""
-
resourceName
String resourceNameThe resource name of the Identity Repository in the REST endpoints. If not provided, the name of the service is used.- Returns:
- the resource name.
- See Also:
- Default:
- ""
-
i18nFile
String i18nFileThe name of the i18n bundle file (without.properties
suffix), relative to the root package.If not provided, this will default to the interface name, with the slash-separated package prefix.
- Returns:
- the i18n file name.
- Default:
- ""
-
descriptionKey
String descriptionKeyThe key for the Identity Repository description in the i18n bundle.- Returns:
- the i18n description key.
- Default:
- "serviceDescription"
-