Groovy Documentation

org.codehaus.groovy.grails.plugins.web.api
[Groovy] Class MimeTypesApiSupport

java.lang.Object
  org.codehaus.groovy.grails.plugins.web.api.MimeTypesApiSupport

@groovy.transform.CompileStatic
class MimeTypesApiSupport
extends java.lang.Object

Support class for dealing with calls to withFormat.

Authors:
Graeme Rocher
Since:
2.0


Method Summary
java.util.LinkedHashMap getDefinedFormats(groovy.lang.Closure callable)

protected java.lang.String lookupFormat(java.lang.Object formatProvider)

protected MimeType[] lookupMimeTypes(java.lang.Object formatProvider)

protected java.lang.Object resolveAllFormat(java.lang.Object formatProvider, java.util.LinkedHashMap formats)

implementation for resolving "all" format

java.lang.Object withFormat(javax.servlet.http.HttpServletRequest request, groovy.lang.Closure callable)

java.lang.Object withFormat(javax.servlet.http.HttpServletResponse response, groovy.lang.Closure callable)

protected java.lang.Object withFormatInternal(java.lang.Object formatProvider, java.util.LinkedHashMap formats)

 
Methods inherited from 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()
 

Method Detail

getDefinedFormats

java.util.LinkedHashMap getDefinedFormats(groovy.lang.Closure callable)


lookupFormat

@groovy.transform.CompileStatic(TypeCheckingMode.SKIP)
protected java.lang.String lookupFormat(java.lang.Object formatProvider)


lookupMimeTypes

@groovy.transform.CompileStatic(TypeCheckingMode.SKIP)
protected MimeType[] lookupMimeTypes(java.lang.Object formatProvider)


resolveAllFormat

protected java.lang.Object resolveAllFormat(java.lang.Object formatProvider, java.util.LinkedHashMap formats)
implementation for resolving "all" format
Parameters:
formatProvider
formats
Returns:


withFormat

java.lang.Object withFormat(javax.servlet.http.HttpServletRequest request, groovy.lang.Closure callable)


withFormat

java.lang.Object withFormat(javax.servlet.http.HttpServletResponse response, groovy.lang.Closure callable)


withFormatInternal

protected java.lang.Object withFormatInternal(java.lang.Object formatProvider, java.util.LinkedHashMap formats)


 

Groovy Documentation