|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.web.mapping.AbstractUrlMapping org.codehaus.groovy.grails.web.mapping.ResponseCodeUrlMapping
public class ResponseCodeUrlMapping
A Url mapping for http response codes
Field Summary |
---|
Fields inherited from class org.codehaus.groovy.grails.web.mapping.AbstractUrlMapping |
---|
actionName, controllerName, forwardURI, mappingName, parseRequest, restful, servletContext, viewName |
Fields inherited from interface org.codehaus.groovy.grails.web.mapping.UrlMapping |
---|
ACTION, CONTROLLER |
Constructor Summary | |
---|---|
ResponseCodeUrlMapping(UrlMappingData urlData,
Object controllerName,
Object actionName,
Object viewName,
ConstrainedProperty[] constraints,
ServletContext servletContext)
|
Method Summary | |
---|---|
int |
compareTo(Object o)
|
String |
createRelativeURL(String controller,
String action,
Map parameterValues,
String encoding)
Creates a URL for the given parameters values, controller and action names without the context path information |
String |
createRelativeURL(String controller,
String action,
Map parameterValues,
String encoding,
String fragment)
Creates a URL for the given parameters values, controller and action names without the context path information |
String |
createURL(Map parameterValues,
String encoding)
Creates a URL for the given parameter values |
String |
createURL(Map parameterValues,
String encoding,
String fragment)
Creates a URL for the given parameter values |
String |
createURL(String controller,
String action,
Map parameterValues,
String encoding)
Creates a URL for the given parameters values, controller and action names |
String |
createURL(String controller,
String action,
Map parameterValues,
String encoding,
String fragment)
Creates a URL for the given parameters values, controller and action names |
Object |
getActionName()
Retrieves the action name which is either a groovy.lang.Closure that evaluates the action name at runtime or a java.lang.String that represents the action name |
ConstrainedProperty[] |
getConstraints()
The constraints the apply to this UrlMapping. |
Object |
getControllerName()
Retrieves the controller name which is either a groovy.lang.Closure that evaluates the controller name at runtime or a java.lang.String that represents the controller name |
Class |
getExceptionType()
|
UrlMappingData |
getUrlData()
Retrieves the UrlMappingData instance that describes this UrlMapping |
Object |
getViewName()
Returns the name of the view to map to |
UrlMappingInfo |
match(int responseCode)
|
UrlMappingInfo |
match(String uri)
Matches the given URI and returns an instance of the UrlMappingInfo interface or null if a match couldn't be established |
void |
setExceptionType(Class exClass)
|
void |
setParameterValues(Map parameterValues)
Sets any parameter values that should be populated into the request |
Methods inherited from class org.codehaus.groovy.grails.web.mapping.AbstractUrlMapping |
---|
getMappingName, hasRuntimeVariable, isRestfulMapping, setMappingName, setParseRequest, setRestfulMapping |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codehaus.groovy.grails.web.mapping.UrlMapping |
---|
getMappingName, hasRuntimeVariable, isRestfulMapping, setMappingName, setParseRequest, setRestfulMapping |
Constructor Detail |
---|
public ResponseCodeUrlMapping(UrlMappingData urlData, Object controllerName, Object actionName, Object viewName, ConstrainedProperty[] constraints, ServletContext servletContext)
Method Detail |
---|
public UrlMappingInfo match(String uri)
UrlMapping
match
in interface UrlMapping
uri
- The URI to match
public UrlMappingData getUrlData()
UrlMapping
getUrlData
in interface UrlMapping
public ConstrainedProperty[] getConstraints()
UrlMapping
The constraints the apply to this UrlMapping. Each constraint maps to a GString token in a URL mapping in order. For example consider the URL:
/blog/$author/$title/$year?/$month?/$day?
This results in 5 ConstrainedProperty instances called author, title, year, month and day
getConstraints
in interface UrlMapping
getConstraints
in class AbstractUrlMapping
UrlMapping.getConstraints()
public Object getControllerName()
UrlMapping
getControllerName
in interface UrlMapping
getControllerName
in class AbstractUrlMapping
Closure
or String
UrlMapping.getControllerName()
public Object getActionName()
UrlMapping
getActionName
in interface UrlMapping
getActionName
in class AbstractUrlMapping
Closure
or String
UrlMapping.getActionName()
public Object getViewName()
UrlMapping
getViewName
in interface UrlMapping
getViewName
in class AbstractUrlMapping
UrlMapping.getViewName()
public void setParameterValues(Map parameterValues)
UrlMapping
setParameterValues
in interface UrlMapping
setParameterValues
in class AbstractUrlMapping
parameterValues
- The parameter values to setpublic int compareTo(Object o)
compareTo
in interface Comparable
public String createURL(Map parameterValues, String encoding)
UrlCreator
createURL
in interface UrlCreator
parameterValues
- The parameter valuesencoding
- The encoding to use for parameters
public String createURL(Map parameterValues, String encoding, String fragment)
UrlCreator
createURL
in interface UrlCreator
parameterValues
- The parameter valuesencoding
- The encoding to use for parametersfragment
- The URL fragment to be appended to the URL following a #
public String createURL(String controller, String action, Map parameterValues, String encoding)
UrlCreator
createURL
in interface UrlCreator
controller
- The controller nameaction
- The action nameparameterValues
- The parameter valuesencoding
- The encoding to use for parameters
public String createRelativeURL(String controller, String action, Map parameterValues, String encoding)
UrlCreator
createRelativeURL
in interface UrlCreator
controller
- The controller nameaction
- The action nameparameterValues
- The parameter valuesencoding
- The encoding to use for parameters
public String createRelativeURL(String controller, String action, Map parameterValues, String encoding, String fragment)
UrlCreator
createRelativeURL
in interface UrlCreator
controller
- The controller nameaction
- The action nameparameterValues
- The parameter valuesencoding
- The encoding to use for parametersfragment
- The fragment to append to the end
public String createURL(String controller, String action, Map parameterValues, String encoding, String fragment)
UrlCreator
createURL
in interface UrlCreator
controller
- The controller nameaction
- The action nameparameterValues
- The parameter valuesencoding
- The encoding to use for parametersfragment
- The URL fragment to be appended to the URL following a #
public UrlMappingInfo match(int responseCode)
public void setExceptionType(Class exClass)
public Class getExceptionType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |