info.magnolia.templating.elements
Class AreaElement

java.lang.Object
  extended by info.magnolia.templating.elements.AbstractTemplatingElement
      extended by info.magnolia.templating.elements.AbstractContentTemplatingElement
          extended by info.magnolia.templating.elements.AreaElement
All Implemented Interfaces:
TemplatingElement

public class AreaElement
extends AbstractContentTemplatingElement

Renders an area and outputs a marker that instructs the page editor to place a bar at this location.


Field Summary
static String ATTRIBUTE_COMPONENT
           
static String ATTRIBUTE_COMPONENTS
           
static String CMS_AREA
           
 
Constructor Summary
AreaElement(ServerConfiguration server, RenderingContext renderingContext, RenderingEngine renderingEngine)
           
 
Method Summary
 void begin(Appendable out)
           
protected  void buildAdHocAreaDefinition()
           
 void end(Appendable out)
          Override this method if you need to "do something" once the component is rendered, i.e cleanup the context.
 AreaDefinition getArea()
           
 String getAvailableComponents()
           
 Map<String,Object> getContextAttributes()
           
 String getDescription()
           
 String getDialog()
           
 Boolean getEditable()
           
 String getLabel()
           
 Integer getMaxComponents()
           
 String getName()
           
 String getType()
           
 boolean isInherit()
           
protected  AreaDefinition resolveAreaDefinition()
           
protected  String resolveAvailableComponents()
           
protected  TemplateDefinition resolveTemplateDefinition()
           
 void setArea(AreaDefinition area)
           
 void setAvailableComponents(String availableComponents)
           
 void setContextAttributes(Map<String,Object> contextAttributes)
           
 void setDescription(String description)
           
 void setDialog(String dialog)
           
 void setEditable(Boolean editable)
           
 void setInherit(boolean inherit)
           
 void setLabel(String label)
           
 void setMaxComponents(Integer maxComponents)
           
 void setName(String name)
           
 void setType(String type)
           
protected  javax.jcr.Node tryToCreateAreaNode(javax.jcr.Node parentNode)
           
 
Methods inherited from class info.magnolia.templating.elements.AbstractContentTemplatingElement
getContent, getNodeIdentifier, getNodePath, getPassedContent, getPath, getWorkspace, restoreAttributesInWebContext, setAttributesInWebContext, setContent, setNodeIdentifier, setPath, setWorkspace
 
Methods inherited from class info.magnolia.templating.elements.AbstractTemplatingElement
currentContent, getDefinitionMessage, getInterfaceMessage, getRenderingContext, getServer, isAdmin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMS_AREA

public static final String CMS_AREA
See Also:
Constant Field Values

ATTRIBUTE_COMPONENT

public static final String ATTRIBUTE_COMPONENT
See Also:
Constant Field Values

ATTRIBUTE_COMPONENTS

public static final String ATTRIBUTE_COMPONENTS
See Also:
Constant Field Values
Constructor Detail

AreaElement

public AreaElement(ServerConfiguration server,
                   RenderingContext renderingContext,
                   RenderingEngine renderingEngine)
Method Detail

begin

public void begin(Appendable out)
           throws IOException,
                  RenderException
Specified by:
begin in interface TemplatingElement
Overrides:
begin in class AbstractTemplatingElement
Throws:
IOException
RenderException

buildAdHocAreaDefinition

protected void buildAdHocAreaDefinition()

end

public void end(Appendable out)
         throws RenderException
Description copied from class: AbstractTemplatingElement
Override this method if you need to "do something" once the component is rendered, i.e cleanup the context.

Specified by:
end in interface TemplatingElement
Overrides:
end in class AbstractTemplatingElement
Throws:
RenderException

tryToCreateAreaNode

protected javax.jcr.Node tryToCreateAreaNode(javax.jcr.Node parentNode)
                                      throws RenderException
Throws:
RenderException

resolveAreaDefinition

protected AreaDefinition resolveAreaDefinition()

resolveTemplateDefinition

protected TemplateDefinition resolveTemplateDefinition()
                                                throws RenderException
Throws:
RenderException

resolveAvailableComponents

protected String resolveAvailableComponents()

getName

public String getName()

setName

public void setName(String name)

getArea

public AreaDefinition getArea()

setArea

public void setArea(AreaDefinition area)

getAvailableComponents

public String getAvailableComponents()

setAvailableComponents

public void setAvailableComponents(String availableComponents)

getType

public String getType()

setType

public void setType(String type)

getDialog

public String getDialog()

setDialog

public void setDialog(String dialog)

getLabel

public String getLabel()

setLabel

public void setLabel(String label)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

isInherit

public boolean isInherit()

setInherit

public void setInherit(boolean inherit)

getEditable

public Boolean getEditable()

setEditable

public void setEditable(Boolean editable)

getContextAttributes

public Map<String,Object> getContextAttributes()

setContextAttributes

public void setContextAttributes(Map<String,Object> contextAttributes)

getMaxComponents

public Integer getMaxComponents()

setMaxComponents

public void setMaxComponents(Integer maxComponents)


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.