Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.servlets.jsp.taglib
Class ContentSelectorTag

    java.lang.Object
      javax.servlet.jsp.tagext.TagSupport
          com.bea.p13n.servlets.jsp.TagSupport
              com.bea.p13n.servlets.jsp.taglib.ContentTagSupport
                  com.bea.p13n.servlets.jsp.taglib.ContentSelectorTag

All Implemented Interfaces:
  IterationTag, Serializable, Tag

public class ContentSelectorTag
extends ContentTagSupport

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 String` | `appendQuery` The query appended on to the end of the content selector query.
`protected String` | `home` Deprecated. No longer used.
`protected String` | `id` To store the value of id attribute.
`protected long` | `max` Limits the number of content items returned.
`protected String` | `query` A content query string that can be appended as an 'and' phrase to the content query in the contentSelector rule.
`protected String` | `selector` The name of the selector rule in the rule set.
`protected String` | `sortBy` A list of document attributes to sort the content by.

Fields inherited from class com.bea.p13n.servlets.jsp.taglib.ContentTagSupport
`cacheId, cacheScope, cacheTimeout, contextParams, useCache`

Fields inherited from class javax.servlet.jsp.tagext.TagSupport
`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
`ContentSelectorTag()`

Method Summary
`int` | `doStartTag()` Processes the start tag.
`String` | `getAppendQuery()` Gets the appendQuery that is added to the content selector query.
`String` | `getContentHome()` Deprecated. No longer used.
`protected Node[]` | `getDocuments()` Get the array of content documents.
`String` | `getId()` Gets the id to assign the results to.
`String` | `getMax()` The the max number of content items returned.
`String` | `getQuery()` Get the content query string that can be appended as an 'and' phrase to the content query in the contentSelector rule.
`protected AdviceRequest` | `getRequest()` Returns a ContentSelector AdviceRequest object after populating the following fields The current HTTP Request The current HTTP Session The current User A new TimeInstant A new Time A new Date A CONTENT_QUERY_STRING A CONTENT_QUERY_MAX_ITEMS A CONTENT_QUERY_SORT_BY A RULES_RULENAME_TO_FIRE A RULES_FILTER_CLASS_NAME
`String` | `getRule()` Get name of the selector rule in the ruleSet.
`String` | `getSortBy()` Gets the list of document attributes to sort the content by.
`void` | `release()` Reinitializes the instance data in this object.
`void` | `setAppendQuery(String anAppendQuery)` Sets the appendQuery to add to the content selector query.
`void` | `setContentHome(String aHome)` Deprecated. No longer used.
`void` | `setId(String anId)` Sets the id to assign the results to.
`void` | `setMax(long max)` Sets the max number of content items returned.
`void` | `setMax(String aNumber)` Sets the max number of content items returned.
`void` | `setQuery(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(String aSelector)` Set name of the selector rule in the rule set.
`void` | `setSortBy(String anOrderbyClause)` Sets the list of document attributes to sort the content by.

Methods inherited from class com.bea.p13n.servlets.jsp.taglib.ContentTagSupport
`checkContentCache, getCacheId, getCacheScope, getCacheTimeout, getContextParams, getUseCache, initRepositoryManager, setCacheId, setCacheScope, setCacheTimeout, setCacheTimeout, setContextParams, setContextParams, setInContentCache, setUseCache, setUseCache`

Methods inherited from class com.bea.p13n.servlets.jsp.TagSupport
`createAdviceRequest, createAdvisor`

Methods inherited from class javax.servlet.jsp.tagext.TagSupport
`doAfterBody, 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

### appendQuery

    protected String appendQuery

  The query appended on to the end of the content selector query.

### home

    protected String home

  Deprecated. No longer used.

  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 String id

  To store the value of id attribute.

### max

    protected long max

  Limits the number of content items returned.

### query

    protected String query

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

### selector

    protected String selector

  The name of the selector rule in the rule set.

### sortBy

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

Constructor Detail

### ContentSelectorTag

    public ContentSelectorTag()

Method Detail

### doStartTag

    public int doStartTag()
                   throws JspException

  Processes the start tag. Will set the 'id' to array of content objects found.

  Returns:
    The SKIP_BODY constant since this tag does not have a body.
  Throws:
    `JspException` - if an error. occurrs during content retrieval.

### getAppendQuery

    public String getAppendQuery()

  Gets the appendQuery that is added to the content selector query.

  Returns:
    The appendQuery.

### getContentHome

    public String getContentHome()

  Deprecated. No longer used.

  The name of the content home bean.

  Returns:
    The home name of the content manager bean.

### getDocuments

    protected Node[] getDocuments()
                           throws JspException

  Get the array of content documents.

  Returns:
    An array of content objects found. Returns an empty array if none found.
  Throws:
    `JspException` - If unable to get advice or if incomplete advice is received.

### getId

    public String getId()

  Gets the id to assign the results to.

  Returns:
    The id for the results.

### getMax

    public String getMax()

  The the max number of content items returned.

### getQuery

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

### getRequest

    protected AdviceRequest getRequest()
                                throws JspException

  Returns a ContentSelector AdviceRequest object after populating the following fields
  - The current HTTP Request
  - The current HTTP Session
  - The current User
  - A new TimeInstant
  - A new Time
  - A new Date
  - A CONTENT_QUERY_STRING
  - A CONTENT_QUERY_MAX_ITEMS
  - A CONTENT_QUERY_SORT_BY
  - A RULES_RULENAME_TO_FIRE
  - A RULES_FILTER_CLASS_NAME

  Returns:
    A ContentSelector AdviceRequest.
  Throws:
    `JspException` - If there is a problem creating the request.

### getRule

    public String getRule()

  Get name of the selector rule in the ruleSet.

  Returns:
    String The name of the selector rule.

### getSortBy

    public String getSortBy()

  Gets the list of document attributes to sort the content by.

  Returns:
    The order by clause to use to sort the results.

### release

    public void release()

  Reinitializes the instance data in this object.

  Specified by:
    `release` in interface `Tag`
  Overrides:
    `release` in class `ContentTagSupport`

### setAppendQuery

    public void setAppendQuery(String anAppendQuery)

  Sets the appendQuery to add to the content selector query.

  Parameters:
    `anAppendQuery` -

### setContentHome

    public void setContentHome(String aHome)

  Deprecated. No longer used.

  Sets the name of the content home bean.

  Parameters:
    `aHome` - The home name of the content manager bean.

### setId

    public void setId(String anId)

  Sets the id to assign the results to.

  Parameters:
    `anId` - The id for the results.

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

### setMax

    public void setMax(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.

### setQuery

    public void setQuery(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.

### setRule

    public void setRule(String aSelector)

  Set name of the selector rule in the rule set.

  Parameters:
    `aSelector` - The name of the selector rule.

### setSortBy

    public void setSortBy(String anOrderbyClause)

  Sets the list of document attributes to sort the content by.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved