01: /*
02: * Copyright 2005 jWic Group (http://www.jwic.de)
03: * $Id: SessionEvent.java,v 1.1 2006/01/16 08:30:40 lordsam Exp $
04: */
05: package de.jwic.events;
06:
07: import java.util.Map;
08:
09: import de.jwic.base.SessionContext;
10:
11: /**
12: * Contains informations about the parameters used to reuse a SessionContext object.
13: * @version $Revision: 1.1 $
14: * @author Florian Lippisch
15: */
16: public class SessionEvent {
17:
18: private SessionContext sessionContext = null;
19: private Map parameters = null;
20:
21: public SessionEvent(Map parameter) {
22: this .parameters = parameter;
23: }
24:
25: /**
26: * Returns the value of the specified paramter.
27: * @param key
28: * @return
29: */
30: public String getParameter(String key) {
31: String[] values = (String[]) parameters.get(key);
32: if (values != null) {
33: return values[0];
34: }
35: return null;
36: }
37:
38: /**
39: * @return Returns the parameters.
40: */
41: public Map getParameters() {
42: return parameters;
43: }
44:
45: /**
46: * @param parameters The parameters to set.
47: */
48: public void setParameters(Map parameters) {
49: this .parameters = parameters;
50: }
51:
52: /**
53: * @return Returns the SessionContext for this event.
54: */
55: public SessionContext getSessionContext() {
56: return sessionContext;
57: }
58:
59: /**
60: * @param sessionContext The SessionContext for this event.
61: */
62: public void setSessionContext(SessionContext sessionContext) {
63: this.sessionContext = sessionContext;
64: }
65: }
|