com.acsinet_solutions.cetia4.controller.nav
Class NavigationStageGroupImpl

java.lang.Object
  extended by com.acsinet_solutions.cetia4.controller.nav.NavigationStageGroupImpl
All Implemented Interfaces:
NavigationStage, NavigationStageGroup, java.io.Serializable

public final class NavigationStageGroupImpl
extends java.lang.Object
implements NavigationStageGroup, java.io.Serializable

Implementation o a navigation stage group, that allows the grouping of stages in a group WIZARD-like linear flow, that can be added to a navigation flow and managed as a whole.

Other non-linear implementations do not exist in this version, but may be created if needed.

Author:
Santiago Arriaga - santiago.arriaga@acsinet-solutions.com
See Also:
Serialized Form

Constructor Summary
NavigationStageGroupImpl(java.lang.String name, java.util.List<NavigationStage> stages)
          Public consructor.
NavigationStageGroupImpl(java.lang.String name, java.util.List<NavigationStage> stages, int selectedIndex)
          Public consructor.
 
Method Summary
 AttributeInfo getAttributeInfo()
          Get the metadata description for the form attribute on the current stage.
 NavigationStage getCurrentStage()
          Get a shared stage instance that can be modified externally.
 Link getLink()
          Get a reference to the current stage link.
 java.lang.String getName()
          Returns the name of the current entry; this should be unique for each navigation stage type.
 NavigationStage getPreviousStage()
          Return the previous navigation stage if any.
 int getSelectedIndex()
          Get the selected index of the current group.
 java.util.List<NavigationStage> getStages()
          Return a read-only list of loaded stages.
 boolean performMatch(NavigationStage entry)
          Check whether the current entry corresponds to another.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NavigationStageGroupImpl

public NavigationStageGroupImpl(java.lang.String name,
                                java.util.List<NavigationStage> stages)
Public consructor. Seleced index will be set at the start of the list.


NavigationStageGroupImpl

public NavigationStageGroupImpl(java.lang.String name,
                                java.util.List<NavigationStage> stages,
                                int selectedIndex)
Public consructor.

Method Detail

performMatch

public final boolean performMatch(NavigationStage entry)
Description copied from interface: NavigationStage
Check whether the current entry corresponds to another. This is used in navigation flows to find NavigationStages that correspond with each others.

Specified by:
performMatch in interface NavigationStage
Specified by:
performMatch in interface NavigationStageGroup

getName

public final java.lang.String getName()
Description copied from interface: NavigationStage
Returns the name of the current entry; this should be unique for each navigation stage type.

Specified by:
getName in interface NavigationStage

getCurrentStage

public final NavigationStage getCurrentStage()
Description copied from interface: NavigationStage
Get a shared stage instance that can be modified externally.

Specified by:
getCurrentStage in interface NavigationStage

getLink

public final Link getLink()
Description copied from interface: NavigationStage
Get a reference to the current stage link. This is a copy of the internal unmodifiable link.

Specified by:
getLink in interface NavigationStage

getAttributeInfo

public AttributeInfo getAttributeInfo()
Description copied from interface: NavigationStage
Get the metadata description for the form attribute on the current stage. This metadata indicates the attribute maintenance information that the flow will use when unloading stages.

Specified by:
getAttributeInfo in interface NavigationStage
Returns:
a maybe null FormAttribute instance.

getPreviousStage

public final NavigationStage getPreviousStage()
Description copied from interface: NavigationStageGroup
Return the previous navigation stage if any. If the current index is 0, this method will return null.

Specified by:
getPreviousStage in interface NavigationStageGroup

getSelectedIndex

public final int getSelectedIndex()
Description copied from interface: NavigationStageGroup
Get the selected index of the current group.

Specified by:
getSelectedIndex in interface NavigationStageGroup

getStages

public final java.util.List<NavigationStage> getStages()
Description copied from interface: NavigationStageGroup
Return a read-only list of loaded stages.

Specified by:
getStages in interface NavigationStageGroup

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object