org.apache.jetspeed.om.preference.impl
Class PrefsPreferenceSetImpl

java.lang.Object
  extended by org.apache.jetspeed.om.preference.impl.PrefsPreferenceSetImpl
All Implemented Interfaces:
PreferenceSetComposite, org.apache.pluto.om.common.PreferenceSet, org.apache.pluto.om.common.PreferenceSetCtrl, org.apache.pluto.om.Controller, org.apache.pluto.om.Model

public class PrefsPreferenceSetImpl
extends java.lang.Object
implements PreferenceSetComposite

Author:
Scott T. Weaver

Nested Class Summary
protected  class PrefsPreferenceSetImpl.PortletPrefsIterator
           
 
Field Summary
protected  PreferenceSetComposite defaults
           
protected  java.util.prefs.Preferences prefsRootNode
           
protected  PreferencesValidatorFactory validatorFactory
           
 
Constructor Summary
PrefsPreferenceSetImpl(java.util.prefs.Preferences prefsRootNode)
           
PrefsPreferenceSetImpl(java.util.prefs.Preferences prefsRootNode, PreferenceSetComposite defaults)
           
PrefsPreferenceSetImpl(java.util.prefs.Preferences prefsRootNode, PreferencesValidatorFactory validatorFactory)
           
 
Method Summary
 org.apache.pluto.om.common.Preference add(java.lang.String name, java.util.List values)
           add
protected  boolean arrayContains(java.lang.String[] array, java.lang.String value)
           
 void clear()
           clear
 void flush()
           
 org.apache.pluto.om.common.Preference get(java.lang.String key)
           get
 java.util.Set getNames()
           getNames
 javax.portlet.PreferencesValidator getPreferencesValidator()
           getPreferencesValidator
 java.util.Iterator iterator()
           iterator
 void remove(org.apache.pluto.om.common.Preference pref)
           remove
 org.apache.pluto.om.common.Preference remove(java.lang.String key)
           remove
 int size()
           size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefsRootNode

protected java.util.prefs.Preferences prefsRootNode

defaults

protected PreferenceSetComposite defaults

validatorFactory

protected PreferencesValidatorFactory validatorFactory
Constructor Detail

PrefsPreferenceSetImpl

public PrefsPreferenceSetImpl(java.util.prefs.Preferences prefsRootNode)
                       throws java.util.prefs.BackingStoreException
Parameters:
portletEntity - PortletEntity for which to build the PreferenceSet for.
Throws:
java.util.prefs.BackingStoreException - if an error is encountered while accessing the Preferences backing store.

PrefsPreferenceSetImpl

public PrefsPreferenceSetImpl(java.util.prefs.Preferences prefsRootNode,
                              PreferencesValidatorFactory validatorFactory)
                       throws java.util.prefs.BackingStoreException
Parameters:
portletEntity - PortletEntity for which to build the PreferenceSet for.
validatorFactory - Factory for providing access to a PreferencesValidator instance
Throws:
java.util.prefs.BackingStoreException - if an error is encountered while accessing the Preferences backing store.

PrefsPreferenceSetImpl

public PrefsPreferenceSetImpl(java.util.prefs.Preferences prefsRootNode,
                              PreferenceSetComposite defaults)
                       throws java.util.prefs.BackingStoreException
Throws:
java.util.prefs.BackingStoreException
Method Detail

getNames

public java.util.Set getNames()

getNames

Specified by:
getNames in interface PreferenceSetComposite
Returns:
See Also:
PreferenceSetComposite.getNames()

get

public org.apache.pluto.om.common.Preference get(java.lang.String key)

get

Specified by:
get in interface org.apache.pluto.om.common.PreferenceSet
Parameters:
arg0 -
Returns:
See Also:
PreferenceSet.get(java.lang.String)

getPreferencesValidator

public javax.portlet.PreferencesValidator getPreferencesValidator()

getPreferencesValidator

Specified by:
getPreferencesValidator in interface org.apache.pluto.om.common.PreferenceSet
Returns:
See Also:
PreferenceSet.getPreferencesValidator()

add

public org.apache.pluto.om.common.Preference add(java.lang.String name,
                                                 java.util.List values)

add

Specified by:
add in interface org.apache.pluto.om.common.PreferenceSetCtrl
Parameters:
name -
values -
Returns:
See Also:
PreferenceSetCtrl.add(java.lang.String, java.util.List)

remove

public void remove(org.apache.pluto.om.common.Preference pref)

remove

Specified by:
remove in interface org.apache.pluto.om.common.PreferenceSetCtrl
Parameters:
arg0 -
See Also:
PreferenceSetCtrl.remove(org.apache.pluto.om.common.Preference)

remove

public org.apache.pluto.om.common.Preference remove(java.lang.String key)

remove

Specified by:
remove in interface org.apache.pluto.om.common.PreferenceSetCtrl
Parameters:
arg0 -
Returns:
See Also:
PreferenceSetCtrl.remove(java.lang.String)

flush

public void flush()
           throws java.util.prefs.BackingStoreException
Throws:
java.util.prefs.BackingStoreException

clear

public void clear()
           throws java.util.prefs.BackingStoreException

clear

Throws:
java.util.prefs.BackingStoreException

size

public int size()

size

Specified by:
size in interface PreferenceSetComposite
Returns:
See Also:
PreferenceSetComposite.size()

iterator

public java.util.Iterator iterator()

iterator

Specified by:
iterator in interface org.apache.pluto.om.common.PreferenceSet
Returns:
See Also:
PreferenceSet.iterator()

arrayContains

protected boolean arrayContains(java.lang.String[] array,
                                java.lang.String value)


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.