source: vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloSession.java @ 4201

Last change on this file since 4201 was 4201, checked in by keeloo, 10 years ago

After splitting of a branch (r4199) including code for moving from wicket 1.4 to wicket 6, some more modifications in the direction of that target.

File size: 1.6 KB
Line 
1
2package eu.clarin.cmdi.vlo;
3
4import org.apache.wicket.protocol.http.WebSession;
5import org.apache.wicket.request.Request;
6
7/**
8 * Class associating VLO sessions with a VLO theme and VLO page parameters.
9 *
10 * While it is never explicitly created, it is always part of a cast, the public
11
12* field of objects of this class seems to hold the expected values.
13 *
14 * @author keeloo
15 */
16public class VloSession extends WebSession {
17
18    /**
19     * Remember the parameters that should persist in URLs to VLO pages
20     * <br><br>
21     */
22    public VloPageParameters vloSessionPageParameters = new VloPageParameters();
23
24    /**
25     *
26     * @return
27     */
28    public VloPageParameters getVloSessionPageParameters() {
29        return vloSessionPageParameters;
30    }
31
32    /**
33     * Add page parameters with the VLO session related ones
34     *
35     * @param parameters a page parameter map
36     *
37     */
38    public void addVloSessionPageParameters(VloPageParameters parameters) {
39       
40        vloSessionPageParameters.mergeWith(parameters);
41    }
42    /**
43     * Theme currently applied in the VLO web application
44     */
45    private Theme currentTheme = new Theme("defaultTheme");
46
47    /**
48     * Constructor with request parameter
49     *
50     * @param request
51     */
52    public VloSession(Request request) {
53        // only the parameterless constructors are invoked implicitly
54        super(request);
55    }
56
57    public Theme getCurrentTheme() {
58        return currentTheme;
59    }
60
61    /**
62     *
63     * @param currentTheme
64     */
65    public void setCurrentTheme(Theme currentTheme) {
66        this.currentTheme = currentTheme;
67    }
68}
Note: See TracBrowser for help on using the repository browser.