Solstice::State::Tracker - Tracks each users' progress through the state graph.
use Solstice::State::Tracker; my $tracker = new Solstice::State::Tracker; my $current_state = $tracker->getState(); # These are passthroughs to the state machine $validate = $tracker->requiresValidation('transition'); $revert = $tracker->requiresRevert('transition'); $fresh = $tracker->requiresFresh('transition'); $commit = $tracker->requiresCommit('transition'); $update = $tracker->requiresUpdate('transition'); if (! $tracker->transition('transition')) { die "Couldn't make a transition"; } my $controller_name = $tracker->getController();
This tracks the way a user moves through a Solstice tool. It seperates the state data from the movement through it, to help save some memory/cpu in the generation/storing of the state table. This is also the model for the navigation view.
Constructor for a new State::Tracker object. You are not in a state yet until you call startApplication.
Pushes a new flow and state onto the stack. Use this when you need to set the user's position to a particular flow/state (like when they type in a URL).
Transitions to the next state given the action.
returns - the next state name; undef if invalid.
Returns the controller for the current state.
Returns the name of the current state.
Sets the current state.
Returns whether the user should be able to use the back button after this transition.
Returns the error message a user should receive if the back button is used but not allowed.
Returns whether we have to run lifecycle stages
Transitions to the failover state for the corresponding lifecycle stage.
returns - the controller for the new state.
Nontransitioning version of failUpdate()
Nontransitioning version of failValidPreConditions()
Returns the current page flow.
Catalyst Group, <catalyst@u.washington.edu>
$Revision: 3364 $
Copyright 1998-2007 Office of Learning Technologies, University of Washington
Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.opensource.org/licenses/ecl1.php
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
To install Solstice, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Solstice
CPAN shell
perl -MCPAN -e shell install Solstice
For more information on module installation, please visit the detailed CPAN module installation guide.