com.tonbeller.jpivot.tags
Class OlapModelProxy
java.lang.Object
com.tonbeller.jpivot.core.ExtensionSupport
com.tonbeller.jpivot.olap.model.OlapModelDecorator
com.tonbeller.jpivot.tags.OlapModelProxy
- All Implemented Interfaces:
- com.tonbeller.jpivot.core.Extension, com.tonbeller.jpivot.core.Model, OlapModel, com.tonbeller.wcf.bookmarks.Bookmarkable, java.util.EventListener, javax.servlet.http.HttpSessionBindingListener
public class OlapModelProxy
- extends OlapModelDecorator
- implements javax.servlet.http.HttpSessionBindingListener
proxy for OlapModel. There is one instance per session, the GUI
components refer to this instance. When the underlying OlapModel (decoree)
is exchanged, a structureChanged event is fired.
OlapModelProxy is responsible for calling initialize/destroy on its decoree(s).
When a new decoree is set, the previous one will be destroyed.
Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable |
EXTENSIONAL, INTENSIONAL |
Method Summary |
void |
addModelChangeListener(com.tonbeller.jpivot.core.ModelChangeListener l)
|
void |
destroy()
OlapModelProxy is responsible for calling initialize/destroy |
void |
destroyAll()
|
void |
destroyQuery(java.lang.String queryName)
|
void |
initialize()
OlapModelProxy is responsible for calling initialize/destroy |
void |
initializeAndShow(OlapModel model,
java.util.List dimAccList)
destroys the current model, if present. |
void |
initializeAndShow(java.lang.String queryName,
OlapModel model,
java.util.List dimAccList)
destroys the current model with the given queryName , if present. |
static OlapModelProxy |
instance(java.lang.String id,
javax.servlet.http.HttpSession session)
|
static OlapModelProxy |
instance(java.lang.String id,
javax.servlet.http.HttpSession session,
boolean stackMode)
retrieves the instance from the session. |
void |
removeModelChangeListener(com.tonbeller.jpivot.core.ModelChangeListener l)
|
void |
showByName(java.lang.String queryName)
shows the query that was initialized with queryName . |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent ev)
|
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent ev)
|
Methods inherited from class com.tonbeller.jpivot.olap.model.OlapModelDecorator |
addExtension, decorate, getBookmarkState, getDelegate, getDimensions, getExtension, getExtensions, getID, getMeasures, getResult, getTopDecorator, initialize, setBookmarkState, setDelegate, setID, setLocale, setServletContext |
Methods inherited from class com.tonbeller.jpivot.core.ExtensionSupport |
getId, getModel, modelInitialized, setId, setModel |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_NAME
public static final java.lang.String DEFAULT_NAME
- See Also:
- Constant Field Values
OlapModelProxy
public OlapModelProxy()
OlapModelProxy
public OlapModelProxy(boolean stackMode)
instance
public static OlapModelProxy instance(java.lang.String id,
javax.servlet.http.HttpSession session)
instance
public static OlapModelProxy instance(java.lang.String id,
javax.servlet.http.HttpSession session,
boolean stackMode)
- retrieves the instance from the session. If the instance does not exist,
a new instance is created and stored as a session attribute
- Parameters:
id
- the name of the session attribute that will be created. Use this name to reference
from other tags like pivot table, chart etc.session
- the current session, will contain the new created attributestackMode
- if true, queries with different names are stacked, i.e. a StackStateManager
will be used. Otherwise queries with different names will exist parallel, i.e. a PageStackManager
is used. This attribute is evaluated only when the session attribute is created, i.e. when
this method is called for the first time.
initializeAndShow
public void initializeAndShow(OlapModel model,
java.util.List dimAccList)
throws java.lang.Exception
- destroys the current model, if present. Then the new model is initalized
and shown.
- Throws:
java.lang.Exception
initializeAndShow
public void initializeAndShow(java.lang.String queryName,
OlapModel model,
java.util.List dimAccList)
throws java.lang.Exception
- destroys the current model with the given
queryName
, if present.
Then the new model is initalized and shown. Depending on the StateManager type
queries with other names may be popped off the stack and destroyed.
- Throws:
java.lang.Exception
- See Also:
showByName(String)
showByName
public void showByName(java.lang.String queryName)
throws java.lang.Exception
- shows the query that was initialized with
queryName
.
- Throws:
java.lang.Exception
- See Also:
#initializeAndShow(String, OlapModel)
destroyAll
public void destroyAll()
throws java.lang.Exception
- Throws:
java.lang.Exception
destroyQuery
public void destroyQuery(java.lang.String queryName)
throws java.lang.Exception
- Throws:
java.lang.Exception
addModelChangeListener
public void addModelChangeListener(com.tonbeller.jpivot.core.ModelChangeListener l)
- Specified by:
addModelChangeListener
in interface com.tonbeller.jpivot.core.Model
- Overrides:
addModelChangeListener
in class OlapModelDecorator
removeModelChangeListener
public void removeModelChangeListener(com.tonbeller.jpivot.core.ModelChangeListener l)
- Specified by:
removeModelChangeListener
in interface com.tonbeller.jpivot.core.Model
- Overrides:
removeModelChangeListener
in class OlapModelDecorator
valueBound
public void valueBound(javax.servlet.http.HttpSessionBindingEvent ev)
- Specified by:
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
valueUnbound
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent ev)
- Specified by:
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
destroy
public void destroy()
- OlapModelProxy is responsible for calling initialize/destroy
- Specified by:
destroy
in interface OlapModel
- Overrides:
destroy
in class OlapModelDecorator
- Throws:
RuntimeExecption
- if called
initialize
public void initialize()
- OlapModelProxy is responsible for calling initialize/destroy
- Specified by:
initialize
in interface OlapModel
- Overrides:
initialize
in class OlapModelDecorator
- Throws:
RuntimeExecption
- if called