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.rules.advislets
Class ResultsToRulesInputTransform

    java.lang.Object
      com.bea.p13n.advisor.AbstractAdviceTransform
          com.bea.p13n.rules.advislets.ResultsToRulesInputTransform

All Implemented Interfaces:
  AdviceConstants, AdviceRequestConstants, AdviceTransform, AdvisletChainElement

public class ResultsToRulesInputTransform
extends AbstractAdviceTransform

An `AdviceTransform` that converts the results in one `Advice` instance into rule inputs in the `AdviceRequest`.

Field Summary
`static String` | `REQUEST_SPECIFIC_KEY` A string key for identifying a request-specific key.
`static String` | `REQUEST_SPECIFIC_VALUE` A string key for identifying a request-specific value.

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

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, 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
`ResultsToRulesInputTransform(Advisor advisor, Metadata metadata)` Construct an instance of this object and bind it to its `Advisor` and `Metadata` instances.

Method Summary
`boolean` | `initialize(Map parameters, Object parameterDocument)` Initialize this AdviceTransform from its configuration environment in the AdvisletRegistry XML file.
`void` | `transform(Advice input, AdviceRequest output)` Maps objects in the Advice objects into objects in a subsequent AdviceRequest.

Methods inherited from class com.bea.p13n.advisor.AbstractAdviceTransform
`getMetadata, toString`

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

Field Detail

### REQUEST_SPECIFIC_KEY

    public static final String REQUEST_SPECIFIC_KEY

  A string key for identifying a request-specific key.

  See Also:
    Constant Field Values

### REQUEST_SPECIFIC_VALUE

    public static final String REQUEST_SPECIFIC_VALUE

  A string key for identifying a request-specific value.

  See Also:
    Constant Field Values

Constructor Detail

### ResultsToRulesInputTransform

    public ResultsToRulesInputTransform(Advisor advisor,
                                        Metadata metadata)

  Construct an instance of this object and bind it to its `Advisor` and `Metadata` instances.

Method Detail

### initialize

    public boolean initialize(Map parameters,
                              Object parameterDocument)
                       throws AdvisorException

  Initialize this AdviceTransform from its configuration environment in the AdvisletRegistry XML file.

  Specified by:
    `initialize` in interface `AdvisletChainElement`
  Overrides:
    `initialize` in class `AbstractAdviceTransform`
  Parameters:
    `parameters` - the `Map` containing the initialization parameters.
    `parameterDocument` - the XML Document `Object` containing the configuration environment for this AdviceTransform instance.
  Returns:
    returns `true` if this operation is successful, otherwise returns `false`.
  Throws:
    `AdvisorException` - If an error occurs during initialization process.

### transform

    public void transform(Advice input,
                          AdviceRequest output)
                   throws AdvisorException

  Maps objects in the Advice objects into objects in a subsequent AdviceRequest.

  If the Advice.getResult() call returns a List, each item in the List is appended to a List in the AdviceRequest keyed to the value RULES_INPUT_OBJECTS.

  In addition a single value from the configuration environment is added to to the AdviceRequest, using the key of "request-specific-key" (loaded from the XML configuration) and the value "request-specific-value"" (loaded from the XML configuration).

  Specified by:
    `transform` in interface `AdviceTransform`
  Overrides:
    `transform` in class `AbstractAdviceTransform`
  Parameters:
    `input` - the `Advice` that was previously executed.
    `output` - the `AdviceRequest` to be populated.
  Throws:
    `AdvisorException` - If an error occurs during the transformation process.

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