BEA Systems, Inc.

com.beasys.commerce.p13n.tags
Class ContentQueryTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.beasys.commerce.axiom.p13n.jsp.tags.P13nTagSupport
              |
              +--com.beasys.commerce.p13n.tags.P13nContentTagSupport
                    |
                    +--com.beasys.commerce.p13n.tags.ContentQueryTag

public class ContentQueryTag
extends P13nContentTagSupport

The tag handler of the personalization jsp extension tag 'contentQuery'. The contentQuery tag allows arbitrary personalized content to be selected based on a content query.

See Also:
Serialized Form

Field Summary
protected  java.lang.String ADVICE_REQUEST_TYPE
          The fully qualified name of the type of AdviceRequest this tag uses.
protected  java.lang.String home
          The name of the content home bean.
protected  long max
          Limits the number of content items returned.
protected  java.lang.String query
          A content query string that can be appended as an 'and' phrase to the content query in the contentSelector rule.
protected  java.lang.String sortBy
          A list of document attributes to sort the content by.
 
Fields inherited from class com.beasys.commerce.p13n.tags.P13nContentTagSupport
cacheId, cacheScope, cacheTimeout, useCache
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Constructor Summary
ContentQueryTag()
           
 
Method Summary
 int doStartTag()
          Processes the start tag.
protected  void dumpAttributes()
           
protected  ContentQueryAdviceRequest getBasicRequest(Advisor anAdvisor)
          Returns a ContentQueryAdviceRequest object with only the basic fields filled out (User, HttpSession, HttpRequest, Now).
 java.lang.String getContenthome()
          Deprecated. As of WLPS 3.1, replaced by getContentHome()
 java.lang.String getContentHome()
          Gets the name of the content home bean.
protected  Content[] getDocuments()
          Get the array of content documents.
 java.lang.String getMax()
          Retrieves the max number of content items that can be returned.
 java.lang.String getQuery()
          Gets the content query string that is appended as an 'and' phrase to the content query in the contentSelector rule.
 java.lang.String getSortby()
          Deprecated. As of WLPS 3.1, replaced by getSortBy()
 java.lang.String getSortBy()
          Gets the list of document attributes to sort the content by.
 void release()
          Reinitializes the instance data in this object.
 void setContenthome(java.lang.String aHome)
          Deprecated. As of WLPS 3.1, replaced by setContentHome(String)
 void setContentHome(java.lang.String aHome)
          Sets the name of the content home bean.
 void setMax(long l)
          Sets the max number of content items returned.
 void setMax(java.lang.String aNumber)
          Sets the max number of content items returned.
 void setQuery(java.lang.String aQuery)
          Sets the content query string that can be appended as an 'and' phrase to the content query in the contentSelector rule.
 void setSortby(java.lang.String anOrderbyClause)
          Deprecated. As of WLPS 3.1, replaced by setSortBy(String)
 void setSortBy(java.lang.String anOrderbyClause)
          Sets the list of document attributes to sort the content by.
 
Methods inherited from class com.beasys.commerce.p13n.tags.P13nContentTagSupport
checkContentCache, getCacheId, getCacheScope, getCacheTimeout, getUseCache, setCacheId, setCacheScope, setCacheTimeout, setCacheTimeout, setInContentCache, setUseCache, setUseCache
 
Methods inherited from class com.beasys.commerce.axiom.p13n.jsp.tags.P13nTagSupport
getAdvisor, isJspBase, isP13NJspBase
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
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
 

Field Detail

max

protected long max
Limits the number of content items returned.

sortBy

protected java.lang.String sortBy
A list of document attributes to sort the content by. The syntax follows the SQL 'order by' clause. The sort specification is limited to a list of the metadata attribute names and the keywords ASC and DESC.

query

protected java.lang.String query
A content query string that can be appended as an 'and' phrase to the content query in the contentSelector rule.

home

protected java.lang.String home
The name of the content home bean. This maps to a JNDI name for the content home that handles a specific type of content and its provider.

ADVICE_REQUEST_TYPE

protected java.lang.String ADVICE_REQUEST_TYPE
The fully qualified name of the type of AdviceRequest this tag uses.
Constructor Detail

ContentQueryTag

public ContentQueryTag()
Method Detail

release

public void release()
Reinitializes the instance data in this object.
Overrides:
release in class P13nContentTagSupport

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Processes the start tag.
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspTagException - If the id variable is missing.

getDocuments

protected Content[] getDocuments()
                          throws javax.servlet.jsp.JspTagException
Get the array of content documents.
Returns:
An array of content objects found. Returns an empty array if none found.

getBasicRequest

protected ContentQueryAdviceRequest getBasicRequest(Advisor anAdvisor)
                                             throws javax.servlet.jsp.JspTagException
Returns a ContentQueryAdviceRequest object with only the basic fields filled out (User, HttpSession, HttpRequest, Now).
Parameters:
anAdvisor - A Advisor instance.
Returns:
A ContentQueryAdviceRequest.
Throws:
javax.servlet.jsp.JspTagException - If there is a problem creating the request.

dumpAttributes

protected void dumpAttributes()

getMax

public java.lang.String getMax()
Retrieves the max number of content items that can be returned.
Returns:
The max number of content items that can be returned.

setMax

public void setMax(java.lang.String aNumber)
Sets the max number of content items returned.
Parameters:
aNumber - String representing a number. If it isn't a number, max is left at the default.

setMax

public void setMax(long l)
Sets the max number of content items returned.
Parameters:
l - long representing a number.

setSortby

public void setSortby(java.lang.String anOrderbyClause)
Deprecated. As of WLPS 3.1, replaced by setSortBy(String)

Sets the list of document attributes to sort the content by.
Parameters:
anOrderbyClause - Designates how to sort the results.

setSortBy

public void setSortBy(java.lang.String anOrderbyClause)
Sets the list of document attributes to sort the content by.
Parameters:
anOrderbyClause - Designates how to sort the results.

getSortby

public java.lang.String getSortby()
Deprecated. As of WLPS 3.1, replaced by getSortBy()

Gets the list of document attributes to sort the content by.
Returns:
The sortBy string.

getSortBy

public java.lang.String getSortBy()
Gets the list of document attributes to sort the content by.
Returns:
The sortBy string.

setQuery

public void setQuery(java.lang.String aQuery)
Sets the content query string that can be appended as an 'and' phrase to the content query in the contentSelector rule.
Parameters:
aQuery - The query string.

getQuery

public java.lang.String getQuery()
Gets the content query string that is appended as an 'and' phrase to the content query in the contentSelector rule.
Returns:
The query string.

setContenthome

public void setContenthome(java.lang.String aHome)
Deprecated. As of WLPS 3.1, replaced by setContentHome(String)

Sets the name of the content home bean.
Parameters:
aHome - The EJB Home name for the content manager bean.

setContentHome

public void setContentHome(java.lang.String aHome)
Sets the name of the content home bean.
Parameters:
aHome - The EJB Home name for the content manager bean.

getContenthome

public java.lang.String getContenthome()
Deprecated. As of WLPS 3.1, replaced by getContentHome()

Gets the name of the content home bean.
Returns:
The EJB Home name for the content manager bean.

getContentHome

public java.lang.String getContentHome()
Gets the name of the content home bean.
Returns:
The EJB Home name for the content manager bean.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved