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;
17:
18: import java.util.HashMap;
19:
20: import org.romaframework.aspect.core.annotation.AnnotationConstants;
21: import org.romaframework.aspect.core.annotation.CoreClass;
22: import org.romaframework.aspect.session.SessionInfo;
23: import org.romaframework.aspect.view.ViewConstants;
24: import org.romaframework.aspect.view.annotation.ViewClass;
25: import org.romaframework.aspect.view.annotation.ViewField;
26: import org.romaframework.aspect.view.page.EntityPage;
27:
28: @CoreClass(orderFields="entity attributes")
29: @ViewClass(entity=SessionInfo.class,columns=3)
30: public class ActiveSessionInstance extends EntityPage<SessionInfo> {
31:
32: @ViewField(render=ViewConstants.RENDER_TABLE,layout=ViewConstants.LAYOUT_BLOCK,selectionField="attributeSelected")
33: protected HashMap<String, SessionAttributeInfo> attributes;
34:
35: @ViewField(visible=AnnotationConstants.FALSE)
36: protected SessionAttributeInfo attributeSelected;
37:
38: public ActiveSessionInstance(SessionInfo iEntity, Object iBack) {
39: super (iEntity, iBack);
40: }
41:
42: public void cancel() {
43: back();
44: }
45:
46: public HashMap<String, SessionAttributeInfo> getAttributes() {
47: return attributes;
48: }
49:
50: public SessionAttributeInfo getAttributeSelected() {
51: return attributeSelected;
52: }
53:
54: public void setAttributeSelected(
55: SessionAttributeInfo attributeSelected) {
56: this.attributeSelected = attributeSelected;
57: }
58: }
|