Class DefaultConfigurationManager
java.lang.Object
se.idsec.signservice.integration.config.impl.DefaultConfigurationManager
- All Implemented Interfaces:
ConfigurationManager
Default implementation of the
ConfigurationManager
interface.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultConfigurationManager
(Map<String, ? extends IntegrationServiceConfiguration> policies) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Checks that the settings for this object is valid.getConfiguration
(String policy) Given the name of a SignService Integration policy, the method returns the service configuration used for this policy.Gets the default policy name.Returns a list of names of the policies that are defined for this instance of the SignService Integration Service.void
setDefaultPolicyName
(String defaultPolicyName) Assigns the default policy name.
-
Constructor Details
-
DefaultConfigurationManager
public DefaultConfigurationManager(Map<String, ? extends IntegrationServiceConfiguration> policies) throws IllegalArgumentExceptionConstructor.- Parameters:
policies
- a mapping between policy names and service configuration objects- Throws:
IllegalArgumentException
- if policies are invalid
-
-
Method Details
-
getConfiguration
Given the name of a SignService Integration policy, the method returns the service configuration used for this policy.- Specified by:
getConfiguration
in interfaceConfigurationManager
- Parameters:
policy
- the policy name (null is interpreted as the default policy)- Returns:
- the service configuration for the given policy, or null if no policy is found
-
getPolicies
Returns a list of names of the policies that are defined for this instance of the SignService Integration Service.- Specified by:
getPolicies
in interfaceConfigurationManager
- Returns:
- a non-empty list of policy names
-
getDefaultPolicyName
Gets the default policy name.- Specified by:
getDefaultPolicyName
in interfaceConfigurationManager
- Returns:
- the default policy name
-
setDefaultPolicyName
Assigns the default policy name. If not assigned, "default" will be used.- Specified by:
setDefaultPolicyName
in interfaceConfigurationManager
- Parameters:
defaultPolicyName
- the default policy name
-
afterPropertiesSet
Checks that the settings for this object is valid.- Throws:
Exception
- for initialization errors
-