Big Sister Web Application Framework
|
Sub classes implement one BigSWAF application. More...
Public Class Methods | |
retval | new (scalar this, scalar appid) |
Public Object Methods | |
retval | clone () |
Clone/copy this object. | |
BigSWAF::AppHandler | env (BigSWAF::AppHandler) |
Get/set application handler in charge. | |
BigSWAF::Configuration | config (BigSWAF::Configuration) |
Get/set the configuration of the current application. | |
scalar | request () |
Handle one request. | |
retval | script (scalar script) |
Get/set the name of the "script" (means the name of the method in the current application) the request was targeted at. | |
retval | skinrequest (scalar path) |
Handles requests to "skin" method. | |
retval | default () |
This method is invoked if request() was unable to find a more specific implmentation for the current request. | |
BigSWAF::DispEngine | display (BigSWAF::DispEngine) |
Get/set the display engine in charge. | |
retval | getlogin () |
Get the login name of the user logged on for the current session. | |
retval | getdomain () |
Get the domain name of the user logged on for the current session. | |
retval | login_identifier () |
Compute a unique identifier for the configured authentication method and parameters. | |
list | getcredentials () |
Returns login and password of the user currently logging in. | |
retval | login (scalar realm, scalar domains) |
Sets up a login screen for the current application and its configured authentication method. | |
retval | logout () |
Removes information about what users have authenticated in the current session. | |
retval | authenticate (scalar realm, scalar domains) |
Returns a document with a login dialog depending on the configured "login_method". | |
retval | login_dialog (scalar realm, scalar domains) |
Returns a login dialog. | |
retval | log (scalar level, scalar message) |
Log a message with the given level and message. | |
retval | getpref (scalar pref) |
Get the value of an option set in the user preferences. | |
retval | setpref (scalar pref, scalar value) |
Set the value of an option in the user preferences. | |
scalar | handle_request_exception (BigSWAF::Exception exception) |
Handle an application exception. | |
scalar | display_request_exception (BigSWAF::Exception exception, scalar text, list arguments) |
Convert an exception with the given text and arguments into an error document. | |
hash | set_flags (scalar flag, scalar value) |
Sets global BigSWAF::DispEngine::setglobal() variable for one or multiple flags. | |
retval | param (list ARGS) |
Get one parameter out of the current request. | |
retval | paramv (list ARGS) |
Get one parameter out of the current request. | |
retval | upload_filehandle (list ARGS) |
If a parameter is associated with an input field of type "file", then param() and paramv() return the uploaded file's name, while upload_filehandle() returns a handle to the actual uploaded file. |
Sub classes implement one BigSWAF application.
retval BigSWAF::Application::authenticate | ( | scalar | realm, |
scalar | domains | ||
) |
Returns a document with a login dialog depending on the configured "login_method".
This method is usually invoked by login() rather than by the application itself.
Currently, if the login_method is "dialog" then a login dialog document is returned, otherwise the request handlers authenticat() method is called - which usually means that the client browser will ask for user and password.
retval BigSWAF::Application::clone | ( | ) |
Clone/copy this object.
BigSWAF::Configuration BigSWAF::Application::config | ( | BigSWAF::Configuration | ) |
Get/set the configuration of the current application.
retval BigSWAF::Application::default | ( | ) |
This method is invoked if request() was unable to find a more specific implmentation for the current request.
BigSWAF::DispEngine BigSWAF::Application::display | ( | BigSWAF::DispEngine | ) |
Get/set the display engine in charge.
scalar BigSWAF::Application::display_request_exception | ( | BigSWAF::Exception | exception, |
scalar | text, | ||
list | arguments | ||
) |
Convert an exception with the given text and arguments into an error document.
This method is usually invoked by handle_request_exception and text and arguments list is extracted from the thrown exception beforehand.
BigSWAF::AppHandler BigSWAF::Application::env | ( | BigSWAF::AppHandler | ) |
Get/set application handler in charge.
list BigSWAF::Application::getcredentials | ( | ) |
Returns login and password of the user currently logging in.
retval BigSWAF::Application::getdomain | ( | ) |
Get the domain name of the user logged on for the current session.
retval BigSWAF::Application::getlogin | ( | ) |
Get the login name of the user logged on for the current session.
retval BigSWAF::Application::getpref | ( | scalar | pref | ) |
Get the value of an option set in the user preferences.
scalar BigSWAF::Application::handle_request_exception | ( | BigSWAF::Exception | exception | ) |
Handle an application exception.
If the application throws an exception when invoked by request(), request() invokes handle_request_exception(). By default, the exception is presented as an error screen to the user.
retval BigSWAF::Application::log | ( | scalar | level, |
scalar | message | ||
) |
Log a message with the given level and message.
Stub without function, currently.
retval BigSWAF::Application::login | ( | scalar | realm, |
scalar | domains | ||
) |
Sets up a login screen for the current application and its configured authentication method.
If the current request contains login information this information is used to try to authenticate the user. If the authentication succeeds, then an undefined value is returned in order to tell the caller that the login sequence is complete.
retval BigSWAF::Application::login_dialog | ( | scalar | realm, |
scalar | domains | ||
) |
Returns a login dialog.
This method is usually invoked by authenticat() if the configured login_method is "dialog".
retval BigSWAF::Application::login_identifier | ( | ) |
Compute a unique identifier for the configured authentication method and parameters.
A user logged in in a session will be known across multiple applications as long as they request the same authentication method and therefore have the same login_identifier().
retval BigSWAF::Application::logout | ( | ) |
Removes information about what users have authenticated in the current session.
This actually means that the session is returned into an "anonymous" state with no user logged in.
retval BigSWAF::Application::new | ( | scalar | this, |
scalar | appid | ||
) |
retval BigSWAF::Application::param | ( | list | ARGS | ) |
Get one parameter out of the current request.
This is a frontend to BigSWAF::AppHandler::param()
retval BigSWAF::Application::paramv | ( | list | ARGS | ) |
Get one parameter out of the current request.
This is a frontend to BigSWAF::AppHandler::paramv()
scalar BigSWAF::Application::request | ( | ) |
Handle one request.
Extracts the method requested by the client from the called URI and tries (in this order)
Reimplemented in BigSWAF::ApplicationStatic.
retval BigSWAF::Application::script | ( | scalar | script | ) |
Get/set the name of the "script" (means the name of the method in the current application) the request was targeted at.
hash BigSWAF::Application::set_flags | ( | scalar | flag, |
scalar | value | ||
) |
Sets global BigSWAF::DispEngine::setglobal() variable for one or multiple flags.
The flag argument may be a list, a hash or a single name of a flag.
In case the flag argument is a scalar set_flags expect it to contain the name of a flag. If the value is undefined then set_flags does try to retrieve a value via paramv(). Then, a global variable with the name "flag_(flag)_(value)" is set. This variable can then be addressed in skins using @ in order to test if a flag is set to a specific value.
In case the flag argument is a hash ref, the hash keys are expected to be flag names and the hash values the corresponding values. In case the flag argument is an array ref, the list is supposed to be a list of flag names. In the latter case there is no possibility to pass values other than through paramv()
flag | Name of a flag, hash ref with flag/value pairs or hash ref with list of flag names |
value | (optional) Only accepted when flag argument is a flag name. |
retval BigSWAF::Application::setpref | ( | scalar | pref, |
scalar | value | ||
) |
Set the value of an option in the user preferences.
retval BigSWAF::Application::skinrequest | ( | scalar | path | ) |
Handles requests to "skin" method.
Returns the corresponding document out of the skins directory of the current application.
retval BigSWAF::Application::upload_filehandle | ( | list | ARGS | ) |
If a parameter is associated with an input field of type "file", then param() and paramv() return the uploaded file's name, while upload_filehandle() returns a handle to the actual uploaded file.