|
||||||||||
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 String |
asString(List<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(Appendable out)
|
protected AggregationState |
getAggregationState()
|
protected String |
getI18BasenameFor(Content content)
|
protected String |
getMessage(Content context,
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 String |
getMessage(String basename,
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(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(Appendable out) throws IOException
render
in interface AuthoringUiComponent
IOException
protected abstract void doRender(Appendable out) throws IOException, javax.jcr.RepositoryException
IOException
javax.jcr.RepositoryException
public void postRender()
postRender
in interface AuthoringUiComponent
protected Content currentContent()
protected boolean shouldRender()
protected String getMessage(Content context, String key)
protected String getI18BasenameFor(Content content)
protected String getMessage(String basename, String key)
protected String asString(List<String> strings)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |