01: /*
02: * Copyright 2006 Luca Garulli (luca.garulli@assetdata.it)
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.romaframework.module.admin.view.domain.activesession.http;
17:
18: import javax.servlet.http.HttpSession;
19:
20: import org.romaframework.module.admin.view.domain.activesession.SessionAttributeInfo;
21:
22: /**
23: * SessionAttributeInfo implementation tracking changes with underline
24: * HttpSession.
25: *
26: * @author Luca Garulli (luca.garulli@assetdata.it)
27: *
28: */
29: public class HttpSessionAttributeInfo extends SessionAttributeInfo {
30: private HttpSession session;
31:
32: public HttpSessionAttributeInfo(HttpSession iSession, String name) {
33: super (name);
34: session = iSession;
35: }
36:
37: @Override
38: public Object getValue() {
39: return session.getAttribute(name);
40: }
41:
42: @Override
43: public void setValue(Object value) {
44: session.setAttribute(name, value);
45: }
46:
47: public HttpSession getSession() {
48: return session;
49: }
50: }
|