|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.ext.beans.BeansWrapper freemarker.template.DefaultObjectWrapper info.magnolia.freemarker.models.MagnoliaObjectWrapper
public class MagnoliaObjectWrapper
A FreeMarker ObjectWrapper that knows about Magnolia specific objects.
Field Summary |
---|
Fields inherited from class freemarker.ext.beans.BeansWrapper |
---|
CAN_NOT_UNWRAP, EXPOSE_ALL, EXPOSE_NOTHING, EXPOSE_PROPERTIES_ONLY, EXPOSE_SAFE |
Fields inherited from interface freemarker.template.ObjectWrapper |
---|
BEANS_WRAPPER, DEFAULT_WRAPPER, SIMPLE_WRAPPER |
Constructor Summary | |
---|---|
MagnoliaObjectWrapper(FreemarkerConfig freemarkerConfig)
|
Method Summary | |
---|---|
protected freemarker.ext.util.ModelFactory |
getModelFactory(Class clazz)
Checks the ModelFactory instances registered in FreemarkerConfig, then the default ones. |
protected freemarker.template.SimpleDate |
handleCalendar(Calendar cal)
Deprecated. since 4.3 use CalendarModel instead. |
Object |
unwrap(freemarker.template.TemplateModel model,
Class hint)
Unwraps our custom wrappers, let the default wrapper do the rest. |
freemarker.template.TemplateModel |
wrap(Object obj)
|
Methods inherited from class freemarker.template.DefaultObjectWrapper |
---|
convertArray, handleUnknownType, wrapDomNode |
Methods inherited from class freemarker.ext.beans.BeansWrapper |
---|
coerceBigDecimal, coerceBigDecimals, coerceBigDecimals, getDefaultDateType, getDefaultInstance, getEnumModels, getInstance, getOuterIdentity, getStaticModels, isExposeFields, isSimpleMapWrapper, isStrict, newInstance, setDefaultDateType, setExposeFields, setExposureLevel, setMethodsShadowItems, setNullModel, setOuterIdentity, setSimpleMapWrapper, setStrict, setUseCache, unwrap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MagnoliaObjectWrapper(FreemarkerConfig freemarkerConfig)
Method Detail |
---|
public Object unwrap(freemarker.template.TemplateModel model, Class hint) throws freemarker.template.TemplateModelException
unwrap
in class freemarker.ext.beans.BeansWrapper
freemarker.template.TemplateModelException
public freemarker.template.TemplateModel wrap(Object obj) throws freemarker.template.TemplateModelException
wrap
in interface freemarker.template.ObjectWrapper
wrap
in class freemarker.template.DefaultObjectWrapper
freemarker.template.TemplateModelException
protected freemarker.ext.util.ModelFactory getModelFactory(Class clazz)
BeansModelCache
,
which is itself called by BeansWrapper.wrap(java.lang.Object)
.
These factories are cached by Freemarker, so this method only gets called
once per type of object.
getModelFactory
in class freemarker.ext.beans.BeansWrapper
DEFAULT_MODEL_FACTORIES
,
FreemarkerConfig
protected freemarker.template.SimpleDate handleCalendar(Calendar cal)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |