info.magnolia.cms.taglibs
Class BaseContentTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by info.magnolia.cms.taglibs.BaseContentTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
BaseConditionalContentTag, ContentNodeIterator, ImgTag, Out, Set, SetNode

public abstract class BaseContentTag
extends javax.servlet.jsp.tagext.TagSupport

Base class for implementing content tags (e.g. ContentNodeIterator).

Version:
$Revision: 41137 $ ($Author: gjoseph $)
Author:
fgiust
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
BaseContentTag()
           
 
Method Summary
 Content getContentNode()
           
protected  String getContentNodeCollectionName()
           
protected  String getContentNodeName()
           
protected  Content getCurrentPage()
           
protected  Content getFirstMatchingNode()
          Get the first matching node containing a NodeData named nodeDataName.
protected  Content getFirtMatchingNode()
          Deprecated. Use getFirstMatchingNode() instead
protected  String getNodeDataName()
           
 String getPath()
           
 String getRepository()
           
 String getUuid()
           
 boolean isActpage()
           
 void release()
           
protected  Content resolveNode(Content currentPage)
           
 void setActpage(boolean actpage)
          Deprecated.  
 void setContentNode(Content content)
          The content object to use.
 void setContentNodeCollectionName(String name)
          Name of the collection holding the content node, e.g.
 void setContentNodeName(String name)
          Inside a "contentNodeIterator": if not set, the current content node is taken.
 void setInherit(boolean inherit)
          Inherit the value from parent pages, if not set in the current one.
 void setNodeDataName(String name)
          Set the node data name, e.g.
 void setPath(String path)
          The absolute path to the content.
 void setRepository(String repository)
          Used if the uuid or path attribute is set.
 void setUuid(String uuid)
          The uuid to use for finding the content.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseContentTag

public BaseContentTag()
Method Detail

setNodeDataName

public void setNodeDataName(String name)
Set the node data name, e.g. "mainText".


setContentNodeName

public void setContentNodeName(String name)
Inside a "contentNodeIterator": if not set, the current content node is taken. If set empty (contentNodeName=""), the top level content is taken. If specified, the named content node is taken. Outside a "contentNodeIterator": if not set or empty: the top level content is taken. If specified, the named content node is taken.


setContentNodeCollectionName

public void setContentNodeCollectionName(String name)
Name of the collection holding the content node, e.g. "mainColumnParagraphs".


setInherit

public void setInherit(boolean inherit)
Inherit the value from parent pages, if not set in the current one.


getFirtMatchingNode

protected Content getFirtMatchingNode()
Deprecated. Use getFirstMatchingNode() instead


getFirstMatchingNode

protected Content getFirstMatchingNode()
Get the first matching node containing a NodeData named nodeDataName.

Returns:
the active node, or the first matching one if nodedata is null and inherit is set.

getCurrentPage

protected Content getCurrentPage()

resolveNode

protected Content resolveNode(Content currentPage)

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport

isActpage

public boolean isActpage()

setActpage

public void setActpage(boolean actpage)
Deprecated. 

If true we work on the current active page instead of any other node.


getRepository

public String getRepository()

setRepository

public void setRepository(String repository)
Used if the uuid or path attribute is set. Defaults to "website".


getUuid

public String getUuid()

setUuid

public void setUuid(String uuid)
The uuid to use for finding the content. You must define the repository attribute if the content is not stored in the website repository.


getPath

public String getPath()

setPath

public void setPath(String path)
The absolute path to the content. You must define the repository attribute if the content is not stored in the website repository.


getContentNode

public Content getContentNode()

setContentNode

public void setContentNode(Content content)
The content object to use.


getNodeDataName

protected String getNodeDataName()

getContentNodeName

protected String getContentNodeName()

getContentNodeCollectionName

protected String getContentNodeCollectionName()


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