Package org.forgerock.openam.sm
Interface ServiceConfigValidator
-
@SupportedAll public interface ServiceConfigValidator
This interface provides a means to validate an entireServiceConfig
's attribute values together. It should be used when aSchema
orSubSchema
hasAttributeSchema
s whose valid values depend on other attributes in the config.It can be expected that instances of this class will be instantiated via a dependency injection framework, and so dependencies can be used via an
@Inject
-annotated constructor or setters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
validate(Realm realm, List<String> configPath, Map<String,Set<String>> attributes)
Implement this method to perform the validation of the attributes.
-
-
-
Method Detail
-
validate
void validate(Realm realm, List<String> configPath, Map<String,Set<String>> attributes) throws ServiceConfigException, ServiceErrorException
Implement this method to perform the validation of the attributes.- Parameters:
realm
- The realm the config is in, ornull
if it is not in a realm.configPath
- The names of the service config. The last element in the list will be the name of this config. In the case of service-level (non-SubSchema) config, this will be an empty list.attributes
- The map of attribute names to values. This map will contain the default values for attributes where a value is not defined in this instance.- Throws:
ServiceConfigException
- If the configuration is not valid, throw an SMSException, with a description of why it is invalid.ServiceErrorException
- If an exception occured when trying to validate the config.
-
-