@java.lang.SuppressWarnings("rawtypes") class DefaultUrlMappingEvaluator.UrlMappingBuilder extends groovy.lang.GroovyObjectSupport
A modal builder that constructs a UrlMapping instances by executing a closure. The class overrides getProperty(name) and allows the substitution of GString values with the * wildcard.
invokeMethod(methodName, args) is also overriden for the creation of each UrlMapping instance
Modifiers | Name | Description |
---|---|---|
class |
DefaultUrlMappingEvaluator.UrlMappingBuilder.ParentResource |
Modifiers | Name | Description |
---|---|---|
private static java.lang.String |
CAPTURING_WILD_CARD |
|
private static java.lang.String |
CONSTRAINTS |
|
private static java.lang.String |
SLASH |
|
private groovy.lang.Binding |
binding |
|
private java.lang.Object |
exception |
|
private boolean |
inGroupConstraints |
|
private boolean |
isInCollection |
|
private java.util.Deque<MetaMappingInfo> |
mappingInfoDeque |
|
private java.util.Map<java.lang.String, java.lang.Object> |
parameterValues |
|
private java.util.Deque<ParentResource> |
parentResources |
|
private java.lang.Object |
parseRequest |
|
private java.util.List<grails.gorm.validation.ConstrainedProperty> |
previousConstraints |
|
private boolean |
urlDefiningMode |
|
private java.util.List<UrlMapping> |
urlMappings |
Constructor and description |
---|
UrlMappingBuilder
(groovy.lang.Binding binding) |
protected UrlMappingBuilder
(UrlMappingBuilder parent) |
Type Params | Return Type | Name and description |
---|---|---|
|
private java.lang.Object |
_invoke(java.lang.String methodName, java.lang.Object arg, java.lang.Object delegate) |
|
private java.util.List<java.lang.String> |
calculateIncludes(java.util.Map namedArguments, java.util.List<java.lang.String> defaultResourcesIncludes) |
|
public void |
collection(groovy.lang.Closure callable) Define Url mapping collections that are nested directly below the parent resource (without the id) |
|
private void |
configureUrlMapping(UrlMapping urlMapping) |
|
private java.util.List<grails.gorm.validation.ConstrainedProperty> |
createConstraintsWithIdAndFormat(java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected UrlMapping |
createCreateActionResourcesRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, grails.gorm.validation.ConstrainedProperty[] constraintArray) |
|
protected UrlMapping |
createDeleteActionResourceRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected UrlMapping |
createDeleteActionResourcesRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected UrlMapping |
createEditActionResourceRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, grails.gorm.validation.ConstrainedProperty[] constraintArray) |
|
protected UrlMapping |
createEditActionResourcesRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
private java.util.List<grails.gorm.validation.ConstrainedProperty> |
createFormatOnlyConstraints(java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
private UrlMappingData |
createFormatOnlyUrlMappingData(UrlMappingData urlData) |
|
protected UrlMapping |
createIndexActionResourcesRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected UrlMapping |
createPatchActionResourceRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected UrlMapping |
createPatchActionResourcesRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
private UrlMappingData |
createRelativeUrlDataWithIdAndFormat(UrlMappingData urlData) |
|
protected void |
createResourceRestfulMappings(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList, java.util.List<java.lang.String> includes) |
|
protected UrlMapping |
createSaveActionResourcesRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected UrlMapping |
createShowActionResourceRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected UrlMapping |
createShowActionResourcesRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected void |
createSingleResourceRestfulMappings(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList, java.util.List<java.lang.String> includes) Takes a controller and creates the necessary URL mappings for a singular RESTful resource |
|
private UrlMapping |
createURLMapping(UrlMappingData urlData, boolean isResponseCode, java.lang.Object redirectInfo, java.lang.Object controllerName, java.lang.Object actionName, java.lang.Object namespace, java.lang.Object pluginName, java.lang.Object viewName, java.lang.String httpMethod, java.lang.String version, grails.gorm.validation.ConstrainedProperty[] constraints) |
|
protected UrlMapping |
createUpdateActionResourceRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
protected UrlMapping |
createUpdateActionResourcesRestfulMapping(java.lang.String controllerName, java.lang.Object pluginName, java.lang.Object namespace, java.lang.String version, UrlMappingData urlData, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
private UrlMappingData |
createUrlMappingData(java.lang.String methodName, boolean responseCode) |
|
public UrlMapping |
delete(java.util.Map arguments, java.lang.String uri, groovy.lang.Closure callable) Matches the DELETE method |
|
public UrlMapping |
delete(java.util.Map arguments, java.lang.String uri) |
|
public UrlMapping |
delete(RegexUrlMapping regexUrlMapping) |
|
private java.lang.String |
establishFullURI(java.lang.String uri, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
public UrlMapping |
get(java.util.Map arguments, java.lang.String uri, groovy.lang.Closure callable) Matches the GET method |
|
public UrlMapping |
get(java.util.Map arguments, java.lang.String uri) |
|
public UrlMapping |
get(RegexUrlMapping regexUrlMapping) |
|
public java.lang.Object |
getAction() |
|
private java.lang.Object |
getActionName(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
public org.springframework.context.ApplicationContext |
getApplicationContext() |
|
public java.lang.Object |
getController() |
|
private java.lang.Object |
getControllerName(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
public java.lang.Object |
getException() |
|
private java.lang.Object |
getException(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
public GrailsApplication |
getGrailsApplication() |
|
private java.lang.Object |
getHttpMethod(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
protected MetaMappingInfo |
getMetaMappingInfo() |
|
public java.lang.Object |
getMethod() |
|
public java.lang.Object |
getNamespace() |
|
private java.lang.Object |
getNamespace(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
private java.lang.Object |
getParseRequest(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
public java.lang.Object |
getPlugin() |
|
private java.lang.Object |
getPluginName(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
public java.lang.Object |
getProperty(java.lang.String name) |
|
public java.lang.Object |
getRedirectInfo() |
|
private java.lang.Object |
getRedirectInfo(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
public javax.servlet.ServletContext |
getServletContext() |
|
private java.lang.Object |
getURI(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
private UrlMapping |
getURLMappingForNamedArgs(java.util.Map namedArguments, UrlMappingData urlData, java.lang.String mapping, boolean isResponseCode, java.util.List<grails.gorm.validation.ConstrainedProperty> constrainedList) |
|
public java.lang.Object |
getUri() |
|
public java.util.List<UrlMapping> |
getUrlMappings() |
|
private java.lang.Object |
getVariableFromNamedArgsOrBinding(java.util.Map namedArguments, java.util.Map bindingVariables, java.lang.String variableName, java.lang.Object defaultValue) |
|
private java.lang.Object |
getVersion(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
public java.lang.Object |
getView() |
|
private java.lang.Object |
getViewName(java.util.Map namedArguments, java.util.Map bindingVariables) |
|
public void |
group(java.lang.String uri, groovy.lang.Closure mappings) Define a group |
|
public UrlMapping |
head(java.util.Map arguments, java.lang.String uri, groovy.lang.Closure callable) Matches the HEAD method |
|
public UrlMapping |
head(java.util.Map arguments, java.lang.String uri) |
|
public UrlMapping |
head(RegexUrlMapping regexUrlMapping) |
|
private void |
invokeLastArgumentIfClosure(java.lang.Object[] args) |
|
public java.lang.Object |
invokeMethod(java.lang.String methodName, java.lang.Object arg) |
|
private java.lang.Object |
invokeMethodClosure(java.lang.String methodName, java.lang.Object arg) |
|
private java.lang.Object |
invokeMethodScript(java.lang.String methodName, java.lang.Object arg) |
|
private boolean |
isNotCoreMappingKey(java.lang.Object key) |
|
private boolean |
isResponseCode(java.lang.String s) |
|
public void |
members(groovy.lang.Closure callable) Define Url mapping members that are nested directly below the parent resource and resource id |
|
public void |
name(java.util.Map<java.lang.String, UrlMapping> m) |
|
public UrlMapping |
options(java.util.Map arguments, java.lang.String uri, groovy.lang.Closure callable) Matches the OPTIONS method |
|
public UrlMapping |
options(java.util.Map arguments, java.lang.String uri) |
|
public UrlMapping |
options(RegexUrlMapping regexUrlMapping) |
|
public UrlMapping |
patch(java.util.Map arguments, java.lang.String uri, groovy.lang.Closure callable) Matches the PATCH method |
|
public UrlMapping |
patch(java.util.Map arguments, java.lang.String uri) |
|
public UrlMapping |
patch(RegexUrlMapping regexUrlMapping) |
|
public UrlMapping |
post(java.util.Map arguments, java.lang.String uri, groovy.lang.Closure callable) Matches the POST method |
|
public UrlMapping |
post(java.util.Map arguments, java.lang.String uri) |
|
public UrlMapping |
post(RegexUrlMapping regexUrlMapping) |
|
void |
propertyMissing(java.lang.String name, java.lang.Object value) |
|
java.lang.Object |
propertyMissing(java.lang.String name) |
|
protected MetaMappingInfo |
pushNewMetaMappingInfo() |
|
public UrlMapping |
put(java.util.Map arguments, java.lang.String uri, groovy.lang.Closure callable) Matches the PUT method |
|
public UrlMapping |
put(java.util.Map arguments, java.lang.String uri) |
|
public UrlMapping |
put(RegexUrlMapping regexUrlMapping) |
|
public void |
setAction(java.lang.Object action) |
|
public void |
setController(java.lang.Object controller) |
|
public void |
setException(java.lang.Object exception) |
|
public void |
setMethod(java.lang.Object method) |
|
public void |
setNamespace(java.lang.Object namespace) |
|
public void |
setPlugin(java.lang.Object plugin) |
|
public void |
setRedirectInfo(java.lang.Object redirectInfo) |
|
public void |
setUri(java.lang.Object uri) |
|
public void |
setView(java.lang.String viewName) |
Methods inherited from class | Name |
---|---|
class groovy.lang.GroovyObjectSupport |
groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll(), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object) |
Define Url mapping collections that are nested directly below the parent resource (without the id)
callable
- The callableTakes a controller and creates the necessary URL mappings for a singular RESTful resource
controllerName
- The controller namepluginName
- The name of the pluginurlData
- The urlData instanceMatches the DELETE method
arguments
- The argumentsuri
- The URIMatches the GET method
arguments
- The argumentsuri
- The URIcallable
- the customizerDefine a group
uri
- The URImappings
- The mappingsMatches the HEAD method
arguments
- The argumentsuri
- The URIDefine Url mapping members that are nested directly below the parent resource and resource id
callable
- The callableMatches the OPTIONS method
arguments
- The argumentsuri
- The URIMatches the PATCH method
arguments
- The argumentsuri
- The URIMatches the POST method
arguments
- The argumentsuri
- The URIMatches the PUT method
arguments
- The argumentsuri
- The URI