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

java.lang.Object
  extended by org.apache.jetspeed.om.preference.impl.PrefsPreference
All Implemented Interfaces:
java.io.Serializable, PreferenceComposite, org.apache.pluto.om.common.Preference, org.apache.pluto.om.common.PreferenceCtrl, org.apache.pluto.om.Controller, org.apache.pluto.om.Model

public class PrefsPreference
extends java.lang.Object
implements PreferenceComposite

See Also:
Serialized Form

Field Summary
static java.lang.String[] DEFAULT_OPEN_NODES
           
protected static java.lang.String LOCALE_TOKEN
           
protected  java.lang.String name
           
static java.lang.String PORTLET_PREFERENCES_ROOT
           
protected  java.util.prefs.Preferences prefNode
           
protected  java.util.prefs.Preferences prefValueNode
           
protected  java.util.prefs.Preferences prefValueSizeNode
           
protected static java.lang.String VALUES_PATH
           
protected static java.lang.String VALUES_SIZE
           
 
Fields inherited from interface org.apache.jetspeed.om.common.preference.PreferenceComposite
DEFAULT_PREFERENCE, USER_PREFERENCE
 
Constructor Summary
PrefsPreference(PortletDefinitionComposite portlet, java.lang.String name)
           
PrefsPreference(java.util.prefs.Preferences prefNode, java.lang.String name)
           
 
Method Summary
 void addDescription(java.util.Locale locale, java.lang.String description)
           addDescription
 void addValue(java.lang.String value)
           addValue
 java.lang.String[] cloneValues()
           clone
static java.util.prefs.Preferences createPrefenceNode(PortletDefinitionComposite portlet)
           createPrefenceNode
 boolean equals(java.lang.Object obj)
           equals
 void flush()
           
 org.apache.pluto.om.common.Description getDescription(java.util.Locale locale)
           getDescription
 java.util.Iterator getDescriptions()
           getDescriptions
 java.lang.String getName()
           getName
 java.lang.String getType()
           getType
 java.lang.String[] getValueArray()
           getValueArray
 java.lang.String getValueAt(int index)
           getValueAt
 java.util.Iterator getValues()
           getValues
 int hashCode()
           hashCode
 boolean isReadOnly()
           isReadOnly
 boolean isValueSet()
           isValueSet
protected  java.util.Locale parseLocal(java.lang.String localString)
           
 void removeValueAt(int index)
           
 void setName(java.lang.String name)
           setName
 void setReadOnly(boolean readOnly)
           
 void setReadOnly(java.lang.String readOnly)
           setReadOnly
 void setType(java.lang.String string)
           setType
 void setValueAt(int index, java.lang.String value)
           setValueAt
 void setValues(java.util.List arg0)
           setValues
 void setValues(java.lang.String[] stringValues)
           setValues
 java.lang.String toString()
           toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUES_PATH

protected static final java.lang.String VALUES_PATH
See Also:
Constant Field Values

VALUES_SIZE

protected static final java.lang.String VALUES_SIZE
See Also:
Constant Field Values

PORTLET_PREFERENCES_ROOT

public static final java.lang.String PORTLET_PREFERENCES_ROOT
See Also:
Constant Field Values

LOCALE_TOKEN

protected static final java.lang.String LOCALE_TOKEN
See Also:
Constant Field Values

prefValueNode

protected java.util.prefs.Preferences prefValueNode

prefValueSizeNode

protected java.util.prefs.Preferences prefValueSizeNode

prefNode

protected java.util.prefs.Preferences prefNode

name

protected java.lang.String name

DEFAULT_OPEN_NODES

public static final java.lang.String[] DEFAULT_OPEN_NODES
Constructor Detail

PrefsPreference

public PrefsPreference(java.util.prefs.Preferences prefNode,
                       java.lang.String name)

PrefsPreference

public PrefsPreference(PortletDefinitionComposite portlet,
                       java.lang.String name)
Method Detail

addDescription

public void addDescription(java.util.Locale locale,
                           java.lang.String description)

addDescription

Specified by:
addDescription in interface PreferenceComposite
Parameters:
locale -
Description -
See Also:
PreferenceComposite.addDescription(java.util.Locale, java.lang.String)

getDescription

public org.apache.pluto.om.common.Description getDescription(java.util.Locale locale)

getDescription

Specified by:
getDescription in interface PreferenceComposite
Parameters:
locale -
Returns:
See Also:
PreferenceComposite.getDescription(java.util.Locale)

getValueAt

public java.lang.String getValueAt(int index)

getValueAt

Specified by:
getValueAt in interface PreferenceComposite
Parameters:
index -
Returns:
See Also:
PreferenceComposite.getValueAt(int)

removeValueAt

public void removeValueAt(int index)
Specified by:
removeValueAt in interface PreferenceComposite

setValueAt

public void setValueAt(int index,
                       java.lang.String value)

setValueAt

Specified by:
setValueAt in interface PreferenceComposite
Parameters:
index -
value -
See Also:
PreferenceComposite.setValueAt(int, java.lang.String)

addValue

public void addValue(java.lang.String value)

addValue

Specified by:
addValue in interface PreferenceComposite
Parameters:
value -
See Also:
PreferenceComposite.addValue(java.lang.String)

getValueArray

public java.lang.String[] getValueArray()

getValueArray

Specified by:
getValueArray in interface PreferenceComposite
Returns:
See Also:
PreferenceComposite.getValueArray()

setValues

public void setValues(java.lang.String[] stringValues)

setValues

Specified by:
setValues in interface PreferenceComposite
Parameters:
stringValues -
See Also:
PreferenceComposite.setValues(java.lang.String[])

getType

public java.lang.String getType()

getType

Specified by:
getType in interface PreferenceComposite
Returns:
See Also:
PreferenceComposite.getType()

setType

public void setType(java.lang.String string)

setType

Specified by:
setType in interface PreferenceComposite
Parameters:
string -
See Also:
PreferenceComposite.setType(java.lang.String)

setName

public void setName(java.lang.String name)

setName

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

setValues

public void setValues(java.util.List arg0)

setValues

Specified by:
setValues in interface org.apache.pluto.om.common.PreferenceCtrl
Parameters:
arg0 -
See Also:
PreferenceCtrl.setValues(java.util.List)

setReadOnly

public void setReadOnly(java.lang.String readOnly)

setReadOnly

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

setReadOnly

public void setReadOnly(boolean readOnly)

getName

public java.lang.String getName()

getName

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

getValues

public java.util.Iterator getValues()

getValues

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

isReadOnly

public boolean isReadOnly()

isReadOnly

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

isValueSet

public boolean isValueSet()

isValueSet

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

parseLocal

protected java.util.Locale parseLocal(java.lang.String localString)

cloneValues

public java.lang.String[] cloneValues()

clone

Specified by:
cloneValues in interface PreferenceComposite
Returns:
@throws java.lang.CloneNotSupportedException
See Also:
Object.clone()

equals

public boolean equals(java.lang.Object obj)

equals

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()

hashCode

Overrides:
hashCode in class java.lang.Object
Returns:
See Also:
Object.hashCode()

toString

public java.lang.String toString()

toString

Overrides:
toString in class java.lang.Object
Returns:
See Also:
Object.toString()

flush

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

getDescriptions

public java.util.Iterator getDescriptions()

getDescriptions

Specified by:
getDescriptions in interface PreferenceComposite
Returns:
See Also:
PreferenceComposite.getDescriptions()

createPrefenceNode

public static java.util.prefs.Preferences createPrefenceNode(PortletDefinitionComposite portlet)

createPrefenceNode

Creates a Preferences object for this portlet

Parameters:
portlet -
Returns:


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