|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.roo.support.util.WebXmlUtils
public abstract class WebXmlUtils
Helper util class to allow more convenient handling of web.xml file in Web projects.
Nested Class Summary | |
---|---|
static class |
WebXmlUtils.FilterPosition
Enum to define filter position |
static class |
WebXmlUtils.WebXmlParam
Value object used to hold init-param style information |
Constructor Summary | |
---|---|
WebXmlUtils()
|
Method Summary | |
---|---|
static void |
addContextParam(WebXmlUtils.WebXmlParam contextParam,
Document webXml,
String comment)
Add a context param to the web.xml document |
static void |
addErrorCode(Integer errorCode,
String location,
Document webXml,
String comment)
Add error code to web.xml document |
static void |
addExceptionType(String exceptionType,
String location,
Document webXml,
String comment)
Add exception type to web.xml document |
static void |
addFilter(String filterName,
String filterClass,
String urlPattern,
Document webXml,
String comment,
WebXmlUtils.WebXmlParam... initParams)
Add a new filter definition to web.xml document. |
static void |
addFilterAtPosition(WebXmlUtils.FilterPosition filterPosition,
String afterFilterName,
String beforeFilterName,
String filterName,
String filterClass,
String urlPattern,
Document webXml,
String comment,
WebXmlUtils.WebXmlParam... initParams)
Add a new filter definition to web.xml document. |
static void |
addListener(String className,
Document webXml,
String comment)
Add listener element to web.xml document |
static void |
addServlet(String servletName,
String className,
String urlPattern,
Integer loadOnStartup,
Document webXml,
String comment,
WebXmlUtils.WebXmlParam... initParams)
Add servlet element to the web.xml document |
static void |
addWelcomeFile(String path,
Document webXml,
String comment)
Add a welcome file definition to web.xml document |
static void |
setDescription(String description,
Document webXml,
String comment)
Set the description element in the web.xml document. |
static void |
setDisplayName(String displayName,
Document webXml,
String comment)
Set the displayname element in the web.xml document. |
static void |
setSessionTimeout(Integer timeout,
Document webXml,
String comment)
Set session timeout in web.xml document |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebXmlUtils()
Method Detail |
---|
public static void setDisplayName(String displayName, Document webXml, String comment)
displayName
- (required)webXml
- the web.xml document (required)comment
- (optional)public static void setDescription(String description, Document webXml, String comment)
description
- (required)webXml
- the web.xml document (required)comment
- (optional)public static void addContextParam(WebXmlUtils.WebXmlParam contextParam, Document webXml, String comment)
contextParam
- (required)webXml
- the web.xml document (required)comment
- (optional)public static void addFilter(String filterName, String filterClass, String urlPattern, Document webXml, String comment, WebXmlUtils.WebXmlParam... initParams)
filterPosition
- Filter position (required)filterPositionFilterName
- (optional for filter position FIRST and LAST, required for BEFORE and AFTER)filterName
- (required)filterClass
- the fully qualified name of the filter type (required)urlPattern
- (required)webXml
- the web.xml document (required)comment
- (optional)initParams
- (optional)public static void addFilterAtPosition(WebXmlUtils.FilterPosition filterPosition, String afterFilterName, String beforeFilterName, String filterName, String filterClass, String urlPattern, Document webXml, String comment, WebXmlUtils.WebXmlParam... initParams)
filterPosition
- Filter position (required)beforeFilterName
- (optional for filter position FIRST and LAST, required for BEFORE and AFTER)filterName
- (required)filterClass
- the fully qualified name of the filter type (required)urlPattern
- (required)webXml
- the web.xml document (required)comment
- (optional)initParams
- (optional)public static void addListener(String className, Document webXml, String comment)
className
- the fully qualified name of the listener type (required)webXml
- (required)comment
- (optional)public static void addServlet(String servletName, String className, String urlPattern, Integer loadOnStartup, Document webXml, String comment, WebXmlUtils.WebXmlParam... initParams)
servletName
- (required)className
- the fully qualified name of the servlet type (required)urlPattern
- this can be set to null in which case the servletName will be used for mapping (optional)loadOnStartup
- (optional)webXml
- (required)comment
- (optional)initParams
- (optional)public static void setSessionTimeout(Integer timeout, Document webXml, String comment)
timeout
- (required)webXml
- (required)comment
- (optional)public static void addWelcomeFile(String path, Document webXml, String comment)
path
- (required)webXml
- (required)comment
- (optional)public static void addExceptionType(String exceptionType, String location, Document webXml, String comment)
exceptionType
- fully qualified exception type name (required)location
- (required)webXml
- (required)comment
- (optional)public static void addErrorCode(Integer errorCode, String location, Document webXml, String comment)
errorCode
- (required)location
- (required)webXml
- (required)comment
- (optional)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |