Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.thin.state
Class BIStateManager

java.lang.Object
  |
  +--oracle.dss.thin.state.BIStateManager
All Implemented Interfaces:
ErrorHandlerCallback, java.io.Serializable, oracle.cabo.servlet.state.StateManager

public class BIStateManager
extends java.lang.Object
implements oracle.cabo.servlet.state.StateManager, ErrorHandlerCallback

A StateManager that stores states as objects in the BI Beans Catalog.

The BIStateManager maintains an in-memory FIFO queue of a predetermined length. If the BIStateManager does not find a State by ID in the queue, then it loads the State from the BI Beans Catalog.

To ensure that state IDs are always unique, the BIStateManager uses GUIDs for state IDs. It uses the state ID as the name of the State object in the BI Beans Catalog. The state's object type is oracle.dss.util.persistence.PersistableConstants.URLSTATE.

See Also:
PersistableConstants.Attributes.OBJECT_TYPE, Serialized Form

Constructor Summary
BIStateManager()
          Creates a BIStateManager of a default queue size (20 states).
BIStateManager(BIContext context)
          Creates a BIStateManager of a default queue size (20 states).
BIStateManager(BIContext context, int queueSize)
          Creates a BIStateManager with the specified queue size.

 

Method Summary
 void addErrorHandler(ErrorHandler eh)
          Adds a single error handler to the bean.
 void expire()
          Invalidates this BIStateManager and all of its child State objects.
 BIContext getBIContext()
          Retrieves the state folder for this BIStateManager.
 oracle.cabo.servlet.state.MutableState getNewState()
          Creates a new MutableState object.
 oracle.cabo.servlet.state.State getState(java.lang.String id)
          Retrieves the State object that has a specified ID.
 boolean isExpired()
          Indicates whether this BIStateManager has expired.
 void removeErrorHandler()
          Removes the error handler from the bean.
 void saveState(oracle.cabo.servlet.state.State state)
          Saves a State to the BI Beans Catalog.
 void setBIContext(BIContext context)
          Specifies the folder for storing states.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BIStateManager

public BIStateManager()
Creates a BIStateManager of a default queue size (20 states). In order to support saving and loading states from the BI Beans Catalog, you must also set the BIContext for this BIStateManager.

BIStateManager

public BIStateManager(BIContext context)
Creates a BIStateManager of a default queue size (20 states).
Parameters:
context - The folder for storing state objects.

BIStateManager

public BIStateManager(BIContext context,
                      int queueSize)
Creates a BIStateManager with the specified queue size.
Parameters:
context - The folder for storing state objects.
queueSize - The number of states to store in the queue.
Method Detail

setBIContext

public void setBIContext(BIContext context)
Specifies the folder for storing states. If you use the null-parameter constructor, then call this method to specify the folder where the state strings are stored.
Parameters:
context - The folder for storing states.

getBIContext

public BIContext getBIContext()
Retrieves the state folder for this BIStateManager.
Returns:
The folder for storing states.

addErrorHandler

public void addErrorHandler(ErrorHandler eh)
Description copied from interface: ErrorHandlerCallback
Adds a single error handler to the bean. The bean then calls the error handler with error messages, messages about abnormal situations, and trace messages.
Specified by:
addErrorHandler in interface ErrorHandlerCallback
Following copied from interface: oracle.dss.util.ErrorHandlerCallback
Parameters:
eh - The error handler to add.

removeErrorHandler

public void removeErrorHandler()
Description copied from interface: ErrorHandlerCallback
Removes the error handler from the bean.
Specified by:
removeErrorHandler in interface ErrorHandlerCallback

getState

public oracle.cabo.servlet.state.State getState(java.lang.String id)
Retrieves the State object that has a specified ID. This method looks in the state queue first. If the state is not in the queue, then this method looks in the BI Beans Catalog, in the folder that is specified as the BIContext for this BIStateManager.
Specified by:
getState in interface oracle.cabo.servlet.state.StateManager
Parameters:
id - The ID of the State object that you want to retrieve.
Returns:
The State that has the specified ID, or null if the state is not found.

saveState

public void saveState(oracle.cabo.servlet.state.State state)
               throws javax.naming.NamingException
Saves a State to the BI Beans Catalog. A State cannot be saved more than once, so after you save a State has been saved, do not set any properties of the State object.

The persistable object type of the saved State object is oracle.dss.util.persistence.PersistableConstants.URLSTATE.

Parameters:
state - The State object to save.
Throws:
javax.naming.NamingException - If the State could not be saved.

expire

public void expire()
Invalidates this BIStateManager and all of its child State objects. After a StateManager has been invalidated, it can no longer be used to retrieve States.
Specified by:
expire in interface oracle.cabo.servlet.state.StateManager

isExpired

public boolean isExpired()
Indicates whether this BIStateManager has expired.
Specified by:
isExpired in interface oracle.cabo.servlet.state.StateManager
Returns:
true if this BIStateManager has expired, false if it can still retrieve State objects.

getNewState

public oracle.cabo.servlet.state.MutableState getNewState()
Creates a new MutableState object. To save the State object to the BI Beans Catalog, call saveState.

This method throws an IllegalStateException if this BIStateManager has expired.

Specified by:
getNewState in interface oracle.cabo.servlet.state.StateManager
Returns:
A new MutableState object that has a unique ID.
See Also:
saveState(oracle.cabo.servlet.state.State)

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.