com.bea.p13n.advisor
Class AdvisorFactory

java.lang.Object
  extended by com.bea.p13n.advisor.AdvisorFactory

public abstract class AdvisorFactory
extends Object

Factory class to create Advisor-related instance objects.


Constructor Summary
AdvisorFactory()
           
 
Method Summary
static Advice createAdvice()
          Returns a new Advice instance.
static AdviceRequest createAdviceRequest(String uri, String identifier)
          Creates an AdviceRequest object for the given URI prefix.
static ProcessingError createProcessingError(Object source, String description, Exception exception, Object userData)
          Creates a ProcessingError instance based on the given information.
static String generateAdviceRequestIdentifier()
          Utility method to generate a pseudo-unique identifier for use within an AdviceRequest object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvisorFactory

public AdvisorFactory()
Method Detail

createAdviceRequest

public static AdviceRequest createAdviceRequest(String uri,
                                                String identifier)
Creates an AdviceRequest object for the given URI prefix. An identifier is associated with the AdviceRequest (currently ignored). Future Advisor implementations may use the identifier to perform advanced personalization and tracking. Use the generateAdviceRequestIdentifier() method to use a generated ID.

Parameters
uri - the URI for the AdviceRequest - this will correspond to the URI prefix of a deployed Advislet.
identifier - the identifier for this request to the Advisor.
Returns
a new AdviceRequest instance

createAdvice

public static Advice createAdvice()
Returns a new Advice instance.

Returns
a new Advice instance.

createProcessingError

public static ProcessingError createProcessingError(Object source,
                                                    String description,
                                                    Exception exception,
                                                    Object userData)
Creates a ProcessingError instance based on the given information.

Parameters
source - the advislets or any other objects such as input transformers, results transformers, etc that wish to log the error.
description - a textual description of the error.
exception - any exception associated with the error,
userData - any other information to be associated with the error.
Returns
a new ProcessingError instance

generateAdviceRequestIdentifier

public static String generateAdviceRequestIdentifier()
Utility method to generate a pseudo-unique identifier for use within an AdviceRequest object.

Returns
a String identifier


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.