Package com.logicaldoc.util.config
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WebConfigurator.INIT_PARAM
-
Constructor Summary
Constructors Constructor Description WebConfigurator(String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContextParam(String name, String value, String description, WebConfigurator.INIT_PARAM append)
Adding a contextparam to the web.xmlvoid
addFilter(String name, String clazz)
Adds a new filter to the deployment descriptor.void
addFilterInitParam(String filterName, String param_name, String param_value)
void
addFilterInitParam(String filterName, String name, String value, String description, WebConfigurator.INIT_PARAM append)
Adds a init parameter to the filtervoid
addFilterMapping(String filter, String pattern)
Adds a new filter mapping to the deployment descriptor.void
addInitParam(String servletName, String name, String value, String description)
Adds a init parameter to the servletvoid
addInitParam(String servletName, String name, String value, String description, WebConfigurator.INIT_PARAM append)
Adds a init parameter to the servletvoid
addListener(String clazz)
Adds a new listener to the deployment descriptor.void
addListenerInitParam(String listenerClazz, String name, String value, WebConfigurator.INIT_PARAM append)
Adds a init parameter to the listenervoid
addServlet(String name, String clazz)
Adds a new servlet mapping to the deployment descriptor.void
addServlet(String name, String clazz, int loadOnStartup)
Adds a new servlet to the deployment descriptor.void
addServletMapping(String servlet, String pattern)
Adds a new servlet mapping to the deployment descriptor.String
getDisplayName()
void
setDescription(String description)
void
setDisplayName(String displayName)
boolean
setTransportGuarantee(String policy)
Sets the given policy in the <transport-guarantee> tags-
Methods inherited from class com.logicaldoc.util.config.XMLBean
findElement, getAllAttribute, getAllChildren, getAllChildren, getAllChildText, getAttribute, getAttributeValue, getChild, getChild, getChildText, getRootChild, getRootElement, getText, getText, removeChild, setAttributeValue, setText, writeXMLDoc
-
-
-
-
Constructor Detail
-
WebConfigurator
public WebConfigurator(String path)
-
-
Method Detail
-
addContextParam
public void addContextParam(String name, String value, String description, WebConfigurator.INIT_PARAM append)
Adding a contextparam to the web.xml- Parameters:
name
- the paramvalue
- the valuedescription
- description of the parameterappend
- * @param append if the param exist, should the new value appended? possible values are represented inWebConfigurator.INIT_PARAM
-
addFilterInitParam
public void addFilterInitParam(String filterName, String param_name, String param_value)
-
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 filtername
- Name of the Parametervalue
- Value of the Parameterdescription
- Descriptionappend
- if the parameter exist, should the new value appended? possible values are represented inWebConfigurator.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 servletname
- Name of the Parametervalue
- Value of the Parameterdescription
- Descriptionappend
- if the param exist, should the new value appended? possible values are represented inWebConfigurator.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 listenername
- Name of the Parametervalue
- Value of the Parameterappend
- if the param exist, should the new value appended? possible values are represented inWebConfigurator.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 servletname
- Name of the Parametervalue
- Value of the Parameterdescription
- 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 nameclazz
- 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 nameclazz
- The servlet class fully qualified nameloadOnStartup
- 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 nameclazz
- 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 servletpattern
- 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 filterpattern
- 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
-
-