Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.advisor
Interface Advislet

All Superinterfaces
  AdvisletChainElement

All Known Implementing Classes:
  AbstractAdvislet, CatalogQueryAdvisletImpl, ContentQueryAdvisletImpl, RulesAdvisletImpl

    public interface Advislet

extends AdvisletChainElement

This interface is the common interface for all `Advislets`. An Advislet is a simple, pluggable piece of personalization technology that can be declaratively chained with other Advislets though the AdvisletRegistry.

The Advisor uses the AdvisletRegistry to select Advislets based on the URI of an incoming AdviceRequest.

Advislets are deployed and bound to a URI through the AdvisletRegistry configuration file (advislet-registry.xml).

Method Summary
`Advice` | `getAdvice(AdviceRequest request)` Makes recommendations based on the AdviceRequest passed in.
`Object[]` | `getRequiredAttributes()` Returns an array of required attributes for the advislet.
`void` | `validateAdviceRequest(AdviceRequest request)` Allows for custom AdviceRequest validation logic in addition to the required attribute checking performed by the Advisor.

Methods inherited from interface com.bea.p13n.advisor.AdvisletChainElement
`getMetadata, initialize`

Method Detail

### getAdvice

    Advice getAdvice(AdviceRequest request)
                     throws IllegalArgumentException,
                            AdvisorException

  Makes recommendations based on the AdviceRequest passed in.

  Parameters
    `request` - The advice request for which 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

    Object[] getRequiredAttributes()

  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.

  Returns
    an array that contains the attributes required by the Advislet.

### validateAdviceRequest

    void validateAdviceRequest(AdviceRequest request)
                               throws IllegalArgumentException

  Allows for custom AdviceRequest validation logic in addition to the required attribute checking performed by the Advisor.

  Parameters
    `request` - the request to validate.
  Throws
    `IllegalArgumentException` - thrown if the adviceRequest parameter is `null` or if it is an unsupported type.

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.