ePages 7.38.0 - DE_EPAGES/Presentation/Servlet/BasePermission.pm

Package DE_EPAGES::Presentation::Servlet::BasePermission

This servlet acts as base class for all URL handling servlets. It is not intended to be instanced directly.

Base
DE_EPAGES::WebInterface::Servlet::BaseServlet

Functions

checkDatabaseRedirect
handleStoreNotFound
logUserFault
new
vars
viewError

checkDatabaseRedirect

This method handles database redirection, e.g. show an error page if a store is closed. It returns 0 if an error or a redirection is done, which then should lead to an abort in the servlet request handler.

Syntax
my $ContinueWithServlet = $Servlet->checkDatabaseRedirect();
Return
0 or 1 (boolean)
0 if a redirection/error handling is done, 1 if servlet
processing should be continued

handleStoreNotFound

This function sets the HTTP status 404 - "Not Found" and displays an error message and logs a warning message containing QUERY_STRING and HTTP_REFERER.

Syntax
$Servlet->handleStoreNotFound( $Error );
Input
$Error (object)
error object

logUserFault

Handles an error. This function logs the error and then displays it using the viewError method. This method must be overloaded by any sub class.

Syntax
$Servlet->logUserFault( $Error );

new

Create a new servlet, create Variables member hash.

Syntax
$Servlet = new DE_EPAGES::Presentation::Servlet::BasePermission;
Example
my $BasePermissionServlet = new DE_EPAGES::Presentation::Servlet::BasePermission;
Return
$Servlet (object)
blessed object

vars

Without parameter returns all set variables.
With one parameter (name of variable) the value of this variable will be returned.
With two parameter (name and value of variable) the value of this variable will be set.

Syntax
$hVars = $Servlet->vars;
$Value= $Servlet->vars($Name);
$Servlet->vars($Name, $Value);
Example
$Servlet->vars('OutputEncoding', 'ISO-8859-1');
Input
$Name (string)
name of variable (optional)
$Value (string)
value of variable (optional)
Return
$hVars (ref.hash)
set TLE variables as key value pairs
$Value (string)
value of given variable name

viewError

Displays an error page, which is processed by processErrorContent. This method must be overloaded by any sub class.

Syntax
$Servlet->viewError( $Error );