|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.portal.data.AbstractMDEXStateManager com.endeca.portal.data.DefaultMDEXStateManager
public class DefaultMDEXStateManager
This is an implementation of MDEXStateManager covering a very simple parent-child relationship of data sources. This model covers data sources with a single ancestor, and allows child data sources to add additional static functions to queries inherited from their ancestor. These static functions are whatever functions were configured in the data source's 'baseFunctions' property. "setting" a query on a data source with an ancestor results in actually setting the query on the ancestor, sans whatever static functions were initially configured on the child. This implementation can be useful for simplistic applications where either no relationships exist between MDEXStates or where they are only used to, for example, put RecordType filters (or some other static record filter) on different pages/tabs that otherwise share the same query state.
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
logger
|
Constructor Summary | |
---|---|
DefaultMDEXStateManager()
default constructor |
Method Summary | |
---|---|
protected UserSession |
fetchUserSession(javax.portlet.PortletRequest request)
Method to fetch the current UserSession . |
protected java.util.List<QueryFunction> |
getSubtractedFilterList(QueryState baseState,
QueryState stateToSubtract)
|
QueryState |
handleStateInitial(javax.portlet.PortletRequest request,
MDEXState mdexState)
Returns a QueryState that is the union of all QueryFunctions on this MDEXState's initial definition and all of this MDEXState's parents' initial definitions |
QueryState |
handleStateMerge(javax.portlet.PortletRequest request,
MDEXState mdexState)
Returns a QueryState that is the union of all QueryFunctions on this MDEXState and all of this MDEXState's parents. |
void |
handleStateReset(javax.portlet.PortletRequest request,
MDEXState mdexState)
Resets all MDEXStates in this MDEXState's hierarchy, then fires events for all MDEXStates in that same hierarchy. |
void |
handleStateUpdate(javax.portlet.PortletRequest request,
MDEXState mdexState,
QueryState newQueryState)
Sets the given QueryState onto this MDEXState's root parent, then fires events for all MDEXStates in this MDEXState's hierarchy. |
protected void |
publishEventTriggersForStateAndDescendants(javax.portlet.PortletRequest request,
MDEXState mdexState,
UserSession userSession)
Publishes an event trigger for a data source change event on this state and all of its descendant states. |
Methods inherited from class com.endeca.portal.data.AbstractMDEXStateManager |
---|
addEventTrigger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.log4j.Logger logger
Constructor Detail |
---|
public DefaultMDEXStateManager()
Method Detail |
---|
public QueryState handleStateMerge(javax.portlet.PortletRequest request, MDEXState mdexState) throws QueryStateException
MDEXState
's QueryState
- the source state is first deep-cloned.
handleStateMerge
in interface MDEXStateManager
handleStateMerge
in class AbstractMDEXStateManager
request
- the current PortletRequestmdexState
- the MDEXState representing the current data source
QueryStateException
AbstractMDEXStateManager.handleStateMerge(javax.portlet.PortletRequest, com.endeca.portal.data.MDEXState)
public void handleStateUpdate(javax.portlet.PortletRequest request, MDEXState mdexState, QueryState newQueryState) throws QueryStateException
handleStateUpdate
in interface MDEXStateManager
handleStateUpdate
in class AbstractMDEXStateManager
request
- the current PortletRequestmdexState
- the MDEXState representing the current data sourcenewQueryState
- the query state to be set onto the data source
QueryStateException
AbstractMDEXStateManager.handleStateUpdate(javax.portlet.PortletRequest, com.endeca.portal.data.MDEXState, com.endeca.portal.data.QueryState)
public void handleStateReset(javax.portlet.PortletRequest request, MDEXState mdexState) throws QueryStateException
handleStateReset
in interface MDEXStateManager
handleStateReset
in class AbstractMDEXStateManager
request
- the PortletRequestmdexState
- the current data source state
QueryStateException
- on errorAbstractMDEXStateManager.handleStateReset(javax.portlet.PortletRequest, com.endeca.portal.data.MDEXState)
public QueryState handleStateInitial(javax.portlet.PortletRequest request, MDEXState mdexState) throws QueryStateException
handleStateInitial
in interface MDEXStateManager
handleStateInitial
in class AbstractMDEXStateManager
request
- the current PortletRequestmdexState
- the MDEXState representing the current data source
QueryStateException
AbstractMDEXStateManager.handleStateMerge(javax.portlet.PortletRequest, com.endeca.portal.data.MDEXState)
protected java.util.List<QueryFunction> getSubtractedFilterList(QueryState baseState, QueryState stateToSubtract)
protected void publishEventTriggersForStateAndDescendants(javax.portlet.PortletRequest request, MDEXState mdexState, UserSession userSession)
request
- current requestmdexState
- mdexState undergoing state changeuserSession
- current user sessionprotected UserSession fetchUserSession(javax.portlet.PortletRequest request) throws UserSessionException
UserSession
. The separate method facilitates testing.
request
- the current request
UserSession
associated with the current request
UserSessionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |