The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Solstice::Controller - A virtual superclass for constructing Solstice controllers.

SYNOPSIS

  package MyApp::Controller;

  use Solstice::Controller;

  our @ISA = qw(Solstice::Controller);

DESCRIPTION

This is a virtual class for creating Solstice controller classes. This class should never be instantiated as an object, rather, it should always be sub-classed. This particular implementation uses Solstice::CGI to handle events by the user.

Export

No symbols exported.

Methods

new()

Creates a new Solstice::Controller object.

build
validPreConditions()
freshen()
update()
validate()
commit()
revert()
setModel($model)

Set the data model that this controller controls.

getModel()

Get the data model that this controller controls.

setSuccessView($view)

Set the success view that this controller controls.

getStartingView()

This gets the first view that a controller produces, like the form that the controller will then manage. Must by subclassed.

setErrorView($view)

Set the error view for this controller.

getErrorView()

Get the error view for this controller.

getChildView($key)

Returns a view object for the child controller of a given key.

getChildViews($key)

Returns an array ref of view objects for all of the child controllers of a given key.

setError($error)

Sets an error object for placement into the views

getError()

Gets the error object for this controller.

getErrMsgs()

Get the error messages for this controller.

checkForm($profile)

This method takes a form profile to be passed to Data::FormValidator, and returns a Data::FormValidator::Results object.

createParam('param_name')

Adds a new param to be validated. This is required by default.

createRequiredParam('param_name')

Adds a new param to be validated. Requires user input.

createOptionalParam('param_name');

Adds a new param to be validated. Does not require user input.

createGroupDependency({ dependency_name => 'name', require => $count, fields => [ $field1, $field2] });

Allows the use of require_some...

processConstraints()

Takes all of the constraints added to a controller, transforms them into a hash for Data::FormValidator.

setInputName($location_name)
getInputName()
setOutputName($location_name)
getOutputName()
getInputObject()
getOutputObject()
setInputObject($object)
setOutputObject($object)
createChildControllerList( 'loop_name', 'var_name' )
addChildController($key,( $controller || \@controllers) )
getChildController($key)
getChildControllers($key)

returns a reference to an array of 'em.

clearChildControllers($key)
validateChildren($key)
updateChildren($key)
revertChildren($key)
commitChildren($key)
validPreConditionsChildren($key)
freshenChildren($key)
getDateTimeController($model)

Return the preferred Solstice datetime controller, or a fallback.

getRichTextController($model)

Return the preferred Solstice rich-text controller, or a fallback.

Private Methods

_initErrMsgs()

Initialize the error messages for this controller.

Modules Used

Solstice::Service, Solstice::LogService, Solstice::UserService, Solstice::ValidationParam, Solstice::CGI, Solstice::CGI::FormError, Data::FormValidator.

AUTHOR

Catalyst Group, <catalyst@u.washington.edu>

VERSION

Version $Revision: 3365 $

COPYRIGHT

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.