1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.jetspeed.om.common.preference;
19
20 import java.io.Serializable;
21 import java.util.Iterator;
22 import java.util.Locale;
23
24 import org.apache.pluto.om.common.Description;
25 import org.apache.pluto.om.common.Preference;
26 import org.apache.pluto.om.common.PreferenceCtrl;
27
28 /***
29 *
30 * PreferenceComposite
31 *
32 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
33 * @version $Id: PreferenceComposite.java,v 1.2 2004/06/18 20:46:21 weaver Exp $
34 *
35 */
36 public interface PreferenceComposite extends PreferenceCtrl, Preference, Serializable
37 {
38 String DEFAULT_PREFERENCE = "org.apache.pluto.om.common.Preference.default";
39 String USER_PREFERENCE = "org.apache.pluto.om.common.Preference.default.user";
40
41 void addDescription(Locale locale, String Description);
42
43 Description getDescription(Locale locale);
44
45 /***
46 * @throws java.lang.ArrayIndexOutofBounds if index is outside the constraints
47 * @param index
48 * @return The String value at the specified index or <code>null</code>
49 * if no values are present.
50 */
51 String getValueAt(int index);
52
53 /***
54 *
55 * @param index
56 */
57 void removeValueAt(int index);
58
59 /***
60 *
61 * <p>
62 * setValueAt
63 * </p>
64 * Sets the current Preference's value at <code>index</code>
65 * to the specified <code>value</code>
66 *
67 * @param index Index hows value will be set.
68 * @param value Value to set
69 *
70 */
71 void setValueAt(int index, String value);
72
73 /***
74 *
75 * <p>
76 * addValue
77 * </p>
78 * Adds a new value to this Preference.
79 * @param value Vale to add to the preference
80 *
81 */
82 void addValue(String value);
83
84 /***
85 *
86 * @return
87 */
88 String[] getValueArray();
89
90 /***
91 *
92 * <p>
93 * setValues
94 * </p>
95 *
96 * Replaces the current set of values of this preference
97 * with this one.
98 *
99 * @param stringValues
100 *
101 */
102 void setValues(String[] stringValues);
103
104 /***
105 * @return
106 */
107 String getType();
108 /***
109 * @param string
110 */
111 void setType(String string);
112
113 String[] cloneValues();
114
115 Iterator getDescriptions();
116
117 }