info.magnolia.templating.elements
Class AbstractContentTemplatingElement
java.lang.Object
info.magnolia.templating.elements.AbstractTemplatingElement
info.magnolia.templating.elements.AbstractContentTemplatingElement
- All Implemented Interfaces:
- TemplatingElement
- Direct Known Subclasses:
- AreaElement, ComponentElement, InitElement
public abstract class AbstractContentTemplatingElement
- extends AbstractTemplatingElement
Abstract base class for elements that operate on a specified piece of content.
- Version:
- $Id$
Constructor Summary |
AbstractContentTemplatingElement(info.magnolia.cms.beans.config.ServerConfiguration server,
info.magnolia.rendering.context.RenderingContext renderingContext)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractContentTemplatingElement
public AbstractContentTemplatingElement(info.magnolia.cms.beans.config.ServerConfiguration server,
info.magnolia.rendering.context.RenderingContext renderingContext)
getNodePath
protected String getNodePath(javax.jcr.Node node)
throws info.magnolia.rendering.engine.RenderException
- Throws:
info.magnolia.rendering.engine.RenderException
getPassedContent
protected javax.jcr.Node getPassedContent()
throws info.magnolia.rendering.engine.RenderException
- Returns the content passed to the element (content or workspace/path attribute) or null if nothing was passed.
- Throws:
info.magnolia.rendering.engine.RenderException
getContent
public javax.jcr.Node getContent()
setContent
public void setContent(javax.jcr.Node node)
getWorkspace
public String getWorkspace()
setWorkspace
public void setWorkspace(String workspace)
getNodeIdentifier
public String getNodeIdentifier()
setNodeIdentifier
public void setNodeIdentifier(String nodeIdentifier)
getPath
public String getPath()
setPath
public void setPath(String path)
setAttributesInWebContext
protected void setAttributesInWebContext(Map<String,Object> attributes,
int scope)
- Sets attributes in web context under the specified scope. If an attribute already exists its value will be overwritten
with the new one and the old value saved for subsequent restore.
- Parameters:
scope
- one of Context.APPLICATION_SCOPE
Context.SESSION_SCOPE
Context.LOCAL_SCOPE
.
restoreAttributesInWebContext
protected void restoreAttributesInWebContext(Map<String,Object> attributes,
int scope)
- Restores the original values of attributes in web context under the specified scope.
- Parameters:
scope
- one of Context.APPLICATION_SCOPE
Context.SESSION_SCOPE
Context.LOCAL_SCOPE
.
Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.