@groovy.transform.CompileStatic @groovy.util.logging.Slf4j class WithCodecHelper extends java.lang.Object
Helper methods for withCodec feature.
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
ALL_CODECS_FALLBACK_KEY_NAME |
all is the key to set all codecs at once |
static java.lang.String |
OUT_AND_EXPRESSION_CODECS_FALLBACK_KEY_NAME |
name is the key to set out and expression codecs at once |
Constructor and description |
---|
WithCodecHelper
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static Builder |
createOutputStackAttributesBuilder(java.lang.Object codecInfo, GrailsApplication grailsApplication) Creates a builder for building a new OutputEncodingStackAttributes instance |
|
static Encoder |
lookupEncoder(GrailsApplication grailsApplication, java.lang.String codecName) |
|
static java.util.Map<java.lang.String, java.lang.Object> |
makeSettingsCanonical(java.lang.Object codecInfo) |
|
static java.util.Map<java.lang.String, java.lang.Object> |
mergeSettingsAndMakeCanonical(java.lang.Object currentSettings, java.util.Map<java.lang.String, java.lang.Object> parentSettings) |
<T> |
static T |
withCodec(GrailsApplication grailsApplication, java.lang.Object codecInfo, groovy.lang.Closure<T> closure) Executes closure with given codecs. |
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() |
all is the key to set all codecs at once
name is the key to set out and expression codecs at once
Creates a builder for building a new OutputEncodingStackAttributes instance
codecInfo
- the codec info, see withCodec method for more infograilsApplication
- the grails applicationExecutes closure with given codecs. codecInfo parameter can be a single String value or a java.util.Map. When it's a single String value, "out", "expression" and "taglib" get set with the given codec When it's a java.util.Map, these keys get used:
grailsApplication
- the grailsApplication instancecodecInfo
- this parameter is explained aboveclosure
- the closure to execute