Class AbstractConfigurator<F>

java.lang.Object
eu.europa.esig.dss.jaxb.common.AbstractConfigurator<F>
Type Parameters:
F - class of the object to be configured
Direct Known Subclasses:
AbstractFactoryBuilder, ValidatorConfigurator

public abstract class AbstractConfigurator<F> extends Object
Abstract class containing util classes helping to configure a Factory or a Validator
  • Constructor Details

    • AbstractConfigurator

      protected AbstractConfigurator()
      Default constructor initializing empty maps of security features and attributes
  • Method Details

    • setSecurityExceptionAlert

      public void setSecurityExceptionAlert(StatusAlert securityExceptionAlert)
      This method allows to configure a custom alert on security exception in the builder
      Parameters:
      securityExceptionAlert - StatusAlert to define
    • enableFeature

      public AbstractConfigurator<F> enableFeature(String feature)
      Enables a custom feature
      Parameters:
      feature - String the feature constraint
      Returns:
      this builder
    • disableFeature

      public AbstractConfigurator<F> disableFeature(String feature)
      Disables a custom feature
      Parameters:
      feature - String the feature constraint
      Returns:
      this builder
    • setAttribute

      public AbstractConfigurator<F> setAttribute(String attribute, Object value)
      Sets a custom attribute.
      Parameters:
      attribute - String attribute constraint to set
      value - Object a value to define for the attribute
      Returns:
      this builder
    • removeAttribute

      public AbstractConfigurator<F> removeAttribute(String attribute)
      Removes the attribute from a list of attributes to set
      Parameters:
      attribute - String attribute to disable
      Returns:
      this builder
    • setSecurityFeatures

      protected void setSecurityFeatures(F factory)
      Sets all features to the factory
      Parameters:
      factory - object
    • setSecurityFeature

      protected abstract void setSecurityFeature(F factory, String feature, Boolean value) throws SecurityConfigurationException
      Sets the feature to the factory
      Parameters:
      factory - to set the feature to
      feature - String feature constraint to set
      value - Boolean value of the feature to add
      Throws:
      SecurityConfigurationException - in case if any exception occurs
    • setSecurityAttributes

      protected void setSecurityAttributes(F factory)
      Sets all attributes to the factory
      Parameters:
      factory - object
    • setSecurityAttribute

      protected abstract void setSecurityAttribute(F factory, String attribute, Object value) throws SecurityConfigurationException
      Sets the attribute to the factory
      Parameters:
      factory - Factory to set the attribute to
      attribute - String attribute constraint to set
      value - Object value of the attribute to add
      Throws:
      SecurityConfigurationException - in case if any exception occurs