01: /*
02: * Created on Mar 16, 2005
03: */
04: package com.sun.portal.wireless.admin;
05:
06: import java.util.List;
07:
08: import com.sun.portal.admin.common.PSMBeanException;
09:
10: import com.sun.ssoadapter.config.Configuration;
11:
12: /**
13: * MobileAppAttributeHandler to handle attributes stored in URL config strings.
14: *
15: * @author ashwin.mathew@sun.com
16: */
17: public class ConfigURLMobileAppAttributeHandler extends
18: DefaultMobileAppAttributeHandler {
19:
20: private String configurationName;
21:
22: /**
23: * @param service
24: * @param attributeName
25: * @param userFriendlyName
26: * @param scope
27: * @param type
28: * @param privilege
29: */
30: protected ConfigURLMobileAppAttributeHandler(String service,
31: String attributeName, String userFriendlyName, int scope,
32: int type, int actualType, int privilege,
33: String configurationName) {
34: super (service, attributeName, userFriendlyName, scope, type,
35: actualType, privilege);
36: this .configurationName = configurationName;
37: }
38:
39: /* (non-Javadoc)
40: * @see com.sun.portal.wireless.admin.MobileAppAttributeHandler#processGetValue(java.util.List)
41: */
42: public List processGetValue(List values) throws PSMBeanException {
43: Configuration config = null;
44:
45: for (int i = 0; i < values.size(); i++) {
46: String configStr = (String) values.get(i);
47: config = new Configuration(configStr);
48:
49: if (config.getConfigurationName().equals(configurationName)) {
50: break;
51: } else {
52: config = null;
53: }
54: }
55:
56: return values;
57: }
58:
59: /* (non-Javadoc)
60: * @see com.sun.portal.wireless.admin.MobileAppAttributeHandler#processSetValue(java.util.List)
61: */
62: public List processSetValue(List values) throws PSMBeanException {
63: // TODO Auto-generated method stub
64: return super.processSetValue(values);
65: }
66: }
|