Class ConfigureTestCommons

java.lang.Object
org.codice.ddf.itests.common.config.ConfigureTestCommons

public class ConfigureTestCommons extends Object
  • 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 attribute
      filterErrors - - sets whether metacards with validation errors are filtered
      filterWarnings - - 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 IOException
      Configures 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 rejected
      enforceWarnings - - 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 IOException
      Configures 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 IOException
      Configures 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 mapping
      matchOneAttributes - - list of 'Match-One' subject attribute to Metacard attribute mapping
      environmentAttributes - - 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 IOException
      Configures 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 attributes
      servicePolicies - - 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 IOException
      Configures 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