|
||||||||||
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
public abstract class AbstractUrlMapping
Abstract UrlMapping implementation that provides common basic functionality
Field Summary | |
---|---|
protected Object |
actionName
|
protected ConstrainedProperty[] |
constraints
|
protected Object |
controllerName
|
protected Object |
forwardURI
|
protected String |
mappingName
|
protected Map |
parameterValues
|
protected boolean |
parseRequest
|
protected boolean |
restful
|
protected ServletContext |
servletContext
|
protected Object |
viewName
|
Fields inherited from interface org.codehaus.groovy.grails.web.mapping.UrlMapping |
---|
ACTION, CONTROLLER |
Constructor Summary | |
---|---|
protected |
AbstractUrlMapping(Object viewName,
ConstrainedProperty[] constraints,
ServletContext servletContext)
|
|
AbstractUrlMapping(Object controllerName,
Object actionName,
Object viewName,
ConstrainedProperty[] constraints,
ServletContext servletContext)
Base constructor required to construct a UrlMapping instance |
protected |
AbstractUrlMapping(URI uri,
ConstrainedProperty[] constraints,
ServletContext servletContext)
|
Method Summary | |
---|---|
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 |
String |
getMappingName()
|
Object |
getViewName()
Returns the name of the view to map to |
boolean |
hasRuntimeVariable(String name)
Whether the mapping has a runtime variable with the given name such as "/$foo" |
boolean |
isRestfulMapping()
|
void |
setMappingName(String name)
|
void |
setParameterValues(Map parameterValues)
Sets any parameter values that should be populated into the request |
void |
setParseRequest(boolean shouldParse)
Sets whether this UrlMapping should parse the request |
void |
setRestfulMapping(boolean isREST)
|
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 |
---|
getUrlData, match |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface org.codehaus.groovy.grails.web.mapping.UrlCreator |
---|
createRelativeURL, createRelativeURL, createURL, createURL, createURL, createURL |
Field Detail |
---|
protected final ConstrainedProperty[] constraints
protected Object controllerName
protected Object actionName
protected Object viewName
protected Object forwardURI
protected ServletContext servletContext
protected Map parameterValues
protected boolean parseRequest
protected String mappingName
protected boolean restful
Constructor Detail |
---|
public AbstractUrlMapping(Object controllerName, Object actionName, Object viewName, ConstrainedProperty[] constraints, ServletContext servletContext)
controllerName
- The name of the controlleractionName
- The name of the actionconstraints
- Any constraints that apply to the mappingservletContext
- protected AbstractUrlMapping(Object viewName, ConstrainedProperty[] constraints, ServletContext servletContext)
protected AbstractUrlMapping(URI uri, ConstrainedProperty[] constraints, ServletContext servletContext)
Method Detail |
---|
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
UrlMapping.getConstraints()
public Object getControllerName()
UrlMapping
getControllerName
in interface UrlMapping
Closure
or String
UrlMapping.getControllerName()
public Object getActionName()
UrlMapping
getActionName
in interface UrlMapping
Closure
or String
UrlMapping.getActionName()
public Object getViewName()
UrlMapping
getViewName
in interface UrlMapping
UrlMapping.getViewName()
public void setParameterValues(Map parameterValues)
UrlMapping
setParameterValues
in interface UrlMapping
parameterValues
- The parameter values to setpublic void setParseRequest(boolean shouldParse)
UrlMapping
setParseRequest
in interface UrlMapping
shouldParse
- True if it shouldpublic String getMappingName()
getMappingName
in interface UrlMapping
public void setMappingName(String name)
setMappingName
in interface UrlMapping
public void setRestfulMapping(boolean isREST)
setRestfulMapping
in interface UrlMapping
isREST
- Set whether this is a RESTful mappingpublic boolean isRestfulMapping()
isRestfulMapping
in interface UrlMapping
public boolean hasRuntimeVariable(String name)
UrlMapping
hasRuntimeVariable
in interface UrlMapping
name
- The name of the variable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |