Provides the "respond" method in controllers
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
PROPERTY_RESPONSE_FORMATS |
|
protected ControllersApi |
controllersApi |
|
protected ControllersMimeTypesApi |
mimeTypesApi |
|
protected RendererRegistry |
rendererRegistry |
Type | Name and description |
---|---|
GroovyPageLocator |
groovyPageLocator |
ProxyHandler |
proxyHandler |
ResponseMimeTypesApi |
responseMimeTypesApi |
Constructor and description |
---|
ControllersRestApi
(RendererRegistry rendererRegistry, ControllersApi controllersApi, ControllersMimeTypesApi mimeTypesApi) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected java.util.List<java.lang.String> |
calculateFormats(java.lang.Object controller, java.lang.String actionName, java.lang.Object value, java.util.Map args) |
|
protected java.util.List<java.lang.String> |
getDefaultResponseFormats(java.lang.Object value) |
|
protected org.springframework.validation.Errors |
getDomainErrors(java.lang.Object object) |
|
protected MimeType[] |
getResponseFormat(javax.servlet.http.HttpServletResponse response) |
<T> |
java.lang.Object |
respond(java.lang.Object controller, java.util.Map args, java.lang.Object value) Same as ControllersRestApi.respond, but here to support Groovy named arguments |
|
java.lang.Object |
respond(java.lang.Object controller, java.util.Map namedArgs, java.util.Map value) The respond method will attempt to delivery an appropriate response for the requested response format and Map value. |
|
java.lang.Object |
respond(java.lang.Object controller, java.lang.Object value, java.util.Map args = [:]) The respond method will attempt to delivery an appropriate response for the requested response format and value. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Same as ControllersRestApi.respond, but here to support Groovy named arguments
The respond method will attempt to delivery an appropriate response for the requested response format and Map value. If the value is null then a 404 will be returned. Otherwise the RendererRegistry will be consulted for an appropriate response renderer for the requested response format.
controller
- The controllervalue
- The valuenamedArgs
- The argumentsThe respond method will attempt to delivery an appropriate response for the requested response format and value. If the value is null then a 404 will be returned. Otherwise the RendererRegistry will be consulted for an appropriate response renderer for the requested response format.
controller
- The controllervalue
- The valueargs
- The argumentsGroovy Documentation