Class AbstractFactoryBuilder<F>

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

public abstract class AbstractFactoryBuilder<F>
extends Object
Abstract class to build a secure builder instance
  • Constructor Details

    • AbstractFactoryBuilder

      public AbstractFactoryBuilder()
  • 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 AbstractFactoryBuilder<F> enableFeature​(String feature)
      Enables a custom feature
      Parameters:
      feature - String the feature constraint
      Returns:
      this builder
    • disableFeature

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

      public AbstractFactoryBuilder<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 AbstractFactoryBuilder<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 Exception
      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:
      Exception - 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 Exception
      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:
      Exception - in case if any exception occurs