| Solstice documentation | Contained in the Solstice distribution. |
Solstice::Controller::Application - The super class for all application controllers.
use Solstice::Controller::Application; our @ISA = qw(Solstice::Controller::Application);
Has the stub functions that all application controllers need.
No symbols exported.
Constructor.
Returns the controller currently set for a subclass.
This function is for subclasses, so they can tell us which controller to use.
Validates user input from the previous screen.
Does any action of the controller after validation, such as saving objects or deleting them.
Makes sure the controller knows everything it needs to in order to create the next view.
Allows conrollers to clean up any resource they need to right before the click lifecycle is over
Returns the view of the summary.
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.
| Solstice documentation | Contained in the Solstice distribution. |
package Solstice::Controller::Application; # $Id: Application.pm 3364 2006-05-05 07:18:21Z mcrawfor $
use 5.006_000; use strict; use warnings; use base qw(Solstice::Controller); use Carp qw(confess); use constant TRUE => 1; use constant FALSE => 0; our ($VERSION) = ('$Revision: 3364 $' =~ /^\$Revision:\s*([\d.]*)/);
sub new { my $class = shift; return $class->SUPER::new(@_); }
sub getController { my $self = shift; return $self->{'_controller'}; }
sub setController { my $self = shift; $self->{'_controller'} = shift; }
sub validate { my $self = shift; unless (defined $self->getController()) { confess "validate(): Controller not defined"; } return $self->getController()->validate(); }
sub update { my $self = shift; unless (defined $self->getController()) { confess "update(): Controller not defined"; } return $self->getController()->update(); }
sub revert { my $self = shift; unless (defined $self->getController()) { confess "revert(): Controller not defined"; } return $self->getController()->revert(); }
sub commit { my $self = shift; unless (defined $self->getController()) { confess "commit(): Controller not defined"; } return $self->getController()->commit(); }
sub validPreConditions { my $self = shift; unless (defined $self->getController()) { confess "validPreConditions(): Controller not defined"; } return $self->getController()->validPreConditions(); } sub initialize { my $self = shift; unless (defined $self->getController()) { confess "initialize(): Controller not defined"; } return $self->getController()->initialize(); }
sub finalize { my $self = shift; unless (defined $self->getController()) { confess "finalize(): Controller not defined"; } return $self->getController()->finalize(); }
sub getView { my $self = shift; unless (defined $self->getController()) { confess "getView(): Controller not defined"; } return $self->getController()->getView(); }
sub setInputName { my $self = shift; unless (defined $self->getController()) { confess "setInputName(): Controller not defined"; } return $self->getController()->setInputName(@_); }
sub setOutputName { my $self = shift; unless (defined $self->getController()) { confess "setOutputName(): Controller not defined"; } return $self->getController()->setOutputName(@_); }
sub setRequiresAuth { my $self = shift; $self->{'_requires_auth'} = shift; }
sub getRequiresAuth { my $self = shift; return $self->{'_requires_auth'} || FALSE; }
sub getBookmarkState { }
sub getBookmarkID { }
sub getBookmarkLabel { }
sub setBookmarkID { warn "setBookmarkID should really be handled by the application controller."; } 1; __END__