|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.templatingcomponents.components.AbstractAuthoringUiComponent
public abstract class AbstractAuthoringUiComponent
Common subclass for ui components, provides utility methods and defaults. Implementations should expose setter methods for their specific parameters (so that template-specific wrappers can set parameters). (no need to clutter things up with getters). Implementation might also expose static factory methods, which can take care of default values, i.e for labels.
Constructor Summary | |
---|---|
protected |
AbstractAuthoringUiComponent(ServerConfiguration server,
AggregationState aggregationState)
|
Method Summary | |
---|---|
protected java.lang.String |
asString(java.util.List<java.lang.String> strings)
Utility method - our current gui components (magnolia-gui) expect comma separated strings. |
protected Content |
currentContent()
Returns the "current content" from the aggregation state. |
protected abstract void |
doRender(java.lang.Appendable out)
|
protected AggregationState |
getAggregationState()
|
protected java.lang.String |
getI18BasenameFor(Content content)
|
protected java.lang.String |
getMessage(Content context,
java.lang.String key)
The given node, if it has a mgnl:template property in it's metadata, will be used in conjunction with TemplateManager and ParagraphManager to figure out the i18nBasename to use to translate this key. |
protected java.lang.String |
getMessage(java.lang.String basename,
java.lang.String key)
|
protected ServerConfiguration |
getServer()
|
void |
postRender()
Override this method if you need to "do something" once the component is rendered, i.e cleanup the context. |
void |
render(java.lang.Appendable out)
|
protected boolean |
shouldRender()
Override this method if the component needs to be rendered under different conditions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractAuthoringUiComponent(ServerConfiguration server, AggregationState aggregationState)
Method Detail |
---|
protected ServerConfiguration getServer()
protected AggregationState getAggregationState()
public void render(java.lang.Appendable out) throws java.io.IOException
render
in interface AuthoringUiComponent
java.io.IOException
protected abstract void doRender(java.lang.Appendable out) throws java.io.IOException, javax.jcr.RepositoryException
java.io.IOException
javax.jcr.RepositoryException
public void postRender()
postRender
in interface AuthoringUiComponent
protected Content currentContent()
protected boolean shouldRender()
protected java.lang.String getMessage(Content context, java.lang.String key)
protected java.lang.String getI18BasenameFor(Content content)
protected java.lang.String getMessage(java.lang.String basename, java.lang.String key)
protected java.lang.String asString(java.util.List<java.lang.String> strings)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |