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


oracle.dss.thin.beans
Class BaseThinBeanUI

java.lang.Object
  |
  +--oracle.dss.thin.beans.BaseThinBeanUI
All Implemented Interfaces:
CheckpointState, ErrorHandlerCallback, ThinBean, ThinBeanUI
Direct Known Subclasses:
BaseViewTool, Explorer, ThinBeanDialog, ViewToolbar

public abstract class BaseThinBeanUI
extends java.lang.Object
implements ThinBeanUI, ErrorHandlerCallback, CheckpointState

Abstract base class for ThinBeanUI instances


Fields inherited from interface oracle.dss.thin.beans.ThinBeanUI
EVENT_HANDLED, EVENT_NOT_HANDLED, EVENT_RESPONSE_DONE

 

Constructor Summary
BaseThinBeanUI()
          Constructor.

 

Method Summary
 void addErrorHandler(ErrorHandler errorHandler)
          Specifies the error handler for this thin bean.
 void checkpointState()
          Initiates tracking of checkpoint state.
 java.lang.String generateOnClickSubmit(java.lang.String event)
          Generates Javascript for an OnClick handler.
 java.lang.String getCheckpointState()
          Retrieves state differences since the last call to checkpointState.
 EventTarget getEventTarget(java.lang.String event)
          Retrieves the event target for the specified event.
 java.util.Locale getLocale()
          Retrieves the Locale that this ThinBeanUI uses.
 java.lang.String getState()
          Retrieves the state of this thin bean.
 java.lang.String getThinBeanName()
          Retrieves the unique name of this thin bean.
 void removeErrorHandler()
          Removes a customized error handler for this thin bean.
 void setBaseState()
          Establishes a base state for the ThinBean, from which state changes are tracked.
 void setCheckpointState(java.lang.String state)
          Sets on this thin bean the state changes since the last call to checkpointState.
 void setEventTarget(java.lang.String event, EventTarget target)
          Specifies an event target for an event that this ThinBeanUI generates.
 void setLocale(java.util.Locale loc)
          Specifies the Locale for this ThinBeanUI.
 void setState(java.lang.String state)
          Sets the state of this ThinBean.
 void setThinBeanName(java.lang.String thinBeanName)
          Specifies a unique name for this thin bean.

 

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

 

Methods inherited from interface oracle.dss.thin.beans.ThinBeanUI
handleEvent

 

Constructor Detail

BaseThinBeanUI

public BaseThinBeanUI()
Constructor.
Method Detail

setThinBeanName

public void setThinBeanName(java.lang.String thinBeanName)
Description copied from interface: ThinBean
Specifies a unique name for this thin bean. You may have multiple instances of a thin bean in an application. Thin-bean events use the ThinBeanName as the value of the source query parameter, to identify the thin bean that should handle the event.
Specified by:
setThinBeanName in interface ThinBean
Following copied from interface: oracle.dss.thin.beans.ThinBean
Parameters:
thinBeanName - A unique name for this thin bean.
See Also:
BIConstants.SOURCE

getThinBeanName

public java.lang.String getThinBeanName()
Description copied from interface: ThinBean
Retrieves the unique name of this thin bean. The ThinBeanName uniquely identifies a thin bean in an application. Thin-bean events use the ThinBeanName as the value of the source query parameter, to identify the thin bean that should handle the event.
Specified by:
getThinBeanName in interface ThinBean
Following copied from interface: oracle.dss.thin.beans.ThinBean
Returns:
The name of this thin bean.
See Also:
BIConstants.SOURCE

setBaseState

public void setBaseState()
Description copied from interface: ThinBean
Establishes a base state for the ThinBean, from which state changes are tracked. This method clears the current state string for the thin bean.

Whenever you instantiate a thin bean, call this method. If you perform standard initialization every time you load a thin bean, then call this method after the standard initialization code. If you do custom initialization on some, but not all, thin beans, then call this method before the custom initialization code. Any changes that you make to a thin bean state after you call this method are added to the state string that the getState method returns.

Specified by:
setBaseState in interface ThinBean

setState

public void setState(java.lang.String state)
Description copied from interface: ThinBean
Sets the state of this ThinBean. This method takes the state information from a state string and sets it on this thin bean. The state string represents changes that have been made to this thin bean since the last call to the setBaseState method.

Where you get the state string depends on whether you store state information directly in the URL or in an oracle.cabo.servlet.state.State object. If you store state in the URL, then the state string comes from the URL. If you store state in a State object and store the ID of that object in the URL, then the state comes from the State object. In either case, the stored information originally should have come from a call to the getState method of this thin bean.

Setting the state of a thin bean lets you recreate a previously displayed page.

Call this method before you handle any thin-bean events. Thin-bean events often change the state of thin beans, so calling this method after you handle events causes the effects of the event handling to be overwritten.

Specified by:
setState in interface ThinBean
Following copied from interface: oracle.dss.thin.beans.ThinBean
Parameters:
state - The string that represents the state of this thin bean.
See Also:
ThinBean.getState()

getState

public java.lang.String getState()
Description copied from interface: ThinBean
Retrieves the state of this thin bean. The String that this method returns represents changes that have been made to this thin bean since the last call to its setBaseState method. Call this method after you handle any thin-bean events to get the current state of this thin bean.

You can store this state information directly in the URL, or you can store the state string in an oracle.cabo.servlet.state.State, and store the ID of the State in the URL.

The state information accrues as a user interacts with a thin bean, so the String that this method returns grows larger with each request that involves this thin bean. For example, the state of a Query might include information about the measures and selections in the query. If a user drills, then the drill information is added to the state string. If a user changes the layout of the query, then the new layout information is added as well. Each modification to the thin bean adds to the state string. If you store the state of all of the thin beans in your application in the URL, then you must be careful to avoid exceeding the URL limit for any browser that your application supports.

Call this method after you handle any thin-bean events.

Specified by:
getState in interface ThinBean
Following copied from interface: oracle.dss.thin.beans.ThinBean
Returns:
The state changes for this thin bean since the last call to setBaseState. Unless you use checkpointing, the returned state string represents the current state of this thin bean.
See Also:
ThinBean.setState(java.lang.String), ThinBean.setBaseState(), CheckpointState

getCheckpointState

public java.lang.String getCheckpointState()
Description copied from interface: CheckpointState
Retrieves state differences since the last call to checkpointState.

You normally store the returned String in the URL. The return value from this method, together with the return value from the getState method, describe all of the state changes that have been made to this thin bean since it was initialized (since the last call to setBaseState).

Specified by:
getCheckpointState in interface CheckpointState
Following copied from interface: oracle.dss.thin.beans.CheckpointState
Returns:
Changes that have been made to the state of this thin bean since checkpointState was last called.
See Also:
CheckpointState.checkpointState(), ThinBean.getState(), ThinBean.setBaseState()

setCheckpointState

public void setCheckpointState(java.lang.String state)
                        throws ThinException
Description copied from interface: CheckpointState
Sets on this thin bean the state changes since the last call to checkpointState.
Specified by:
setCheckpointState in interface CheckpointState
Following copied from interface: oracle.dss.thin.beans.CheckpointState
Parameters:
state - The state differences from the last call to checkpointState.
Throws:
ThinException - If the state could not be set.
See Also:
ThinBean.setState(java.lang.String)

checkpointState

public void checkpointState()
Description copied from interface: CheckpointState
Initiates tracking of checkpoint state. Before you call this method, call the getState method of the thin bean. Save the state string that getState returns in an oracle.cabo.servlet.state.MutableState object. Save the MutableState to the BI Beans Catalog, by calling the saveState method of the BIStateManager. Then, call this method to keep track of changes that occur after you save the state string in the Catalog.
Specified by:
checkpointState in interface CheckpointState
Following copied from interface: oracle.dss.thin.beans.CheckpointState
See Also:
ThinBean.getState(), BIStateManager

setEventTarget

public void setEventTarget(java.lang.String event,
EventTarget target)
Description copied from interface: ThinBeanUI
Specifies an event target for an event that this ThinBeanUI generates. Call this method to specify the ThinBeanUI that should handle the event. You can also use event targets to direct an event to another part of your application, to change the target frame for an event, and to add application parameters to an event.
Specified by:
setEventTarget in interface ThinBeanUI
Following copied from interface: oracle.dss.thin.beans.ThinBeanUI
Parameters:
event - A constant that identifies the event to target. Valid constants are defined in the BIConstants interface and end with "_EVENT".
target - The event target that specifies the thin bean that should handle the event.
See Also:
BIConstants

getEventTarget

public EventTarget getEventTarget(java.lang.String event)
Description copied from interface: ThinBeanUI
Retrieves the event target for the specified event.
Specified by:
getEventTarget in interface ThinBeanUI
Following copied from interface: oracle.dss.thin.beans.ThinBeanUI
Parameters:
event - A constant that identifies the event whose target you want. Valid constants are defined in the BIConstants interface and end with "_EVENT".
Returns:
The event target that has been set for event.
See Also:
BIConstants

generateOnClickSubmit

public java.lang.String generateOnClickSubmit(java.lang.String event)
Generates Javascript for an OnClick handler. Call this method to get Javascript that you can set as the value of the ON_CLICK_ATTR of a UIX ButtonBean or LinkBean. You can use this method to get Javascript for OK and Cancel buttons or links that you add to the page that contains this BaseThinBeanUI.
Parameters:
event - A constant that represents the thin-bean event that the Javascript should generate. Valid constants are defined in the BIConstants interface, and they end with "_EVENT".
See Also:
BIConstants

addErrorHandler

public void addErrorHandler(ErrorHandler errorHandler)
Specifies the error handler for this thin bean. This bean can have one and only one error handler. The error handler is called when an internal error condition or exception occurs.

The default error handler prints messages to the console.

Use this method to install your own error handler.

Specified by:
addErrorHandler in interface ErrorHandlerCallback
Parameters:
eh - The error handler to use.

removeErrorHandler

public void removeErrorHandler()
Removes a customized error handler for this thin bean. This method replaces the current error handler with the error handler from the view.
Specified by:
removeErrorHandler in interface ErrorHandlerCallback

setLocale

public void setLocale(java.util.Locale loc)
Description copied from interface: ThinBeanUI
Specifies the Locale for this ThinBeanUI.
Specified by:
setLocale in interface ThinBeanUI
Following copied from interface: oracle.dss.thin.beans.ThinBeanUI
Parameters:
locale - The Locale for this ThinBeanUI.

getLocale

public java.util.Locale getLocale()
Description copied from interface: ThinBeanUI
Retrieves the Locale that this ThinBeanUI uses.
Specified by:
getLocale in interface ThinBeanUI
Following copied from interface: oracle.dss.thin.beans.ThinBeanUI
Returns:
The Locale for this ThinBeanUI.

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


Copyright © 2003, Oracle. All Rights Reserved.