Class ConfigureTestCommons
java.lang.Object
org.codice.ddf.itests.common.config.ConfigureTestCommons
-
Method Summary
Modifier and TypeMethodDescriptionstatic Dictionary<String,Object> configureAdminConfigPolicy(Dictionary<String, Object> properties, AdminConfig configAdmin) Configures the AdminConfigPolicy.static Dictionary<String,Object> configureAdminConfigPolicy(List<String> featurePolicies, List<String> servicePolicies, AdminConfig configAdmin) Configures the AdminConfigPolicy.static Dictionary<String,Object> configureAuthZRealm(Dictionary<String, Object> properties, AdminConfig configAdmin) Configures the AuthzRealm.static Dictionary<String,Object> configureAuthZRealm(List<String> matchAllMappings, List<String> matchOneAttributes, List<String> environmentAttributes, AdminConfig configAdmin) Configures the AuthzRealm.static Dictionary<String,Object> configureMetacardAttributeSecurityFiltering(Dictionary<String, Object> properties, AdminConfig configAdmin) Configures the MetacardAttributeSecurityPolicyPlugin.static Dictionary<String,Object> configureMetacardAttributeSecurityFiltering(List<String> intersectAttributes, List<String> unionAttributes, AdminConfig configAdmin) Configures the MetacardAttributeSecurityPolicyPlugin.static Dictionary<String,Object> configureMetacardValidityFilterPlugin(Dictionary<String, Object> props, AdminConfig configAdmin) Configures the MetacardValidityFilterPlugin.static Dictionary<String,Object> configureMetacardValidityFilterPlugin(List<String> securityAttributeMappings, boolean filterErrors, boolean filterWarnings, AdminConfig configAdmin) Configures the MetacardValidityFilterPlugin.static Dictionary<String,Object> configureService(String pid, Dictionary<String, Object> newProps, AdminConfig adminConfig) static Dictionary<String,Object> configureValidationMarkerPlugin(Dictionary<String, Object> props, AdminConfig configAdmin) Configures the MetacardValidityMarkerPlugin.static Dictionary<String,Object> configureValidationMarkerPlugin(List<String> enforcedValidators, boolean enforceErrors, boolean enforceWarnings, AdminConfig configAdmin) Configures the MetacardValidityMarkerPlugin.
-
Method Details
-
configureService
public static Dictionary<String,Object> configureService(String pid, Dictionary<String, Object> newProps, AdminConfig adminConfig) throws IOException- Throws:
IOException
-
configureMetacardValidityFilterPlugin
public static Dictionary<String,Object> configureMetacardValidityFilterPlugin(List<String> securityAttributeMappings, boolean filterErrors, boolean filterWarnings, AdminConfig configAdmin) throws IOException Configures the MetacardValidityFilterPlugin. See metatype for more detailed descriptions.- Parameters:
securityAttributeMappings- - attribute mapping between metacard attribute and user attributefilterErrors- - sets whether metacards with validation errors are filteredfilterWarnings- - sets whether metacards with validation warnings are filtered- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureMetacardValidityFilterPlugin
public static Dictionary<String,Object> configureMetacardValidityFilterPlugin(Dictionary<String, Object> props, AdminConfig configAdmin) throws IOExceptionConfigures the MetacardValidityFilterPlugin. This method should only be used to reset a service configuration using a dictionary returned from the overloaded configuration method.- Parameters:
props- - dictionary of properties provided from the configuration- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureValidationMarkerPlugin
public static Dictionary<String,Object> configureValidationMarkerPlugin(List<String> enforcedValidators, boolean enforceErrors, boolean enforceWarnings, AdminConfig configAdmin) throws IOException Configures the MetacardValidityMarkerPlugin. See metatype for more detailed descriptions.- Parameters:
enforcedValidators- - names of validators that will be enforced (reject errors/warnings)enforceErrors- - sets whether metacards with validation errors are rejectedenforceWarnings- - sets whether metacards with validation warnings are rejected- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureValidationMarkerPlugin
public static Dictionary<String,Object> configureValidationMarkerPlugin(Dictionary<String, Object> props, AdminConfig configAdmin) throws IOExceptionConfigures the MetacardValidityMarkerPlugin. This method should only be used to reset a service configuration using a dictionary returned from the overloaded configuration method.- Parameters:
props- - dictionary of properties provided from the configuration- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureMetacardAttributeSecurityFiltering
public static Dictionary<String,Object> configureMetacardAttributeSecurityFiltering(List<String> intersectAttributes, List<String> unionAttributes, AdminConfig configAdmin) throws IOException Configures the MetacardAttributeSecurityPolicyPlugin. See metatype for more detailed descriptions.- Parameters:
intersectAttributes- - intersection mapping between source and destination attributes.unionAttributes- - union mapping between source and destination attributes.- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureMetacardAttributeSecurityFiltering
public static Dictionary<String,Object> configureMetacardAttributeSecurityFiltering(Dictionary<String, Object> properties, AdminConfig configAdmin) throws IOExceptionConfigures the MetacardAttributeSecurityPolicyPlugin. This method should only be used to reset a service configuration using a dictionary returned from the overloaded configuration method.- Parameters:
properties- - dictionary of properties provided from the configuration- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureAuthZRealm
public static Dictionary<String,Object> configureAuthZRealm(List<String> matchAllMappings, List<String> matchOneAttributes, List<String> environmentAttributes, AdminConfig configAdmin) throws IOException Configures the AuthzRealm. See metatype for more detailed descriptions.- Parameters:
matchAllMappings- - list of 'Match-All' subject attribute to Metacard attribute mappingmatchOneAttributes- - list of 'Match-One' subject attribute to Metacard attribute mappingenvironmentAttributes- - List of environment attributes to pass to the XACML engine- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureAuthZRealm
public static Dictionary<String,Object> configureAuthZRealm(Dictionary<String, Object> properties, AdminConfig configAdmin) throws IOExceptionConfigures the AuthzRealm. This method should only be used to reset a service configuration using a dictionary returned from the overloaded configuration method.- Parameters:
properties- - dictionary of properties provided from the configuration- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureAdminConfigPolicy
public static Dictionary<String,Object> configureAdminConfigPolicy(List<String> featurePolicies, List<String> servicePolicies, AdminConfig configAdmin) throws IOException Configures the AdminConfigPolicy. See metatype for more detailed descriptions.- Parameters:
featurePolicies- - features or apps that will only be modifiable and viewable to users with the set attributesservicePolicies- - services that will only be modifiable and viewable to users with the set attributes- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-
configureAdminConfigPolicy
public static Dictionary<String,Object> configureAdminConfigPolicy(Dictionary<String, Object> properties, AdminConfig configAdmin) throws IOExceptionConfigures the AdminConfigPolicy. This method should only be used to reset a service configuration using a dictionary returned from the overloaded configuration method.- Parameters:
properties- - dictionary of properties provided from the configuration- Returns:
- A dictionary containing the old properties that the service had.
- Throws:
IOException
-