NAME

Oak::Controller - Base class for the business logic tier

DESCRIPTION

This class is the base class for the business logic tier. This is the second of the three layers model.

HIERARCHY

Oak::Object

Oak::Persistent

Oak::Component

Oak::Controller

PROPERTIES

transaction_io

A comma separated list of IO objects that support the begin_work, commit and rollback functions used by this controller and that have transaction support. This class will start the transaction before the action, rollback if some exception raises and commit if everything goes fine.

authenticable

Boolean, defines if this module will implement authentication.

auth_service

Used if authenticable to define the service definition (see Oak::AAS::Session)

auth_userfield

Used if authenticable to define which field in the BAG is the username

auth_sessionidfield

Used if authenticable to define which field in the BAG is the password

EVENTS

ev_onMessage

Dispatched when some message is called.

METHODS

message(NAME, PARAM => VALUE, PARAM => VALUE)

Call the action in the component NAME with the other params. The other params are set in the $self->{BAG} variable. This function returns the BAG after the modifications.

authenticate

If this class is authenticable this methd is called to verify if the user is authenticated. If it doesnt, throw an Oak::Controller::Error::Auth

When creating a authenticable controller, remember to set the auth_service, auth_userfield and the auth_sessionidfield property.

EXCEPTION HANDLING

Oak::Controller::Error::Auth

Will be thrown if an authentication error is found

Oak::Controller::Error

An exception that must be used for generic Controller Errors

COPYRIGHT

Copyright (c) 2001 Daniel Ruoso <daniel@ruoso.com> Aguimar Mendonca Neto <aguimar@email.com.br> All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.