Annotation Type Config
- 
 @SupportedAll @Retention(RUNTIME) @Target(TYPE) public @interface Config Indicates that an interface describes the configuration of an SMS service.The methods of the interface annotated with Attributeform the schema of the service, which will be used by SMS to automatically generate REST endpoints for manipulating the service.All methods MUST be annotated with Attribute,Id,SubConfigor have a default implementation.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.
 Interfaces annotated with this annotation should be registered with the AnnotatedServiceRegistry. The registry can then be used to obtain concrete implementations of the interface.Example: @Config(scope = GLOBAL) interface MyGlobalServiceConfig { @Attribute(order = 100) String myAttribute(); @Attribute(order = 300) default int myDefaultedAttribute() { return 5; } @Attribute(order = 200) @MyType CustomType anotherAttribute(); }- Since:
- AM 5.5.0
- See Also:
- Attribute
 
- If the method has an annotation that implies a 
- 
- 
Required Element SummaryRequired Elements Modifier and Type Required Element Description Config.ScopescopeThe scope of the service configuration.
 - 
Optional Element SummaryOptional Elements Modifier and Type Optional Element Description booleancollectionWhether multiple instances are supported for this service.booleancontainerWhether to create a sub-schema container entry.StringdescriptionKeyThe key for the service description in the i18n bundle.booleanhiddenFromConfigUiWhether the config service should be hidden from the config UI.Stringi18nFileThe name of the i18n bundle file (without.propertiessuffix), relative to the root package.StringnameThe name of the service.StringresourceNameThe resource name of the service in the REST endpoints.Class<?>validatorA validator to apply to the entire configuration object.StringversionThe version number of the service.
 
- 
- 
- 
Element Detail- 
scopeConfig.Scope scope The scope of the service configuration.- Returns:
- the scope.
 
 
- 
 - 
- 
nameString name The name of the service. If not provided, the simple name of the annotated interface is used.- Returns:
- the name.
 - Default:
- ""
 
 
- 
 - 
- 
versionString version The version number of the service.- Returns:
- the version.
 - Default:
- "1.0"
 
 
- 
 - 
- 
i18nFileString i18nFile The name of the i18n bundle file (without.propertiessuffix), 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:
- ""
 
 
- 
 - 
- 
descriptionKeyString descriptionKey The key for the service description in the i18n bundle.- Returns:
- the i18n description key.
 - Default:
- "serviceDescription"
 
 
- 
 - 
- 
validatorClass<?> validator A validator to apply to the entire configuration object.If set, the value must be a class implementing the ServiceConfigValidatorinterface.- Returns:
- the validator class.
 - Default:
- java.lang.Void.class
 
 
- 
 - 
- 
hiddenFromConfigUiboolean hiddenFromConfigUi Whether the config service should be hidden from the config UI. Defaults to false.- Returns:
- true if the service should be hidden.
 - Default:
- false
 
 
- 
 
-