01: package org.enhydra.encodingsample;
02:
03: public class EncodingSampleSessionData implements java.io.Serializable {
04: /**
05: * Hash key to save session data for the DiscRack app in the Session
06: */
07: public static final String SESSION_KEY = "EncodingSampleSessionData";
08:
09: protected String encoding = null;
10: protected String fileEncoding = null;
11:
12: public EncodingSampleSessionData() {
13: this .encoding = "UTF-8";
14: this .fileEncoding = "UTF-8";
15: }
16:
17: /**
18: * Sets the encoding parameter
19: *
20: * @param encoding the parameter, request and response encoding
21: */
22: public void setEncoding(String encoding) {
23: if (encoding != null && !"".equals(encoding)
24: && !"null".equalsIgnoreCase(encoding))
25: this .encoding = encoding;
26: }
27:
28: /**
29: * Gets the encoding parameter
30: *
31: * @return encoding
32: */
33: public String getEncoding() {
34: return this .encoding;
35: }
36:
37: /**
38: * Method to remove the current user from the session
39: */
40: public void setFileEncoding(String fileEncoding) {
41: if (fileEncoding != null && !"".equals(fileEncoding)
42: && !"null".equalsIgnoreCase(fileEncoding))
43: this .fileEncoding = fileEncoding;
44: }
45:
46: public String getFileEncoding() {
47: return this.fileEncoding;
48: }
49: }
|