org.opencms.jsp
Class CmsJspTagContentCheck

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byorg.opencms.jsp.CmsJspTagContentCheck
All Implemented Interfaces:
IterationTag, Serializable, Tag

public class CmsJspTagContentCheck
extends TagSupport

Used to check the availablity of an XML content item for conditional display.

Since:
6.0.0
Version:
$Revision: 1.13 $
Author:
Alexander Kandzior
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
CmsJspTagContentCheck()
           
 
Method Summary
static boolean contentCheckTagAction(String elementList, String prefix, boolean checkall, boolean checknone, A_CmsXmlDocument content, Locale locale)
          Internal action method to check the elements from the provided XML content item.
 int doStartTag()
           
 String getIfexists()
          Returns the list of elements to check.
 String getIfexistsall()
          Returns the list of elements to check.
 String getIfexistsnone()
          Returns the list of elements to check.
 String getIfexistsone()
          Returns the list of elements to check.
 void release()
           
 void setIfexists(String elementList)
          Sets the list of elements to check for.
 void setIfexistsall(String elementList)
          Sets the list of elements to check for.
 void setIfexistsnone(String elementList)
          Sets the list of elements to check for.
 void setIfexistsone(String elementList)
          Sets the list of elements to check for.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, 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

CmsJspTagContentCheck

public CmsJspTagContentCheck()
Method Detail

contentCheckTagAction

public static boolean contentCheckTagAction(String elementList,
                                            String prefix,
                                            boolean checkall,
                                            boolean checknone,
                                            A_CmsXmlDocument content,
                                            Locale locale)
Internal action method to check the elements from the provided XML content item.

Parameters:
elementList - the list of elements to check for
prefix - the Xpath prefix to append the elements to (in case of nested schemas)
checkall - flag to indicate that all elements should be checked
checknone - flag to indicate that the check is done for nonexisting elements
content - the XML content document to check the elements from
locale - the locale to check the element for
Returns:
true if the test succeeds, false if the test fails

doStartTag

public int doStartTag()
               throws JspException
Throws:
JspException
See Also:
Tag.doStartTag()

getIfexists

public String getIfexists()
Returns the list of elements to check.

Returns:
the list of elements to check

getIfexistsall

public String getIfexistsall()
Returns the list of elements to check.

Returns:
the list of elements to check

getIfexistsnone

public String getIfexistsnone()
Returns the list of elements to check.

Returns:
the list of elements to check

getIfexistsone

public String getIfexistsone()
Returns the list of elements to check.

Returns:
the list of elements to check

release

public void release()
See Also:
Tag.release()

setIfexists

public void setIfexists(String elementList)
Sets the list of elements to check for.

Parameters:
elementList - the list of elements to check for

setIfexistsall

public void setIfexistsall(String elementList)
Sets the list of elements to check for.

Parameters:
elementList - the list of elements to check for

setIfexistsnone

public void setIfexistsnone(String elementList)
Sets the list of elements to check for.

Parameters:
elementList - the list of elements to check for

setIfexistsone

public void setIfexistsone(String elementList)
Sets the list of elements to check for.

Parameters:
elementList - the list of elements to check for