BEA Systems, Inc.

com.beasys.commerce.p13n.tags
Class ContentSelectorTag

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.ContentSelectorTag

public class ContentSelectorTag
extends P13nContentTagSupport

The tag handler of the personalization jsp extension tag 'contentSelector'. The contentSelector tag allows arbitrary personalized content to be selected based on user profile.

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  java.lang.String id
           
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 ruleSet
          The uri to the rulesheet containing the selector rule.
protected  java.lang.String selector
          The name of the selector rule in the ruleSet.
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
ContentSelectorTag()
           
 
Method Summary
 int doStartTag()
          Processes the start tag.
protected  ContentSelectorAdviceRequest getBasicRequest(Advisor anAdvisor)
          Returns a ContentSelectorAdviceRequest 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()
          The name of the content home bean.
protected  Content[] getDocuments()
          Get the array of content documents.
 java.lang.String getId()
          Gets the id to assign the results to.
 java.lang.String getMax()
          The the max number of content items returned.
 java.lang.String getQuery()
          Get the content query string that can be appended as an 'and' phrase to the content query in the contentSelector rule.
 java.lang.String getRule()
          Get name of the selector rule in the ruleSet.
 java.lang.String getRuleset()
          Deprecated. As of WLPS 3.1, replaced by getRuleSet()
 java.lang.String getRuleSet()
          Get uri to the rule set containing the selector 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()
          Reset any variables.
 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 setId(java.lang.String anId)
          Sets the id to assign the results to.
 void setMax(long max)
          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 setRule(java.lang.String aSelector)
          Set name of the selector rule in the ruleSet.
 void setRuleset(java.lang.String aRuleSetURI)
          Deprecated. As of WLPS 3.1, replaced by setRuleSet(String)
 void setRuleSet(java.lang.String aRuleSetURI)
          Set uri to the rule set containing the selector 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, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ruleSet

protected java.lang.String ruleSet
The uri to the rulesheet containing the selector rule.

selector

protected java.lang.String selector
The name of the selector rule in the ruleSet.

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.

id

protected java.lang.String id

ADVICE_REQUEST_TYPE

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

ContentSelectorTag

public ContentSelectorTag()
Method Detail

release

public void release()
Description copied from class: P13nContentTagSupport
Reset any variables.
Overrides:
release in class P13nContentTagSupport

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Processes the start tag. Will set the 'id' to array of content objects found.
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 ContentSelectorAdviceRequest getBasicRequest(Advisor anAdvisor)
                                                throws javax.servlet.jsp.JspTagException
Returns a ContentSelectorAdviceRequest object with only the basic fields filled out (User, HttpSession, HttpRequest, Now).
Parameters:
anAdvisor - A Advisor instance.
Returns:
A filled in ContentSelectorAdviceRequest object.
Throws:
javax.servlet.jsp.JspTagException - If there is a problem creating the request.

setRuleset

public void setRuleset(java.lang.String aRuleSetURI)
Deprecated. As of WLPS 3.1, replaced by setRuleSet(String)

Set uri to the ruleSet containing the selector rule.
Parameters:
aRuleSetURI - The URI identifying the rule set to use.

setRuleSet

public void setRuleSet(java.lang.String aRuleSetURI)
Set uri to the rule set containing the selector rule.
Parameters:
aRuleSetURI - The URI identifying the rule set to use.

getRuleset

public java.lang.String getRuleset()
Deprecated. As of WLPS 3.1, replaced by getRuleSet()

Get uri to the ruleSet containing the selector rule.
Returns:
String The URI identifying the rule set to use.

getRuleSet

public java.lang.String getRuleSet()
Get uri to the rule set containing the selector rule.
Returns:
String The URI identifying the rule set to use.

setRule

public void setRule(java.lang.String aSelector)
Set name of the selector rule in the ruleSet.
Parameters:
aSelector - The name of the selector rule.

getRule

public java.lang.String getRule()
Get name of the selector rule in the ruleSet.
Returns:
String The name of the selector rule.

getMax

public java.lang.String getMax()
The the max number of content items returned.
Parameters:
Strin - 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 max)
Sets the max number of content items returned.
Parameters:
max - A long that represents the max number of content items that can be returned.

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 - The order by clause to use 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 - The order by clause to use 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 order by clause to use to sort the results.

getSortBy

public java.lang.String getSortBy()
Gets the list of document attributes to sort the content by.
Returns:
The order by clause to use to sort the results.

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 to append.

getQuery

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

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 home name of the content manager bean.

setContentHome

public void setContentHome(java.lang.String aHome)
Sets the name of the content home bean.
Parameters:
aHome - The home name of 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 home name of the content manager bean.

getContentHome

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

setId

public void setId(java.lang.String anId)
Sets the id to assign the results to.
Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport
Parameters:
anId - The id for the results.

getId

public java.lang.String getId()
Gets the id to assign the results to.
Overrides:
getId in class javax.servlet.jsp.tagext.TagSupport
Returns:
The id for the results.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved