public class CmsMacroFormatterResolver extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
KEY_CMS
The parent macro key.
|
static java.lang.String |
KEY_ELEMENT
The element macro key.
|
static java.lang.String |
KEY_PARENT
The parent macro key.
|
static java.lang.String |
KEY_SETTINGS
The settings macro key.
|
static java.lang.String |
N_FORMATTER
Node name.
|
static java.lang.String |
N_FORMATTERS
Node name.
|
static java.lang.String |
N_MACRO
Node name.
|
static java.lang.String |
N_MACRO_NAME
Node name.
|
| Constructor and Description |
|---|
CmsMacroFormatterResolver(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected I_CmsFormatterBean |
getFormatterForMacro(java.lang.String macro)
Returns the formatter bean for the given macro string, or
null if none available. |
protected java.lang.Object |
getMacroBeanValue(java.lang.Object bean,
java.lang.String property)
Returns the property value read from the given JavaBean.
|
protected java.lang.String |
getMacroInput()
Returns the macro input string.
|
protected void |
printMacroValue(java.lang.String macro)
Prints the macro value to the output stream.
|
void |
resolve()
Resolves the macro.
|
public static final java.lang.String KEY_CMS
public static final java.lang.String KEY_ELEMENT
public static final java.lang.String KEY_PARENT
public static final java.lang.String KEY_SETTINGS
public static final java.lang.String N_FORMATTER
public static final java.lang.String N_FORMATTERS
public static final java.lang.String N_MACRO
public static final java.lang.String N_MACRO_NAME
public CmsMacroFormatterResolver(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
context - the page contextreq - the requestres - the responsepublic void resolve() throws java.io.IOException, CmsException
java.io.IOException - in case writing to the page context output stream failsCmsException - in case reading the macro settings failsprotected I_CmsFormatterBean getFormatterForMacro(java.lang.String macro)
null if none available.macro - the macroprotected java.lang.Object getMacroBeanValue(java.lang.Object bean, java.lang.String property)
bean - the JavaBean to read the property fromproperty - the property to readprotected java.lang.String getMacroInput()
protected void printMacroValue(java.lang.String macro) throws java.io.IOException
macro - the macro stringjava.io.IOException - in case writing to the page context output stream fails