org.jboss.portal.server.plugins.preferences
Class SimpleMergeStrategy
java.lang.Object
org.jboss.portal.server.plugins.preferences.SimpleMergeStrategy
- All Implemented Interfaces:
- MergeStrategy
public class SimpleMergeStrategy
- extends java.lang.Object
- implements MergeStrategy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleMergeStrategy
public SimpleMergeStrategy()
getSingleton
public static SimpleMergeStrategy getSingleton()
getPreference
public Preference getPreference(PreferenceSet[] sets,
java.lang.String key)
throws java.lang.IllegalArgumentException
- Description copied from interface:
MergeStrategy
- Return a preference among the sets or null if no suitable preference is found.
- Specified by:
getPreference
in interface MergeStrategy
- Parameters:
sets
- the set of preference to inspectkey
- the requested key
- Returns:
- the found preference or null
- Throws:
java.lang.IllegalArgumentException
- if the key or the sets is null
isReadOnly
public boolean isReadOnly(PreferenceSet[] sets,
java.lang.String key)
throws java.lang.IllegalArgumentException
- Description copied from interface:
MergeStrategy
- Say if the preference is marked as read only.
- Specified by:
isReadOnly
in interface MergeStrategy
- Parameters:
sets
- the set of preference to inspectkey
- the requested key
- Returns:
- the read only value
- Throws:
java.lang.IllegalArgumentException
- if the key or the sets is null
getKeySet
public java.util.Set getKeySet(PreferenceSet[] sets)
throws java.lang.IllegalArgumentException
- Description copied from interface:
MergeStrategy
- Return the merged key set.
- Specified by:
getKeySet
in interface MergeStrategy
- Parameters:
sets
- the set of preference to inspect
- Returns:
- the merged key set
- Throws:
java.lang.IllegalArgumentException
- if tje sets is null