Changeset 4232 for vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloSession.java
- Timestamp:
- 01/09/14 13:44:11 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloSession.java
r4201 r4232 4 4 import org.apache.wicket.protocol.http.WebSession; 5 5 import org.apache.wicket.request.Request; 6 import org.apache.wicket.request.mapper.parameter.PageParameters; 6 7 7 8 /** 8 * Class associating VLO sessions with a VLO theme and VLO page parameters. 9 * A web session containing a VLO theme and parameters that are considered to 10 * be persistent in a VLO session. 9 11 * 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 * 12 * Note that these parameters can include the specification of the theme. 13 * 14 14 * @author keeloo 15 15 */ 16 16 public class VloSession extends WebSession { 17 17 18 /** 19 * Remember the parameters that should persist in URLs to VLO pages 20 * <br><br> 21 */ 22 public VloPageParameters vloSessionPageParameters = new VloPageParameters(); 18 // remember the parameters that need to persist in URLs to VLO pages in this session 19 public PageParameters vloSessionPageParameters = new PageParameters(); 23 20 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 */ 21 // remember this session's theme 45 22 private Theme currentTheme = new Theme("defaultTheme"); 46 23 47 24 /** 48 * Construct or withrequest parameter25 * Construct a session object with a request parameter 49 26 * 50 27 * @param request … … 55 32 } 56 33 34 /** 35 * Get the session's theme 36 * 37 * @return the session's theme 38 */ 57 39 public Theme getCurrentTheme() { 58 return currentTheme;40 return this.currentTheme; 59 41 } 60 42 61 43 /** 44 * Set the session's theme 62 45 * 63 * @param currentTheme46 * @param theme the session's theme 64 47 */ 65 public void setCurrentTheme(Theme currentTheme) { 66 this.currentTheme = currentTheme; 48 public void setCurrentTheme(Theme theme) { 49 this.currentTheme = theme; 50 } 51 52 /** 53 * Return the session's persistent parameters 54 * 55 * @return session parameters 56 */ 57 public PageParameters getVloSessionPageParameters() { 58 return vloSessionPageParameters; 59 } 60 61 /** 62 * Add parameters to the session's persistent parameters 63 * 64 * @param parameters a page parameter map 65 * 66 */ 67 public void addVloSessionPageParameters(PageParameters parameters) { 68 69 vloSessionPageParameters.mergeWith(parameters); 67 70 } 68 71 }
Note: See TracChangeset
for help on using the changeset viewer.