com.bea.p13n.advisor
Class AbstractAdviceTransform

java.lang.Object
  extended by com.bea.p13n.advisor.AbstractAdviceTransform
All Implemented Interfaces
AdviceConstants, AdviceRequestConstants, AdviceTransform, AdvisletChainElement
Direct Known Subclasses:
OutputToInputTransform, ResultsToRulesInputTransform, RulesInputTransform

public abstract class AbstractAdviceTransform
extends Object
implements AdviceTransform, AdviceConstants, AdviceRequestConstants

This is an abstract base class useful for defining new AdviceTransform classes.


Field Summary
 
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, 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
 
Constructor Summary
AbstractAdviceTransform(Metadata metadata)
          Construct an instance of this object and bind it to its Metadata instance.
 
Method Summary
 Metadata getMetadata()
          Returns the Metadata that is associated with this.
 boolean initialize(Map parameters, Object parameterDocument)
          Initializes this with the given parameters and a parameterDocument.
 String toString()
          Constructs and returns a String representation of this object.
 void transform(Advice input, AdviceRequest output)
          Transforms the given Advice into AdviceRequest to pass it to another Advisor in the advislet chain defined in the advislet registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractAdviceTransform

public AbstractAdviceTransform(Metadata metadata)
Construct an instance of this object and bind it to its Metadata instance.

Parameters
metadata - the metadata for this object.
Method Detail

initialize

public boolean initialize(Map parameters,
                          Object parameterDocument)
                   throws AdvisorException
Initializes this with the given parameters and a parameterDocument.

Specified by:
initialize in interface AdvisletChainElement
Parameters
parameters - A map containing key-value pairs.
parameterDocument - An Object representing a parameter document.
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
Transforms the given Advice into AdviceRequest to pass it to another Advisor in the advislet chain defined in the advislet registry.

Specified by:
transform in interface AdviceTransform
Parameters
input - An Advice from which the parameters are extracted and transformed.
output - An AdviceRequest that is prepared from the given Advice.
Throws
AdvisorException - If an error occurs during the transformation process.

getMetadata

public Metadata getMetadata()
Returns the Metadata that is associated with this.

Specified by:
getMetadata in interface AdvisletChainElement
Returns
The Metadata.

toString

public String toString()
Constructs and returns a String representation of this object.

Overrides:
toString in class Object
Returns
a String representation of this object.


Copyright © 2000, 2008, 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.