Methods Summary |
---|
public int | getDispatcherMapping()
// per the SRV.6.2.5 absence of any dispatcher elements is
// equivelant to a REQUEST value
if (dispatcherMapping == NOT_SET) return REQUEST;
else return dispatcherMapping;
|
public java.lang.String | getFilterName()
return (this.filterName);
|
public java.lang.String | getServletName()
return (this.servletName);
|
public java.lang.String | getURLPattern()
return (this.urlPattern);
|
public void | setDispatcher(java.lang.String dispatcherString)This method will be used to set the current state of the FilterMap
representing the state of when filters should be applied:
ERROR
FORWARD
FORWARD_ERROR
INCLUDE
INCLUDE_ERROR
INCLUDE_ERROR_FORWARD
REQUEST
REQUEST_ERROR
REQUEST_ERROR_INCLUDE
REQUEST_ERROR_FORWARD_INCLUDE
REQUEST_INCLUDE
REQUEST_FORWARD,
REQUEST_FORWARD_INCLUDE
String dispatcher = dispatcherString.toUpperCase();
if (dispatcher.equals("FORWARD")) {
// apply FORWARD to the global dispatcherMapping.
switch (dispatcherMapping) {
case NOT_SET : dispatcherMapping = FORWARD; break;
case ERROR : dispatcherMapping = FORWARD_ERROR; break;
case INCLUDE : dispatcherMapping = INCLUDE_FORWARD; break;
case INCLUDE_ERROR : dispatcherMapping = INCLUDE_ERROR_FORWARD; break;
case REQUEST : dispatcherMapping = REQUEST_FORWARD; break;
case REQUEST_ERROR : dispatcherMapping = REQUEST_ERROR_FORWARD; break;
case REQUEST_ERROR_INCLUDE : dispatcherMapping = REQUEST_ERROR_FORWARD_INCLUDE; break;
case REQUEST_INCLUDE : dispatcherMapping = REQUEST_FORWARD_INCLUDE; break;
}
} else if (dispatcher.equals("INCLUDE")) {
// apply INCLUDE to the global dispatcherMapping.
switch (dispatcherMapping) {
case NOT_SET : dispatcherMapping = INCLUDE; break;
case ERROR : dispatcherMapping = INCLUDE_ERROR; break;
case FORWARD : dispatcherMapping = INCLUDE_FORWARD; break;
case FORWARD_ERROR : dispatcherMapping = INCLUDE_ERROR_FORWARD; break;
case REQUEST : dispatcherMapping = REQUEST_INCLUDE; break;
case REQUEST_ERROR : dispatcherMapping = REQUEST_ERROR_INCLUDE; break;
case REQUEST_ERROR_FORWARD : dispatcherMapping = REQUEST_ERROR_FORWARD_INCLUDE; break;
case REQUEST_FORWARD : dispatcherMapping = REQUEST_FORWARD_INCLUDE; break;
}
} else if (dispatcher.equals("REQUEST")) {
// apply REQUEST to the global dispatcherMapping.
switch (dispatcherMapping) {
case NOT_SET : dispatcherMapping = REQUEST; break;
case ERROR : dispatcherMapping = REQUEST_ERROR; break;
case FORWARD : dispatcherMapping = REQUEST_FORWARD; break;
case FORWARD_ERROR : dispatcherMapping = REQUEST_ERROR_FORWARD; break;
case INCLUDE : dispatcherMapping = REQUEST_INCLUDE; break;
case INCLUDE_ERROR : dispatcherMapping = REQUEST_ERROR_INCLUDE; break;
case INCLUDE_FORWARD : dispatcherMapping = REQUEST_FORWARD_INCLUDE; break;
case INCLUDE_ERROR_FORWARD : dispatcherMapping = REQUEST_ERROR_FORWARD_INCLUDE; break;
}
} else if (dispatcher.equals("ERROR")) {
// apply ERROR to the global dispatcherMapping.
switch (dispatcherMapping) {
case NOT_SET : dispatcherMapping = ERROR; break;
case FORWARD : dispatcherMapping = FORWARD_ERROR; break;
case INCLUDE : dispatcherMapping = INCLUDE_ERROR; break;
case INCLUDE_FORWARD : dispatcherMapping = INCLUDE_ERROR_FORWARD; break;
case REQUEST : dispatcherMapping = REQUEST_ERROR; break;
case REQUEST_INCLUDE : dispatcherMapping = REQUEST_ERROR_INCLUDE; break;
case REQUEST_FORWARD : dispatcherMapping = REQUEST_ERROR_FORWARD; break;
case REQUEST_FORWARD_INCLUDE : dispatcherMapping = REQUEST_ERROR_FORWARD_INCLUDE; break;
}
}
|
public void | setDispatcherMapping(int mapping)
dispatcherMapping = mapping;
|
public void | setFilterName(java.lang.String filterName)
this.filterName = filterName;
|
public void | setServletName(java.lang.String servletName)
this.servletName = servletName;
|
public void | setURLPattern(java.lang.String urlPattern)
this.urlPattern = RequestUtil.URLDecode(urlPattern);
|
public java.lang.String | toString()Render a String representation of this object.
StringBuffer sb = new StringBuffer("FilterMap[");
sb.append("filterName=");
sb.append(this.filterName);
if (servletName != null) {
sb.append(", servletName=");
sb.append(servletName);
}
if (urlPattern != null) {
sb.append(", urlPattern=");
sb.append(urlPattern);
}
sb.append("]");
return (sb.toString());
|