|
||||||||||
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.ResponseCodeUrlMapping
public class ResponseCodeUrlMapping
A Url mapping for http response codes
Field Summary |
---|
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)
|
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 |
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 |
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 |
setParameterValues(Map parameterValues)
Sets any parameter values that should be populated into the request |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResponseCodeUrlMapping(UrlMappingData urlData, Object controllerName, Object actionName, Object viewName, ConstrainedProperty[] constraints)
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
public Object getControllerName()
UrlMapping
getControllerName
in interface UrlMapping
Closure
or String
public Object getActionName()
UrlMapping
getActionName
in interface UrlMapping
Closure
or String
public Object getViewName()
UrlMapping
getViewName
in interface UrlMapping
public void setParameterValues(Map parameterValues)
UrlMapping
setParameterValues
in interface UrlMapping
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 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |