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

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

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

    public class ContentQueryTag

extends ContentTagSupport

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.

Field Summary
`protected String` | `home` Deprecated Not used any longer
`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` | `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, searchPaths, useCache`

Constructor Summary
`ContentQueryTag()`

Method Summary
`int` | `doStartTag()` Processes the start tag.
`String` | `getContentHome()` Deprecated Not used any more.
`protected Node[]` | `getDocuments()` Get the array of content documents.
`String` | `getMax()` Retrieves the max number of content items that can be returned.
`String` | `getQuery()` Gets the content query string that is appended as an 'and' phrase to the content query in the contentSelector rule.
`protected AdviceRequest` | `getRequest()` Returns a ContentQuery 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
`String` | `getSortBy()` Gets the list of document attributes to sort the content by.
`void` | `release()` Reinitializes the instance data in this object.
`void` | `setContentHome(String aHome)` Deprecated Not used any more.
`void` | `setMax(long l)` 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` | `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, getSearchPaths, getUseCache, initRepositoryManager, secureContentResults, setCacheId, setCacheScope, setCacheTimeout, setCacheTimeout, setContextParams, setContextParams, setInContentCache, setSearchPaths, setSearchPaths, setUseCache, setUseCache`

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

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

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

### home

    protected String home

  Deprecated Not used any longer
  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.

Constructor Detail

### ContentQueryTag

    public ContentQueryTag()

Method Detail

### getMax

    public 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(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(String anOrderbyClause)

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

  Parameters
    `anOrderbyClause` - Designates how to sort the results.

### getSortBy

    public String getSortBy()

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

  Returns
    The sortBy string.

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

### getQuery

    public 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(String aHome)

  Deprecated Not used any more.

  Sets the name of the content home bean.

  Parameters
    `aHome` - The EJB Home name for the content manager bean.

### getContentHome

    public String getContentHome()

  Deprecated Not used any more.

  Gets the name of the content home bean.

  Returns
    The EJB Home name for 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`

### getRequest

    protected AdviceRequest getRequest()
                                throws JspException

  Returns a ContentQuery 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

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

### doStartTag

    public int doStartTag()
                   throws JspException

  Processes the start tag.

  Returns
    The SKIP_BODY constant since this tag does not have a body.
  Throws
    `JspException` - If the id variable is missing or if an error. occurrs during content retrieval.

### release

    public void release()

  Reinitializes the instance data in this object.

  Overrides:
    `release` in class `ContentTagSupport`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved