Packageat.managers
Classpublic class MultiPathSlideManager
InheritanceMultiPathSlideManager Inheritance SlideManager Inheritance flash.events.EventDispatcher

Extends SlideManager. Allows deviations from the XMLList of slides intended to be navigated in the dataProvider of the SlideManager. For instance, if the SlideManager's dataProvider had the set {A,B,C} and we want to deviate to the path {E,F} and then return to the untouched dataProvider, this class allows it. It doesn't matter what the current slide is of the native set (A, B, or C). An offshoot from the current slide is created using the MultiPathSlideManager's navigateToOffshoot method. If a second offshoot set {O,M} is desired while in the first offshoot, it again doesn't matter which of (E or F) is current in offshoot 1, another offshoot extends from the current slide. There is no real limit to the number of offshoots that can stem from previous offshoots.

Note that when walking forward through offshoots, once navigation has stepped beyond the final (top) offshoot's last slide node all offshoots are popped off the stack and navigation returns to the SlideManager's default behavior until another offshoot is specified. The same is the case if walking backward off of the first offshoot, all offshoots are popped off the stack and navigation returns to the SlideManager's default behavior until another offshoot is specified.

To aid in visual cues/availability of navigation buttons (say if you want to disable them if a business would be violated by clicking it) methods are provided specifying what the next slide would be if you were to navigate to the next, previous, or any particular slide node.

To validate a move external to the this class, you may send the proposed destination slide node along with the MultiPathSlideManager's currentNode and send both to the NavigationChangeValidator's static method ValidateChange method to determine if the move would be valid if attemped.



Public Properties
 PropertyDefined by
 InheritedallSlides : XMLList
SlideManager
 InheritedcurrentBaseNodeIndex : int
If this class is subclassed, this method provides an alternate way to get to the index of the current node in the native dataProvider instead of having to use the sub-classed override implementation of the currentIndex method.
SlideManager
  currentID : String
[read-only] Returns the dbid attribute value of the current node (offshoot if applicable, otherwise current slide node native to SlideManager's dataProvider)
MultiPathSlideManager
  currentIndex : int
[read-only] Returns the index position of the current Node (offshoot if applicable, otherwise of the current slide node native to SlideManager's dataProvider)
MultiPathSlideManager
  currentNode : XML
[read-only] Returns the the current Node (offshoot if applicable, otherwise of the current slide node native to SlideManager's dataProvider)
MultiPathSlideManager
 InheriteddebugMode : Boolean = false
If true, trace statements reveal internal variable values at runtime.
SlideManager
  inOffShoot : Boolean
[read-only] Read-only.
MultiPathSlideManager
 InheritedloadedData : XMLList
The data that is loaded into the manager via the loadData method.
SlideManager
 Inheritedlockable : Boolean = false
If true, locks navigation for the duration specified in the lockTimeLimitMSec property.
SlideManager
 InheritedlockNav : Boolean
Indicates that navigation has been locked and navigation requests will be ignored.
SlideManager
 InheritedlockTimeLimitMSec : uint = 1000
Duration to lock navigation (ignore requests) for when lockable is set to true.
SlideManager
  offShootDepth : int
[read-only] Read-only.
MultiPathSlideManager
 InheritedslideCount : uint
Returns a number of slides in the SlideManager's dataProvider
SlideManager
Public Methods
 MethodDefined by
  
MultiPathSlideManager(debugMode:Boolean = false)
Constructor
MultiPathSlideManager
  
Clears out all offshoot data without updating the native underlying SlideManager's current slide or firing any events that the change was made.
MultiPathSlideManager
 Inherited
getBaseNodeIndex(referenceNode:XML):int
If this class is subclassed, this method provides an alternate way to get to the native dataProvider instead of having to use the sub-classed getNodeIndex method.
SlideManager
 Inherited
getCurrentNode(byReference:Boolean = false):XML
Returns a copy of the current node or a reference if specified.
SlideManager
  
getCurrentOffShootNode(byReference:Boolean = false):XML
Returns the current node in the current offshoot.
MultiPathSlideManager
 Inherited
getDefaultNode(byReference:Boolean = false):XML
Returns a copy of the default slide node
SlideManager
  
getLastVisitedNode(byReference:Boolean = false):XML
Returns the last visited slide node (not necessarily previous in the dataProvider's/offshoot's list).
MultiPathSlideManager
  
getNativeCurrentNode(byReference:Boolean = false):XML
Returns the underlying SlideManager's current node, NOT the current node in the current offshoot.
MultiPathSlideManager
  
getNativeNextNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML
Returns the underlying SlideManager's node following the current node, NOT the next node in any offshoots.
MultiPathSlideManager
  
getNativeNodeIndex(referenceNode:XML):int
Obtains the index of the provided node in the dataProvider of the super class's (SlideManager's) list of nodes
MultiPathSlideManager
  
getNativePreviousNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML
Returns the super class's (SlideManager's) node preceding the current node, NOT the next node in any offshoots.
MultiPathSlideManager
 Inherited
getNextBaseNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML
If this class is subclassed, this method provides an alternate way to get to the native dataProvider instead of having to use the sub-classed getNextNode method.
SlideManager
  
getNextNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML
Returns the node that would be navigated to if calling the gotoNext method.
MultiPathSlideManager
 Inherited
getNodeById(dbid:String, byReference:Boolean = false):XML
Searches the naviagation structure for the first node having the dbid specified
SlideManager
 Inherited
getNodeByIndex(index:int, byReference:Boolean = false):XML
Returns the node at the specified index in the slide list.
SlideManager
  
getNodeIndex(referenceNode:XML):int
Overrides the SlideManager's implementation that obtains the index of the current node within the list of nodes currently being navigated.
MultiPathSlideManager
  
getOffShootNodes():XMLList
Returns all the slide nodes of the current offshoot.
MultiPathSlideManager
  
getPreviousNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML
Returns the previous node that would be navigated to if the gotoPrev method were to be called.
MultiPathSlideManager
  
gotoNext(stayInTeir:Boolean = false, ignoreValidation:Boolean = false):Boolean
If in an offshoot: Navigates to the next node in the offshoot.
MultiPathSlideManager
  
gotoPrev(stayInTeir:Boolean = false, ignoreValidation:Boolean = false):Boolean
If in an offshoot: Navigates to the previous node in the offshoot.
MultiPathSlideManager
 Inherited
loadData(data:XMLList, setHomeToDefault_noEvents:Boolean = false, navigateHomeAndDispatchEvents:Boolean = false):Boolean
Uses the specified XMLList as a datasource for navigation requests.
SlideManager
  
navigateHome(ignoreValidation:Boolean = false):Boolean
Destroys all offshoots and navigates to the default slide node.
MultiPathSlideManager
  
navigateTo(slide_dbid_or_section_Title:String, ignoreValidation:Boolean = false):Boolean
Destroys all offshoots and navigates to the first slide node with a matching dbid attribute or parent node with a title attribute matching slide_dbid_or_section_Title String.
MultiPathSlideManager
  
navigateToNode(destinationNode:XML, ignoreValidation:Boolean = false):ValidationResult
Destroys all offshoots and navigates to the (referenced) slide node in the underlying SlideManager's dataProvider.
MultiPathSlideManager
  
navigateToOffShoot(slideList:XMLList, ignoreValidation:Boolean = false, displayMultipleSlideMessage:Boolean = true):Boolean
Navigates to the XMLList of content slides provided, independant of the current dataprovider.
MultiPathSlideManager
  
navigateToSlideIndex(index:int, ignoreValidation:Boolean = false):Boolean
Destroys all offshoots and navigates to the slide node at the specified index within the super class's (SlideManager's) dataProvider.
MultiPathSlideManager
  
reset(loadDefaultSlide:Boolean = true):void
Detroys all offshots, and resets the navigation manager.
MultiPathSlideManager
 Inherited
unlock(slideManager:SlideManager, unlock:Boolean):void
[static] Locks or unlocks the specified SlideManager.
SlideManager
Protected Methods
 MethodDefined by
  
validateChange(destinationNode:XML):ValidationResult
Checks if the requested change is valid based upon business rules set in the current node (in the offshoot if applicable, otherwise the slide node list in the navtive dataProvider) and the destination node by caling the static method NavigationChangeValidator.ValidateChange with the SlideManager's current node (or offshoot's current node if applicable) and the specified desitnation node.
MultiPathSlideManager
Events
 EventSummaryDefined by
 Inherited Dispatched after the target SlideManager has moved to it's new destination and properties have been updated.SlideManager
 Inherited Dispatched after the request has been determined to be valid, but before the target SlideManager has changed any of it's properties.SlideManager
 Inherited Dispatched when a navigation requset cannot be fulfilled.SlideManager
 Inherited Dispatched when the loadData method after the dataProvider has been updated (unless specified not to dispatch when loadData is called) SlideManager
 Inherited Dispatched when a navigation request is made, be it a valid request or not.SlideManager
Property detail
currentIDproperty
currentID:String  [read-only]

Returns the dbid attribute value of the current node (offshoot if applicable, otherwise current slide node native to SlideManager's dataProvider)

This property can be used as the source for data binding.

Implementation
    public function get currentID():String
currentIndexproperty 
currentIndex:int  [read-only]

Returns the index position of the current Node (offshoot if applicable, otherwise of the current slide node native to SlideManager's dataProvider)

This property can be used as the source for data binding.

Implementation
    public function get currentIndex():int

See also

currentNodeproperty 
currentNode:XML  [read-only]

Returns the the current Node (offshoot if applicable, otherwise of the current slide node native to SlideManager's dataProvider)

Implementation
    public function get currentNode():XML

See also

inOffShootproperty 
inOffShoot:Boolean  [read-only]

Read-only. If true, indicates that the MultipathSlideManager has deviated from the dataprovider's primary path. Because deviations can stack upon each other, offShootDepth may also be useful.

This property can be used as the source for data binding.

Implementation
    public function get inOffShoot():Boolean

See also

offShootDepthproperty 
offShootDepth:int  [read-only]

Read-only. Returns the current offshoot depth of the MultiPathSlideManager

Each time an offshoot is navigated to, an offshoot is stacked upon the current node. In the case that there is no offshoot, the offshoot depth is 0. In the case that the dataProvider has been deviated by one offshoot, the offShootDepth is 1. If another offshoot is visited while in an offshoot, the offshoot depth increments by one. When the navigating backward off the bottom offshoot, or forward off the top offshoot all offshoots are popped off from MultiPathSlideManager, resulting in an offshoot depth of 0

This property can be used as the source for data binding.

Implementation
    public function get offShootDepth():int
Constructor detail
MultiPathSlideManager()constructor
public function MultiPathSlideManager(debugMode:Boolean = false)

Constructor

Parameters
debugMode:Boolean (default = false)
Method detail
destroyAllOffShoots()method
public function destroyAllOffShoots():void

Clears out all offshoot data without updating the native underlying SlideManager's current slide or firing any events that the change was made. This method is intended to be useful in conjuction with other methods if performing lower-level data-intensive applications involving the MultiPathSlideManager.

getCurrentOffShootNode()method 
public function getCurrentOffShootNode(byReference:Boolean = false):XML

Returns the current node in the current offshoot.

Parameters
byReference:Boolean (default = false) — If true, returns a reference of the return node, if false returns a copy of it.

Returns
XML — Copy of or reference to the current slide XML node.

See also

getLastVisitedNode()method 
public override function getLastVisitedNode(byReference:Boolean = false):XML

Returns the last visited slide node (not necessarily previous in the dataProvider's/offshoot's list). If in an offshoot, returns the previously visited offshoot node (that hasn't been popped off the offshoot stack). If not in an offshoot, returns the super class's getLastVisitedNode method result. Returns the current node in teh current offshoot.

Parameters
byReference:Boolean (default = false) — If true, returns a reference of the return node, if false returns a copy of it.

Returns
XML — Copy of or reference to the last visited slide XML node.
getNativeCurrentNode()method 
public function getNativeCurrentNode(byReference:Boolean = false):XML

Returns the underlying SlideManager's current node, NOT the current node in the current offshoot.

Parameters
byReference:Boolean (default = false) — If true, returns a reference to the currentNode, if false returns a copy.

Returns
XMLXML of the current slide node.

See also

getNativeNextNode()method 
public function getNativeNextNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML

Returns the underlying SlideManager's node following the current node, NOT the next node in any offshoots.

Parameters
stayInTeir:Boolean (default = false) — if nodes are children of categories, specifies to return null in the node is the last in one of those categories, instead of returning the first node of the next category.
 
byReference:Boolean (default = false) — If true, returns a reference of the return node, if false returns a copy of it.

Returns
XMLXML of the current slide node.
getNativeNodeIndex()method 
public function getNativeNodeIndex(referenceNode:XML):int

Obtains the index of the provided node in the dataProvider of the super class's (SlideManager's) list of nodes

Parameters
referenceNode:XML — Node to get the index of.

Returns
int — Integer specifying the position in the list of the underlying SlideManager's dataProvider

See also

getNativePreviousNode()method 
public function getNativePreviousNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML

Returns the super class's (SlideManager's) node preceding the current node, NOT the next node in any offshoots.

Parameters
stayInTeir:Boolean (default = false) — if nodes are children of categories, specifies to return null in the node is the last in one of those categories, instead of returning the first node of the next category.
 
byReference:Boolean (default = false) — If true, returns a reference of the return node, if false returns a copy of it.

Returns
XMLXML of the current slide node.
getNextNode()method 
public override function getNextNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML

Returns the node that would be navigated to if calling the gotoNext method.

If in an offshoot: Returns the next node in the offshoot. If at the current node is last node in the current offshoot, returns the next offshoot's current position (before leaving it for the previous offshoot). If no other offshoot is above this offshoot and the current node is the last node in the offshoot, returns the underlying SlideManager's next node in it's native dataProvider.

Parameters
stayInTeir:Boolean (default = false) — if nodes are children of categories, specifies to return null if the node is the last in one of those categories, instead of returning the first node of the next category.
 
byReference:Boolean (default = false) — If true, returns a reference of the return node, if false returns a copy of it.

Returns
XMLXML of the current slide node.
getNodeIndex()method 
public override function getNodeIndex(referenceNode:XML):int

Overrides the SlideManager's implementation that obtains the index of the current node within the list of nodes currently being navigated. If in an offshoot, the index of the current node within the offshoot is returned, otherwise super class's getNodeIndex is called returning the index in the native dataProvider of the super class (SlideManager).

Parameters
referenceNode:XML — Node to get the index of.

Returns
int — Integer specifying the position in the list of nodes currently being navigated (in an offshoot or native dataProvider)

See also

getOffShootNodes()method 
public function getOffShootNodes():XMLList

Returns all the slide nodes of the current offshoot.

Returns
XMLList
getPreviousNode()method 
public override function getPreviousNode(stayInTeir:Boolean = false, byReference:Boolean = false):XML

Returns the previous node that would be navigated to if the gotoPrev method were to be called. If in an offshoot: Returns the previous node in the offshoot. If at the current node is first node in the offshoot, returns the previous offshoot's current position (before leaving it for the current offshoot). If no other offshoot is beneath this offshoot and the current node is the first node in the offshoot, returns the underlying SlideManager's previousNode in it's native dataProvider.

Parameters
stayInTeir:Boolean (default = false) — if nodes are children of categories, specifies to return null if in the node is the last in one of those categories, instead of returning the last node of the previous category.
 
byReference:Boolean (default = false) — If true, returns a reference of the return node, if false returns a copy of it.

Returns
XMLXML of the current slide node.
gotoNext()method 
public override function gotoNext(stayInTeir:Boolean = false, ignoreValidation:Boolean = false):Boolean

If in an offshoot: Navigates to the next node in the offshoot. If at the last node in the offshoot, navigates to the next offshoot and leaving the offshoot below it in the stack of offshoots. If at the last slide node in the top-most offshoot, destroys all offshoots and returns to the SlideManager's native dataProvider (and unlike the gotoPrevious method), navigates to the next node in the underlying SlideManager's dataProvider.

Parameters
stayInTeir:Boolean (default = false) — if nodes are children of categories, specifies to return null in the node is the last in one of those categories, instead of returning the first node of the next category.
 
ignoreValidation:Boolean (default = false) — forces the navigation even if it violates a business rule in either the current node or the desintation node.

Returns
Boolean — true if navigation was successful, otherwise false.

See also

gotoPrev()method 
public override function gotoPrev(stayInTeir:Boolean = false, ignoreValidation:Boolean = false):Boolean

If in an offshoot: Navigates to the previous node in the offshoot. If at the first node in the offshoot, navigates to the previous offshoot and pops the current offshoot off the stack of offshoots. If no other offshoot is beneath this offshoot and at the first node in the current offshoot, returns to the SlideManager's native dataProvider and pops the only offshoot off the stack dispatching events that the change has been made, but does not change the current node in the underlying SlideManager's dataProvider.

Parameters
stayInTeir:Boolean (default = false) — if nodes are children of categories, specifies to return null in the node is the last in one of those categories, instead of returning the first node of the next category.
 
ignoreValidation:Boolean (default = false) — forces the navigation even if it violates a business rule in either the current node or the desintation node.

Returns
Boolean — true if navigation was successful, otherwise false.

See also

navigateHome()method 
public override function navigateHome(ignoreValidation:Boolean = false):Boolean

Destroys all offshoots and navigates to the default slide node.

Parameters
ignoreValidation:Boolean (default = false) — If true, forces the move to the default slide node even if doing so violates a business rule of the current slide node or the default slide node.

Returns
Boolean — true if navigation was successful, otherwise false.
navigateTo()method 
public override function navigateTo(slide_dbid_or_section_Title:String, ignoreValidation:Boolean = false):Boolean

Destroys all offshoots and navigates to the first slide node with a matching dbid attribute or parent node with a title attribute matching slide_dbid_or_section_Title String. Note: If multiple slides may have the same dbid attribute and it is desired to visit one of these slide nodes beyond the first, consider using navigateToSlideIndex if navigating within the underlying SlideManager's dataProvider. within the dataProvider of the underlying SlideManager.

Parameters
slide_dbid_or_section_Title:String
 
ignoreValidation:Boolean (default = false) — forces the navigation even if it violates a business rule in either the current node or the desintation node.

Returns
Boolean — true if navigation was successful, otherwise false.

See also

navigateToNode()method 
public override function navigateToNode(destinationNode:XML, ignoreValidation:Boolean = false):ValidationResult

Destroys all offshoots and navigates to the (referenced) slide node in the underlying SlideManager's dataProvider.

Parameters
destinationNode:XML — a reference to the slide node to navigate to.
 
ignoreValidation:Boolean (default = false) — forces the navigation even if it violates a business rule in either the current node or the desintation node.

Returns
ValidationResult — true if navigation was successful, otherwise false.

See also

navigateToOffShoot()method 
public function navigateToOffShoot(slideList:XMLList, ignoreValidation:Boolean = false, displayMultipleSlideMessage:Boolean = true):Boolean

Navigates to the XMLList of content slides provided, independant of the current dataprovider. Once the slides are navigated through, the offshoot is discarded, and the gotoNext and gotoPrevious methods will not return to the offshoot. If returning to the offshoot is desired, use the ApplicationHistoryManager's back method or the PresentationModule's reference to the ApplicationHistoryManager called historyManager.

Parameters
slideList:XMLList — is the list of slide nodes to navigate through while deviating from the dataProvider's slides.
 
ignoreValidation:Boolean (default = false) — If true will bypass any navigation validation.
 
displayMultipleSlideMessage:Boolean (default = true) — If true will display a message warning the user that they will see the first slide in the provided group of slides (if slideList contains more than one slide).

Returns
Boolean — true if the navigation was successful, false otherwise.

Example
This is sample of the slideList parameter containing two content slides that will become two slides in an offshoot. Sending them causes an offshoot to be created, and navigation to the first slide in the list.
   <slide dbid="4" sectionID="1" slideFilename="/presentations/eveacore/slides/patient_caseStudy2.swf" slideThumbnailFilename="/presentations/eveacore/thumbnails/patient_caseStudy2_th.jpg" color="#b6544a" stateName="Patient - Case Study 2" id="Patient - Case Study 2" mustPrecede="" mustFollow="5" title="Patient - Case Study 2" />
   <slide dbid="5" sectionID="1" slideFilename="/presentations/eveacore/slides/patient_caseStudy2a.swf" slideThumbnailFilename="/presentations/eveacore/thumbnails/patient_caseStudy2a_th.jpg" color="#b6544a" stateName="Patient - Case Study 2a" id="Patient - Case Study 2a" mustPrecede="4" mustFollow="" title="Patient - Case Study 2a" />
   

navigateToSlideIndex()method 
public override function navigateToSlideIndex(index:int, ignoreValidation:Boolean = false):Boolean

Destroys all offshoots and navigates to the slide node at the specified index within the super class's (SlideManager's) dataProvider.

Parameters
index:int — index within the dataProvider to navigate to.
 
ignoreValidation:Boolean (default = false) — forces the navigation even if it violates a business rule in either the current node or the node at the specified index.

Returns
Boolean — true if navigation was successful, otherwise false.

See also

reset()method 
public override function reset(loadDefaultSlide:Boolean = true):void

Detroys all offshots, and resets the navigation manager. Dispatches events indicating either a navigation to the default slide has occured, or that the current slide has been set to null.

Parameters
loadDefaultSlide:Boolean (default = true) — If true, navigates to the underlying SlideManager's default node, if false, navigates to a null position and dispatches three events in the following order:

    NavigationChangeEvent.NAVIGATION_REQUEST
    NavigationChangeEvent.NAVIGATION_CHANGING
    NavigationChangeEvent.NAVIGATION_CHANGED

Note that in all three event types dispatched the newNode property of the NavigationChangeEvent will be null, however, because the change does not occur in the target until after the second NavigationChangeEvent.NAVIGATION_CHANGING event has fired, the target's currentNode property will remain non-null until after NavigationChangeEvent.NAVIGATION_CHANGING has been dispatched, but before the NavigationChangeEvent.NAVIGATION_CHANGED has been dispatched.

validateChange()method 
protected override function validateChange(destinationNode:XML):ValidationResult

Checks if the requested change is valid based upon business rules set in the current node (in the offshoot if applicable, otherwise the slide node list in the navtive dataProvider) and the destination node by caling the static method NavigationChangeValidator.ValidateChange with the SlideManager's current node (or offshoot's current node if applicable) and the specified desitnation node.

Parameters
destinationNode:XML — The requested node to navigate to.

Returns
ValidationResultValidationResult indicating whether there would be an error in the requested navigation. If there is no error, the isError property of the ValidationResult will be set to false, if an error exists and there for is invalid, the isError property will be set to true.

See also