Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 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.content.advislets
Class ContentQueryAdvisletImpl

    java.lang.Object
      com.bea.p13n.advisor.AbstractAdvislet
          com.bea.p13n.content.advislets.ContentQueryAdvisletImpl

All Implemented Interfaces
  AdviceConstants, AdviceRequestConstants, Advislet, AdvisletChainElement, Serializable

    public final class ContentQueryAdvisletImpl

extends AbstractAdvislet
implements Serializable

This class is the implementation class for a ContentQuery Advislet. This Advislet can issue queries against the content management system and retrieve content.

Required inputs to the Advislet are:
HTTP_SESSION - the Session object.

HTTP_REQUEST - The Request object.

USER - the User object.

CONTENT_QUERY_MAX_ITEMS - the maximum number of items to return (Long).

CONTENT_QUERY_SORT_BY - how the items should be sorted (String).

CONTENT_QUERY_CONTEXT_PARAMS (optional)- any additional parameters to put into the content search (Map).

QUERY_VERSIONED_CONTENT - boolean to determine if query should search versioned content repository

In addition either of these properties should be specified. Failure to specify either of these properties will result in an empty content query being returned. CONTENT_QUERY_NODE - the content query (as XML) to execute (ContentQueryAdvice).

CONTENT_QUERY_STRING - the content query (as a String) to execute (String).

See Also
  Serialized Form

Field Summary

Fields inherited from class com.bea.p13n.advisor.AbstractAdvislet
`advisletMetadata, advisor, parametersMap`

Fields inherited from interface com.bea.p13n.advisor.AdviceRequestConstants
`CATALOG_QUERY_WRAPPER, CONTENT_APPEND_QUERY_STRING, CONTENT_MANAGER, CONTENT_MANAGER_HOME, CONTENT_QUERY_CONTEXT_PARAMS, CONTENT_QUERY_MAX_ITEMS, CONTENT_QUERY_NODE, CONTENT_QUERY_SORT_BY, CONTENT_QUERY_STRING, CONTENT_QUERY_VERSIONED_CONTENT, CONTENT_SEARCH_PATHS, CONTEXT_HANDLER, DATE, HTTP_REQUEST, HTTP_SESSION, NOW, RULES_FILTER_CLASS, RULES_FILTER_CLASS_NAME, RULES_INPUT_OBJECTS, RULES_RULENAME_TO_FIRE, RULES_RULESET_NAME, SHOPPING_CART, TIME, TIME_INSTANT, USER`

Fields inherited from interface com.bea.p13n.advisor.AdviceConstants
`RESULTS`

Constructor Summary
`ContentQueryAdvisletImpl(Advisor advisor, Metadata metadata)`

Method Summary
`Advice` | `getAdvice(AdviceRequest adviceRequest)` This method makes recommendations based the AdviceRequest passed in.
`Object[]` | `getRequiredAttributes()` Returns an array of required attributes for the advislet.

Methods inherited from class com.bea.p13n.advisor.AbstractAdvislet
`getAdvisor, getMetadata, initialize, toString, validateAdviceRequest`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ContentQueryAdvisletImpl

    public ContentQueryAdvisletImpl(Advisor advisor,
                                    Metadata metadata)

Method Detail

### getAdvice

    public Advice getAdvice(AdviceRequest adviceRequest)
                     throws IllegalArgumentException,
                            AdvisorException

  This method makes recommendations based the AdviceRequest passed in.

  Specified by:
    `getAdvice` in interface `Advislet`
  Overrides:
    `getAdvice` in class `AbstractAdvislet`
  Parameters
    `adviceRequest` - The AdviceRequest used to make a recommendation.
  Returns
    The advice which contain the recommendations based on the type of request made.
  Throws
    `IllegalArgumentException` - thrown if the adviceRequest parameter is null or if it is an unsupported type.
    `AdvisorException` - thrown on an error when processing the request.

### getRequiredAttributes

    public Object[] getRequiredAttributes()

  Description copied from interface: `Advislet`
  Returns an array of required attributes for the advislet. The array contains pairs of items: even items are attribute names while odd items are the Class for the item. This information is used by the Advisor to ensure Advislets are not invoked with invalid parameters. Overide the `validateAdviceRequest` method to perform additional processing above and beyond attribute type checking.

  Specified by:
    `getRequiredAttributes` in interface `Advislet`
  Overrides:
    `getRequiredAttributes` in class `AbstractAdvislet`
  Returns
    an Object[] that contains the attributes required by the Advislet. The array contains pairs of items: even items are are attribute names while odd items are the Class for the item.

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

Copyright © 2008 BEA Systems, Inc. All Rights Reserved