|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.wfnm.NavigationManagerImpl
The navigation manager default implementation.
| Field Summary | |
protected static String |
DEFAULT_WEBFLOW_NAME
The default webflow name. |
protected Object |
lock
The synchronization lock. |
protected Set |
noOwnershipSet
The no ownership set. |
protected Map |
object2owner
A map that bind the object key with the owner of the object. |
protected Map |
url2webflow
A map that bind an url with a webflow witch contains a page with that url. |
protected Stack |
webflowStack
The stack of webflow. |
| Fields inherited from interface net.sf.wfnm.OwnershipConst |
GLOBAL_OWNERSHIP, NO_OWNERSHIP, OWNERSHIP_DESC, PAGE_OWNERSHIP, PREVIOUS_OWNERSHIP, WEBFLOW_OWNERSHIP, WORKING_OWNERSHIP |
| Constructor Summary | |
protected |
NavigationManagerImpl()
Creates a new NavigationManager object. |
| Method Summary | |
protected void |
addObjectSet(Set objectKeySet)
Add an object to the navigation manager. |
protected void |
backToWebflow(String webflowName,
Set objectSetToRemove,
AttributeContainer container)
Back to a specified webflow (if different from the current). |
protected int |
findWebflowIndex(String webflowName)
Find the index of a named webflow. |
String |
getCurrentPage()
Gets the url of the current page. |
String |
getCurrentWebflow()
Gets the current webflow name. |
Object |
getLock()
Gets the synchronization lock. |
protected ObjectSetOwner |
getObjectOwnership(int ownership)
Gets the object set owner. |
Set |
getOwnedObjectSet()
Gets the object set owned (with no ownership). |
String |
getPreviousPage()
Gets the url of the previous page. |
String |
getPreviousWebflow()
Gets the url of the previous webflow top page. |
String |
getPreviousWebflow(String webflowName)
Gets the url of a webflow top page. |
protected Webflow |
getPreviousWebflowOrTop()
Gets the previous webflow, or the top webflow if there is only one webflow |
protected Page |
getTopPage()
Returns the top page. |
protected Webflow |
getTopWebflow()
Gets the top webflow (null=no webflow opened). |
protected Webflow |
getWebflowByIndex(int index)
Gets a webflow given its index. |
Stack |
getWebflowStack()
Returns the webflow stack. |
boolean |
isPageVisited(String url)
Returns true if the page has been visited. |
boolean |
isWebflowVisited(String webflowName)
Returns true if the webflow has been visited. |
void |
notifyPage(AttributeContainer container,
String url,
Set addedObjectSet,
Set removedObjectSet)
Notify that the navigation has reached a page. |
void |
notifyPage(AttributeContainer container,
String url,
String webflowName,
int defaultWebflowOwnership,
Set addedObjectSet,
Set removedObjectSet)
Notify that the navigation has reached a page of a specific webflow. |
protected void |
removeObjectSet(Set objectKeySet)
Removes an object form the navigation manager. |
protected static void |
removeObjectSetFromContainer(AttributeContainer container,
Set objectSet)
Removes from a container a set of object. |
void |
resetFramework(AttributeContainer container)
Reset the navigation manager. |
void |
setLock(Object lock)
Sets the synchronization lock. |
void |
setObjectOwnership(String objectKey,
int objectOwnership)
Sets the object owner. |
void |
setPageChangedListener(PageChangedListener pageChangedListener)
Sets the page changed listener. |
void |
setWebflowChangedListener(WebflowChangedListener webflowChangedListener)
Sets the webflow changed listener. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final String DEFAULT_WEBFLOW_NAME
protected Map object2owner
protected Map url2webflow
protected transient Object lock
protected Set noOwnershipSet
protected Stack webflowStack
| Constructor Detail |
protected NavigationManagerImpl()
| Method Detail |
public String getCurrentPage()
getCurrentPage in interface NavigationManagerpublic String getCurrentWebflow()
getCurrentWebflow in interface NavigationManagerpublic void setLock(Object lock)
setLock in interface NavigationManagerlock - the synchronization lockpublic Object getLock()
getLock in interface NavigationManager
public void setObjectOwnership(String objectKey,
int objectOwnership)
setObjectOwnership in interface NavigationManagerobjectKey - the object keyobjectOwnership - the object ownershippublic Set getOwnedObjectSet()
getOwnedObjectSet in interface ObjectSetOwnerpublic void setPageChangedListener(PageChangedListener pageChangedListener)
setPageChangedListener in interface NavigationManagerpageChangedListener - the page changed listenerpublic boolean isPageVisited(String url)
isPageVisited in interface NavigationManagerurl - the url of the page
public String getPreviousPage()
getPreviousPage in interface NavigationManagerpublic String getPreviousWebflow()
getPreviousWebflow in interface NavigationManagerpublic String getPreviousWebflow(String webflowName)
getPreviousWebflow in interface NavigationManagerwebflowName - the webflow name
public void setWebflowChangedListener(WebflowChangedListener webflowChangedListener)
setWebflowChangedListener in interface NavigationManagerwebflowChangedListener - the webflow changed listenerpublic Stack getWebflowStack()
getWebflowStack in interface NavigationManagerpublic boolean isWebflowVisited(String webflowName)
isWebflowVisited in interface NavigationManagerwebflowName - the webflow name
public void notifyPage(AttributeContainer container,
String url,
Set addedObjectSet,
Set removedObjectSet)
notifyPage in interface NavigationManagercontainer - the attribute containerurl - the url of the pageaddedObjectSet - the added object setremovedObjectSet - the removed object set
public void notifyPage(AttributeContainer container,
String url,
String webflowName,
int defaultWebflowOwnership,
Set addedObjectSet,
Set removedObjectSet)
notifyPage in interface NavigationManagercontainer - the attribute containerurl - the url of the pagewebflowName - the webflow namedefaultWebflowOwnership - the default webflow ownershipaddedObjectSet - the added object setremovedObjectSet - the removed object setpublic void resetFramework(AttributeContainer container)
resetFramework in interface NavigationManagercontainer - the attribute containerprotected ObjectSetOwner getObjectOwnership(int ownership)
ownership - the ownership
protected Webflow getPreviousWebflowOrTop()
protected Page getTopPage()
protected Webflow getTopWebflow()
protected Webflow getWebflowByIndex(int index)
index - the webflow index
protected void addObjectSet(Set objectKeySet)
objectKeySet - the object key
protected void backToWebflow(String webflowName,
Set objectSetToRemove,
AttributeContainer container)
webflowName - the webflow nameobjectSetToRemove - the object set to remove for goinf to the specified webflowcontainer - the attribute containerprotected int findWebflowIndex(String webflowName)
webflowName - the webflow to find
protected void removeObjectSet(Set objectKeySet)
objectKeySet - the object key set
protected static void removeObjectSetFromContainer(AttributeContainer container,
Set objectSet)
container - the containerobjectSet - the set of object to be removed
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||