Package com.logicaldoc.util.config
Class WebConfigurator
java.lang.Object
com.logicaldoc.util.config.XMLBean
com.logicaldoc.util.config.WebConfigurator
Configurator for the web.xml file
- Since:
- 3.0
- Author:
- Marco Meschieri - LogicalDOC, Sebastian Wenzky
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContextParam
(String name, String value, String description, WebConfigurator.INIT_PARAM append) Adding a contextparam to the web.xmlvoid
Adds a new filter to the deployment descriptor.void
addFilterInitParam
(String filterName, String paramName, String paramValue) 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.void
setDescription
(String description) void
setDisplayName
(String displayName) boolean
setTransportGuarantee
(String policy) Sets the given policy in the <transport-guarantee> tagsMethods inherited from class com.logicaldoc.util.config.XMLBean
findElement, findElement, getAllAttribute, getAllChildren, getAllChildren, getAllChildText, getAttribute, getAttributeValue, getChild, getChild, getChildText, getRootChild, getRootElement, getText, getText, removeChild, setAttributeValue, setText, writeXMLDoc
-
Constructor Details
-
WebConfigurator
-
-
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 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
-
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
Adds a init parameter to the servlet- Parameters:
servletName
- name of the servletname
- Name of the Parametervalue
- Value of the Parameterdescription
- Description
-
addServlet
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
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
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
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
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
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
-
getDisplayName
-
setDescription
-
setTransportGuarantee
Sets the given policy in the <transport-guarantee> tags- Parameters:
policy
- the policy to set- Returns:
- true if the XML was touched
-