KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > plugins > preferences > MergeStrategy


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.plugins.preferences;
10
11 import java.util.Set JavaDoc;
12
13 /**
14  * Merge several property set into one.
15  *
16  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
17  * @version $Revision: 1.1.1.1 $
18  */

19 public interface MergeStrategy
20 {
21    /**
22     * Return a preference among the sets or null if no suitable preference is found.
23     *
24     * @param sets the set of preference to inspect
25     * @param key the requested key
26     * @return the found preference or null
27     * @throws IllegalArgumentException if the key or the sets is null
28     */

29    Preference getPreference(PreferenceSet[] sets, String JavaDoc key) throws IllegalArgumentException JavaDoc;
30
31    /**
32     * Say if the preference is marked as read only.
33     *
34     * @param sets the set of preference to inspect
35     * @param key the requested key
36     * @return the read only value
37     * @throws IllegalArgumentException if the key or the sets is null
38     */

39    boolean isReadOnly(PreferenceSet[] sets, String JavaDoc key) throws IllegalArgumentException JavaDoc;
40
41    /**
42     * Return the merged key set.
43     *
44     * @param sets the set of preference to inspect
45     * @return the merged key set
46     * @throws IllegalArgumentException if tje sets is null
47     */

48    Set JavaDoc getKeySet(PreferenceSet[] sets) throws IllegalArgumentException JavaDoc;
49 }
50
Popular Tags