GPMSWiki/DeveloperDocumentation/MigrationHelp/SessionManagementChanges: Difference between revisions

From BRF-Software
Jump to navigation Jump to search
imported>MichaelDondrup
No edit summary
 
imported>MichaelDondrup
No edit summary
Line 8: Line 8:
== Classes ==
== Classes ==


You can have multiple sessions of different classes. An application specific subclass of Session::GPMS is mandatory. It has to be placed in the application subdirectory share/perl/Session/GPMS.  
You can have multiple sessions of different classes. An application specific subclass of Session::GPMS is mandatory. It has to be placed in the application subdirectory share/perl/Session/GPMS.


Here is a simple example:
Here is a simple example:
Line 56: Line 56:




== API ==  
== API ==


* The
* The function '''params''' delivered all parameter values as key value pairs. This function does no longer exist. To replace it:
** get all session parameters by using function ''getParams'' to get all parameter names
** use ''param'' on each name and store the value
*

Revision as of 17:58, 6 November 2008

Changes in the Session Management

The new Sessionmanagement module is completely new and build from scratch. It supports hierarchical sessions, and also anonymous sessions. Complete redesign implies vast changes throughout the API. So expect some work.

Classes

You can have multiple sessions of different classes. An application specific subclass of Session::GPMS is mandatory. It has to be placed in the application subdirectory share/perl/Session/GPMS.

Here is a simple example:


package Session::GPMS::EMMAII;

=head1 NAME

Session::GPMS::EMMA2

=head1 DESCRIPTION

Sample implementation of a Session::GPMS::Application class, using GPMS::Application_Frame::Sample

=cut

use strict;
use warnings;
use GPMS::Application_Frame::EMMAII;

use base qw(Session::GPMS::Application);

1;

### Begin Class Methods ###

sub AppFrameClass {
    # we use GPMS::Application_Frame::EMMAII
    return "GPMS::Application_Frame::EMMAII";
}

sub NeedSingleton {
    # we cannot have multiple instances of an EMMA apllications at the moment
    # this could change in the future....
    return 1;
}

### End Class Methods ###



__END__


API

  • The function params delivered all parameter values as key value pairs. This function does no longer exist. To replace it:
    • get all session parameters by using function getParams to get all parameter names
    • use param on each name and store the value