01: /*
02: * Created on Jul 8, 2005
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package com.sun.portal.admin.console.sra.utils;
08:
09: import java.util.List;
10:
11: import com.sun.data.provider.RowKey;
12: import com.sun.data.provider.impl.ObjectListDataProvider;
13: import com.sun.portal.admin.console.sra.SraBaseBean;
14: import com.sun.portal.admin.console.common.PSBaseBean;
15:
16: /**
17: * @author ss150821
18: *
19: * Preferences - Java - Code Style - Code Templates
20: */
21: public class SraObjectListDataProvider extends ObjectListDataProvider {
22:
23: private String _id = null;
24:
25: public SraObjectListDataProvider(String id, List objects) {
26: super (objects);
27: _id = id;
28:
29: Object value = PSBaseBean.getSessionAttribute(_id);
30: if (value != null) {
31: super .getList().add(value);
32: SraBaseBean.removeFromSession(_id);
33: }
34:
35: }
36:
37: public RowKey appendRow(Object value) {
38: PSBaseBean.setSessionAttribute(_id, value);
39: return super.appendRow(value);
40: }
41: }
|