Annotation Type SubConfig
-
@SupportedAll @Retention(RUNTIME) @Target(METHOD) public @interface SubConfig
Indicates that a method contains rich sub-configuration(s) of the parent configuration (or sub-configuration).The return type of the method must either be a org.forgerock.openam.sm.annotations.subconfigs.Singleton of the type (which is an interface) for a singleton sub-configuration, or a
org.forgerock.openam.sm.annotations.subconfigs.Multiple
of the type in the case of a collection.As with
Config
the annotated methods of the interface are used to make the schema of the configuration. As such, all methods must be annotated withAttribute
,Id
orSubConfig
, or have a default implementation.The annotated method MUST NOT have any parameters.
- See Also:
Config
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
container
Whether to create a sub-schema container entry.String
descriptionKey
The key for the service description in the i18n bundle - defaults to[sub-configuration name].description
.boolean
hiddenFromConfigUi
Whether the config service should be hidden from the config UI.String
instanceName
Whencontainer()
is true, this is the name of the contained SubConfig (the 'instance').String
name
The name of the sub-configuration - defaults to the name of the annotated method.String
resourceName
The resource name of the sub configuration - defaults to the name of sub-configuration.boolean
treatAsService
Deprecated.Create a new service instead.Class<?>
validator
A validator to apply to the entire configuration object.
-
-
-
Element Detail
-
name
String name
The name of the sub-configuration - defaults to the name of the annotated method.- Returns:
- The override name.
- Default:
- ""
-
-
-
resourceName
String resourceName
The resource name of the sub configuration - defaults to the name of sub-configuration.- Returns:
- The override resource name.
- Default:
- ""
-
-
-
descriptionKey
String descriptionKey
The key for the service description in the i18n bundle - defaults to[sub-configuration name].description
.- Returns:
- the i18n description key.
- Default:
- ""
-
-
-
validator
Class<?> validator
A validator to apply to the entire configuration object.If set, the value must be a class implementing the
ServiceConfigValidator
interface.- Returns:
- the validator class.
- Default:
- java.lang.Void.class
-
-
hiddenFromConfigUi
boolean 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
-
-
-
treatAsService
@Deprecated boolean treatAsService
Deprecated.Create a new service instead.Whether this SubConfig should be treated and exposed as its own service. This is a workaround, and indicates that the SubConfig is modelled incorrectly. For example, a service called 'foo' with a SubConfig with resourceName='bar' would be exposed as '/realm-config/services/bar', and the endpoint '/realm-config/services/foo' will not exist.- Returns:
- true if the SubConfig should be treated as a service.
- Default:
- false
-
-
-
instanceName
String instanceName
Whencontainer()
is true, this is the name of the contained SubConfig (the 'instance'). This is a workaround, and indicates that the SubConfig is modelled in a non-standard way.- Returns:
- the name of the contained SubConfig.
- Default:
- "instance"
-
-