org.jboss.portal.server.plugins.preferences
Interface MergeStrategy

All Known Implementing Classes:
SimpleMergeStrategy

public interface MergeStrategy

Merge several property set into one.


Method Summary
 java.util.Set getKeySet(PreferenceSet[] sets)
          Return the merged key set.
 Preference getPreference(PreferenceSet[] sets, java.lang.String key)
          Return a preference among the sets or null if no suitable preference is found.
 boolean isReadOnly(PreferenceSet[] sets, java.lang.String key)
          Say if the preference is marked as read only.
 

Method Detail

getPreference

Preference getPreference(PreferenceSet[] sets,
                         java.lang.String key)
                         throws java.lang.IllegalArgumentException
Return a preference among the sets or null if no suitable preference is found.

Parameters:
sets - the set of preference to inspect
key - the requested key
Returns:
the found preference or null
Throws:
java.lang.IllegalArgumentException - if the key or the sets is null

isReadOnly

boolean isReadOnly(PreferenceSet[] sets,
                   java.lang.String key)
                   throws java.lang.IllegalArgumentException
Say if the preference is marked as read only.

Parameters:
sets - the set of preference to inspect
key - the requested key
Returns:
the read only value
Throws:
java.lang.IllegalArgumentException - if the key or the sets is null

getKeySet

java.util.Set getKeySet(PreferenceSet[] sets)
                        throws java.lang.IllegalArgumentException
Return the merged key set.

Parameters:
sets - the set of preference to inspect
Returns:
the merged key set
Throws:
java.lang.IllegalArgumentException - if tje sets is null