Class PurposeMappingValidator
java.lang.Object
org.forgerock.openam.secrets.config.PurposeMappingValidator
- All Implemented Interfaces:
ServiceConfigValidatorV2
- Direct Known Subclasses:
SingleAliasPurposeMappingValidator
@EvolvingAll
public class PurposeMappingValidator
extends Object
implements ServiceConfigValidatorV2
This validator makes sure that the secret mappings have both the alias and the secret ID specified, and
additionally it verifies that there is no other secret mapping in the configuration already for the same secret ID.
- Since:
- AM 6.5.0
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
PurposeMappingValidator
-
-
Method Details
-
validate
public void validate(Realm realm, String serviceName, List<String> configPath, Map<String, Set<String>> attributes) throws ServiceConfigException, ServiceErrorExceptionDescription copied from interface:ServiceConfigValidatorV2
Implement this method to perform the validation of the attributes.- Specified by:
validate
in interfaceServiceConfigValidatorV2
- Parameters:
realm
- The realm the config is in, ornull
if it is not in a realm.serviceName
- The name of the service to be validated.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 occurred when trying to validate the config.
-