# com.bea.p13n.advisor
AdvisorFactory Class

public abstract class AdvisorFactory
extends `Object`

Factory class to create `Advisor```-related instance objects.

Hierarchy
  `Object`
  `AdvisorFactory`

## Constructor Summary

AdvisorFactory()

## Method Summary

`public static `Advice`` | `createAdvice`() Returns a new `Advice``` instance.
`public static `AdviceRequest`` | `createAdviceRequest`(`String` uri, `String` identifier) Creates an `AdviceRequest``` object for the given URI prefix.
`public static `ProcessingError`` | `createProcessingError`(`Object` source, `String` description, `Exception` exception, `Object` userData) Creates a `ProcessingError``` instance based on the given information.
`public static `String`` | `generateAdviceRequestIdentifier`() Utility method to generate a pseudo-unique identifier for use within an `AdviceRequest``` object.

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

## Constructor Detail

### AdvisorFactory

    public AdvisorFactory()

## Method Detail

### createAdvice() Method

    public static Advice createAdvice()

Returns a new `Advice``` instance.

#### Returns

a new `Advice``` instance.

### createAdviceRequest(String, String) Method

    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 `AdvisorFactory.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

### createProcessingError(Object, String, Exception, Object) Method

    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() Method

    public static String generateAdviceRequestIdentifier()

Utility method to generate a pseudo-unique identifier for use within an `AdviceRequest``` object.

#### Returns

a String identifier