|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.plugins.web.api.ResponseMimeTypesApi
class ResponseMimeTypesApi extends java.lang.Object
Methods added to javax.servlet.http.HttpServletResponse for response format handling.
Property Summary | |
---|---|
MimeTypesApiSupport |
apiSupport
|
GrailsApplication |
grailsApplication
|
MimeType |
mimeTypes
|
Constructor Summary | |
ResponseMimeTypesApi()
Initialize with default settings |
|
ResponseMimeTypesApi(GrailsApplication grailsApplication, MimeType[] mimeTypes)
Initialize with settings provided by GrailsApplication and the given MimeType[] |
Method Summary | |
---|---|
java.lang.String
|
getFormat(javax.servlet.http.HttpServletResponse response)
Obtains the format to use for the response using either the file extension or the ACCEPT header |
MimeType[]
|
getMimeTypes()
|
MimeType[]
|
getMimeTypes(javax.servlet.http.HttpServletResponse response)
Gets the configured mime types for the response |
java.lang.Object
|
withFormat(javax.servlet.http.HttpServletResponse response, groovy.lang.Closure callable)
Allows for the response.withFormat { } syntax |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Property Detail |
---|
MimeTypesApiSupport apiSupport
GrailsApplication grailsApplication
MimeType mimeTypes
Constructor Detail |
---|
ResponseMimeTypesApi()
ResponseMimeTypesApi(GrailsApplication grailsApplication, MimeType[] mimeTypes)
grailsApplication
- The GrailsApplicationmimeTypes
- The mime types
Method Detail |
---|
java.lang.String getFormat(javax.servlet.http.HttpServletResponse response)
response
- The response
MimeType[] getMimeTypes()
MimeType[] getMimeTypes(javax.servlet.http.HttpServletResponse response)
response
- The response
java.lang.Object withFormat(javax.servlet.http.HttpServletResponse response, groovy.lang.Closure callable)
response
- The responsecallable
- A closure
Groovy Documentation