net.sf.wfnm
Class Webflow

java.lang.Object
  extended bynet.sf.wfnm.Webflow
All Implemented Interfaces:
ObjectSetOwner, Serializable

public class Webflow
extends Object
implements ObjectSetOwner, Serializable

Defines a webflow with a name and a default ownership.
It contains a stack of visited pages and a set of owned objects.

Version:
1.0.6
Author:
Maurizio Albari
See Also:
Serialized Form

Constructor Summary
Webflow(String name, int defaultOwnership, PageChangedListener pageChangedListener)
          Creates a new Webflow object.
 
Method Summary
 void addPage(Page page, AttributeContainer container)
          Forward to a page inside this webflow.
 void backToPage(String url, Set objectSetToRemove, Map urlMapToClear, AttributeContainer container)
          Back to a page inside this webflow.
 void closeWebflow(Set objectSetToRemove, Map urlMapToClear, AttributeContainer container)
          Closes this webflow.
 int getDefaultOwnership()
          Gets the default ownership.
 String getName()
          Gets the name of this webflow.
 Set getOwnedObjectSet()
          Gets the object set owned by this webflow.
 Stack getPageStack()
          Gets the page stack.
 Page getPreviousPage()
          Gets the previous page.
 Page getTopPage()
          Gets the top page of this webflow (null if the webflow is empty).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Webflow

public Webflow(String name,
               int defaultOwnership,
               PageChangedListener pageChangedListener)
Creates a new Webflow object.

Parameters:
name - the name of this webflow
defaultOwnership - the default ownership
pageChangedListener - the page changed listener
Method Detail

getDefaultOwnership

public int getDefaultOwnership()
Gets the default ownership.

Returns:
the default ownership

getName

public String getName()
Gets the name of this webflow.

Returns:
the name of this webflow

getOwnedObjectSet

public Set getOwnedObjectSet()
Gets the object set owned by this webflow.

Specified by:
getOwnedObjectSet in interface ObjectSetOwner
Returns:
the object set owned by this webflow

getPageStack

public Stack getPageStack()
Gets the page stack.

Returns:
the page stack

getPreviousPage

public Page getPreviousPage()
Gets the previous page.

Returns:
the previous page (null=no prevoius page)

getTopPage

public Page getTopPage()
Gets the top page of this webflow (null if the webflow is empty).

Returns:
the top page of this webflow (null if the webflow is empty)

addPage

public void addPage(Page page,
                    AttributeContainer container)
Forward to a page inside this webflow.

Parameters:
page - the url of the page
container - the attribute container

backToPage

public void backToPage(String url,
                       Set objectSetToRemove,
                       Map urlMapToClear,
                       AttributeContainer container)
Back to a page inside this webflow.

Parameters:
url - the url of the page
objectSetToRemove - the object set to remove for adding objects to remove
urlMapToClear - the url map to clear
container - the attribute container

closeWebflow

public void closeWebflow(Set objectSetToRemove,
                         Map urlMapToClear,
                         AttributeContainer container)
Closes this webflow.

Parameters:
objectSetToRemove - adds to this set all object that has to be removed
urlMapToClear - the url map to clear
container - the attribute container


Copyright © 2004-2005 Maurizio Albari@SourceForge.net. All Rights Reserved.