Class WebConfigurator

java.lang.Object
com.logicaldoc.util.config.XMLBean
com.logicaldoc.util.config.WebConfigurator

public class WebConfigurator extends XMLBean
Configurator for the web.xml file
Since:
3.0
Author:
Marco Meschieri - LogicalDOC, Sebastian Wenzky
  • Constructor Details

    • WebConfigurator

      public WebConfigurator(String path)
  • Method Details

    • addContextParam

      public void addContextParam(String name, String value, String description, WebConfigurator.INIT_PARAM append)
      Adding a contextparam to the web.xml
      Parameters:
      name - the param
      value - the value
      description - description of the parameter
      append - * @param append if the param exist, should the new value appended? possible values are represented in WebConfigurator.INIT_PARAM
    • addFilterInitParam

      public void addFilterInitParam(String filterName, String paramName, String paramValue)
    • addFilterInitParam

      public void addFilterInitParam(String filterName, String name, String value, String description, WebConfigurator.INIT_PARAM append)
      Adds a init parameter to the filter
      Parameters:
      filterName - The name of the filter
      name - Name of the Parameter
      value - Value of the Parameter
      description - Description
      append - if the parameter exist, should the new value appended? possible values are represented in WebConfigurator.INIT_PARAM
    • addInitParam

      public void addInitParam(String servletName, String name, String value, String description, WebConfigurator.INIT_PARAM append)
      Adds a init parameter to the servlet
      Parameters:
      servletName - The name of the servlet
      name - Name of the Parameter
      value - Value of the Parameter
      description - Description
      append - if the param exist, should the new value appended? possible values are represented in WebConfigurator.INIT_PARAM
    • addListenerInitParam

      public void addListenerInitParam(String listenerClazz, String name, String value, WebConfigurator.INIT_PARAM append)
      Adds a init parameter to the listener
      Parameters:
      listenerClazz - The class of the listener
      name - Name of the Parameter
      value - Value of the Parameter
      append - if the param exist, should the new value appended? possible values are represented in WebConfigurator.INIT_PARAM
    • addInitParam

      public void addInitParam(String servletName, String name, String value, String description)
      Adds a init parameter to the servlet
      Parameters:
      servletName - name of the servlet
      name - Name of the Parameter
      value - Value of the Parameter
      description - Description
    • addServlet

      public void addServlet(String name, String clazz)
      Adds a new servlet mapping to the deployment descriptor. If the mapping already exists no modifications are committed.
      Parameters:
      name - The servlet name
      clazz - The servlet class fully qualified name
    • addServlet

      public void addServlet(String name, String clazz, int loadOnStartup)
      Adds a new servlet to the deployment descriptor. If the servlet already exists no modifications are committed.
      Parameters:
      name - The servlet name
      clazz - The servlet class fully qualified name
      loadOnStartup - use 1 in case the servlet must be started during the startup
    • addFilter

      public void addFilter(String name, String clazz)
      Adds a new filter to the deployment descriptor. If the filter already exists no modifications are committed.
      Parameters:
      name - The filter name
      clazz - The filter class fully qualified name
    • addListener

      public void addListener(String clazz)
      Adds a new listener to the deployment descriptor. If the listener already exists no modifications are committed. e
      Parameters:
      clazz - The filter class fully qualified name
    • addServletMapping

      public void addServletMapping(String servlet, String pattern)
      Adds a new servlet mapping to the deployment descriptor. If the mapping already exists no modifications are committed.
      Parameters:
      servlet - The name of the servlet
      pattern - The mapping pattern
    • addFilterMapping

      public void addFilterMapping(String filter, String pattern)
      Adds a new filter mapping to the deployment descriptor. If the mapping already exists no modifications are committed.
      Parameters:
      filter - The name of the filter
      pattern - The mapping pattern
    • setDisplayName

      public void setDisplayName(String displayName)
    • getDisplayName

      public String getDisplayName()
    • setDescription

      public void setDescription(String description)
    • setTransportGuarantee

      public boolean setTransportGuarantee(String policy)
      Sets the given policy in the <transport-guarantee> tags
      Parameters:
      policy - the policy to set
      Returns:
      true if the XML was touched