@groovy.transform.CompileStatic @groovy.transform.InheritConstructors @groovy.util.logging.Slf4j class DefaultGrailsJsonViewHelper extends DefaultJsonViewHelper
Extended version of DefaultGrailsViewHelper with methods specific to JSON view rendering
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
BEFORE_CLOSURE |
|
static java.lang.String |
PROCESSED_OBJECT_VARIABLE |
Fields inherited from class | Fields |
---|---|
class DefaultJsonViewHelper |
DEFAULT_EXCLUDES, DEFAULT_GORM_EXCLUDES, DEFAULT_VALIDATEABLE_EXCLUDES, NULL_OUTPUT, PAGINATION_MAX, PAGINATION_OFFSET, PAGINATION_ORDER, PAGINATION_RESROUCE, PAGINATION_SORT, PAGINATION_TOTAL, TO_STRING_TYPES |
Type Params | Return Type | Name and description |
---|---|---|
|
protected JsonWritable |
getIterableWritable(java.lang.Iterable object, java.util.Map arguments, groovy.lang.Closure customizer, java.util.Map<java.lang.Object, JsonOutput.JsonWritable> processedObjects, java.lang.String path = "") |
|
protected JsonWritable |
getIterableWritable(java.lang.Iterable object, groovy.lang.Closure forEach) |
|
protected JsonWritable |
getMapWritable(java.util.Map object, java.util.Map arguments, groovy.lang.Closure customizer, java.util.Map<java.lang.Object, JsonOutput.JsonWritable> processedObjects) |
|
protected void |
handleValue(java.lang.Object value, java.io.Writer out, java.util.Map arguments, groovy.lang.Closure customizer, java.util.Map<java.lang.Object, JsonOutput.JsonWritable> processedObjects, java.lang.String path = "") |
|
protected java.util.Map<java.lang.Object, JsonOutput.JsonWritable> |
initializeProcessedObjects(groovy.lang.Binding binding) |
|
void |
inline(java.lang.Object object, java.util.Map arguments = Collections.emptyMap(, groovy.lang.Closure customizer = null, StreamingJsonDelegate jsonDelegate) |
|
void |
inline(java.lang.Object object, java.util.Map arguments = Collections.emptyMap(, groovy.lang.Closure customizer = null) |
|
void |
inline(java.lang.Object object, groovy.lang.Closure customizer) |
|
protected boolean |
isSimpleValue(java.lang.Object value) |
<T> |
T |
model(java.lang.String name, java.lang.Class<T> targetType = Object) Obtains a model value for the given name and type |
|
protected void |
populateModelWithViewState(java.util.Map model) |
|
protected GrailsView |
prepareWritable(groovy.text.Template childTemplate, java.util.Map model) |
|
protected void |
process(StreamingJsonDelegate jsonDelegate, org.grails.datastore.mapping.model.PersistentEntity entity, java.lang.Object object, java.util.Map<java.lang.Object, JsonOutput.JsonWritable> processedObjects, java.util.List<java.lang.String> incs, java.util.List<java.lang.String> excs, java.lang.String path, boolean isDeep, boolean renderNulls, java.util.List<java.lang.String> expandProperties = [], boolean includeAssociations = true, groovy.lang.Closure customizer = null) |
|
protected void |
processSimple(StreamingJsonDelegate jsonDelegate, java.lang.Object object, java.util.Map<java.lang.Object, JsonOutput.JsonWritable> processedObjects, java.util.List<java.lang.String> incs, java.util.List<java.lang.String> excs, java.lang.String path, java.lang.Boolean renderNulls, groovy.lang.Closure customizer = null) |
|
protected void |
processSimpleProperty(StreamingJsonDelegate jsonDelegate, org.grails.datastore.mapping.model.PersistentProperty prop, java.lang.String propertyName, java.lang.Object value) |
|
JsonWritable |
render(java.lang.Object object, groovy.lang.Closure customizer) |
|
JsonWritable |
render(java.lang.Object object, java.util.Map arguments = Collections.emptyMap(, groovy.lang.Closure customizer = null ) |
|
JsonWritable |
render(java.util.Map arguments) |
|
JsonWritable |
renderChildTemplate(groovy.text.Template template, java.lang.Class modelType, java.lang.Object modelValue) |
Methods inherited from class | Name |
---|---|
class DefaultJsonViewHelper |
buildPaginateParams, defaultPaginateParams, findEntity, getExcludes, getExpandProperties, getGenerator, getGenericType, getIncludes, getJsonStackTrace, getLastOffset, getNextOffset, getPaginationLinks, getPaginationLinks, getPrevOffset, getRenderNulls, includeAssociations, isSimpleType, isStringType, paramsWithOffset |
class DefaultGrailsViewHelper |
ensureAbsolute, getContextPath, getLinkGenerator, getServerBaseURL, link, link, message, resource |
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() |
Obtains a model value for the given name and type
name
- The nametargetType
- The type