01: /*
02: * Created on Mar 15, 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: /**
11: * Handles attributes prefixed with "default|".
12: *
13: * @author ashwin.mathew@sun.com
14: */
15: public class DefaultPipeMobileAppAttributeHandler extends
16: DefaultMobileAppAttributeHandler {
17:
18: private static final String PREFIX = "default|";
19:
20: /**
21: * @param service
22: * @param attributeName
23: * @param userFriendlyName
24: * @param scope
25: * @param type
26: * @param privilege
27: */
28: protected DefaultPipeMobileAppAttributeHandler(String service,
29: String attributeName, String userFriendlyName, int scope,
30: int type, int actualType, int privilege) {
31: super (service, attributeName, userFriendlyName, scope, type,
32: actualType, privilege);
33: }
34:
35: /* (non-Javadoc)
36: * @see com.sun.portal.wireless.admin.MobileAppAttribute#parseValue(java.lang.String)
37: */
38: public List processSetValue(List values) throws PSMBeanException {
39: String value = (String) values.get(0);
40: values.set(0, PREFIX + value);
41:
42: return values;
43: }
44:
45: /* (non-Javadoc)
46: * @see com.sun.portal.wireless.admin.MobileAppAttribute#processGetValue(java.lang.String)
47: */
48: public List processGetValue(List values) throws PSMBeanException {
49: String value = (String) values.get(0);
50: values.set(0, value.substring(PREFIX.length()));
51:
52: return values;
53: }
54:
55: }
|