# com.beasys.commerce.ebusiness.catalog.advislets
CatalogQueryAdvisletImpl Class

public final class CatalogQueryAdvisletImpl
extends `AbstractAdvislet`
implements `Serializable`

This class is the implementation class for a CatalogQuery Advislet. This Advislet can issue queries against the Product Catalog and retrieve CatalogItems.

Hierarchy
  `Object`
  `AbstractAdvislet`
  `CatalogQueryAdvisletImpl`

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

## Field Summary

`protected `String`` | `catalogManagerName` String
`protected `CatalogQuery`` | `catalogQuery` CatalogQuery
`protected int` | `viewSize` int

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

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

Fields 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`, `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``

## Constructor Summary

CatalogQueryAdvisletImpl(`Advisor` advisor, `Metadata` metadata)

## Method Summary

`public `Advice`` | `getAdvice`(`AdviceRequest` adviceRequest) This method makes recommendations based the AdviceRequest passed in.
`public void` | `validateAdviceRequest`(`AdviceRequest` adviceRequest) Allows for custom AdviceRequest validation logic in addition to the required attribute checking performed by the Advisor.

Methods from `com.bea.p13n.advisor.`AbstractAdvislet``
``getAdvisor`, `getMetadata`, `getRequiredAttributes`, `initialize`, `toString`,`

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

Methods from interface `com.bea.p13n.advisor.`Advislet``
``getAdvice`, `getRequiredAttributes`, `validateAdviceRequest``

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

## Field Detail

### catalogManagerName

    protected String catalogManagerName

### catalogQuery

    protected CatalogQuery catalogQuery

### viewSize

    protected int viewSize

## Constructor Detail

### CatalogQueryAdvisletImpl

    public CatalogQueryAdvisletImpl(Advisor advisor,
                                    Metadata metadata)

## Method Detail

### getAdvice(AdviceRequest) Method

    public Advice getAdvice(AdviceRequest adviceRequest)
         throws IllegalArgumentException, AdvisorException

This method makes recommendations based the AdviceRequest passed in.

Overrides
  `AbstractAdvislet.getAdvice(AdviceRequest)`

#### Parameters

adviceRequest
  The AdviceRequest used to make a recommendation.

#### Returns

The advice which contain the recommendations based on the type of request made.

#### Exceptions

``IllegalArgumentException``
``AdvisorException``

### validateAdviceRequest(AdviceRequest) Method

    public void validateAdviceRequest(AdviceRequest adviceRequest)
         throws IllegalArgumentException

Description copied from `Advislet.validateAdviceRequest(AdviceRequest)`
Allows for custom AdviceRequest validation logic in addition to the required attribute checking performed by the Advisor.

Overrides
  `AbstractAdvislet.validateAdviceRequest(AdviceRequest)`

#### Parameters

adviceRequest
  the request to validate.

#### Exceptions

``IllegalArgumentException``