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

java.lang.Object
  extended by org.apache.jetspeed.om.preference.impl.PrefsPreference
All Implemented Interfaces:
Serializable, org.apache.jetspeed.om.common.preference.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 Object
implements org.apache.jetspeed.om.common.preference.PreferenceComposite

See Also:
Serialized Form

Field Summary
static String[] DEFAULT_OPEN_NODES
           
protected static String LOCALE_TOKEN
           
protected  String name
           
static String PORTLET_PREFERENCES_ROOT
           
protected  Preferences prefNode
           
protected  Preferences prefValueNode
           
protected  Preferences prefValueSizeNode
           
protected static String VALUES_PATH
           
protected static String VALUES_SIZE
           
 
Fields inherited from interface org.apache.jetspeed.om.common.preference.PreferenceComposite
DEFAULT_PREFERENCE, USER_PREFERENCE
 
Constructor Summary
PrefsPreference(org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite portlet, String name)
           
PrefsPreference(Preferences prefNode, String name)
           
 
Method Summary
 void addDescription(Locale locale, String description)
           addDescription
 void addValue(String value)
           addValue
 String[] cloneValues()
           clone
static Preferences createPrefenceNode(org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite portlet)
           createPrefenceNode
 boolean equals(Object obj)
           equals
 void flush()
           
 org.apache.pluto.om.common.Description getDescription(Locale locale)
           getDescription
 Iterator getDescriptions()
           getDescriptions
 String getName()
           getName
private  int getPrefValueSize(boolean store)
           
 String getType()
           getType
 String[] getValueArray()
           getValueArray
 String getValueAt(int index)
           getValueAt
 Iterator getValues()
           getValues
 int hashCode()
           hashCode
 boolean isReadOnly()
           isReadOnly
 boolean isValueSet()
           isValueSet
protected  Locale parseLocal(String localString)
           
 void removeValueAt(int index)
           
 void setName(String name)
           setName
 void setReadOnly(boolean readOnly)
           
 void setReadOnly(String readOnly)
           setReadOnly
 void setType(String string)
           setType
 void setValueAt(int index, String value)
           setValueAt
 void setValues(List arg0)
           setValues
 void setValues(String[] stringValues)
           setValues
 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 String VALUES_PATH
See Also:
Constant Field Values

VALUES_SIZE

protected static final String VALUES_SIZE
See Also:
Constant Field Values

PORTLET_PREFERENCES_ROOT

public static final String PORTLET_PREFERENCES_ROOT
See Also:
Constant Field Values

LOCALE_TOKEN

protected static final String LOCALE_TOKEN
See Also:
Constant Field Values

prefValueNode

protected Preferences prefValueNode

prefValueSizeNode

protected Preferences prefValueSizeNode

prefNode

protected Preferences prefNode

name

protected String name

DEFAULT_OPEN_NODES

public static final String[] DEFAULT_OPEN_NODES
Constructor Detail

PrefsPreference

public PrefsPreference(Preferences prefNode,
                       String name)

PrefsPreference

public PrefsPreference(org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite portlet,
                       String name)
Method Detail

getPrefValueSize

private int getPrefValueSize(boolean store)

addDescription

public void addDescription(Locale locale,
                           String description)

addDescription

Specified by:
addDescription in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Parameters:
locale -
Description -
See Also:
PreferenceComposite.addDescription(java.util.Locale, java.lang.String)

getDescription

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

getDescription

Specified by:
getDescription in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Parameters:
locale -
Returns:
See Also:
PreferenceComposite.getDescription(java.util.Locale)

getValueAt

public String getValueAt(int index)

getValueAt

Specified by:
getValueAt in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Parameters:
index -
Returns:
See Also:
PreferenceComposite.getValueAt(int)

removeValueAt

public void removeValueAt(int index)
Specified by:
removeValueAt in interface org.apache.jetspeed.om.common.preference.PreferenceComposite

setValueAt

public void setValueAt(int index,
                       String value)

setValueAt

Specified by:
setValueAt in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Parameters:
index -
value -
See Also:
PreferenceComposite.setValueAt(int, java.lang.String)

addValue

public void addValue(String value)

addValue

Specified by:
addValue in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Parameters:
value -
See Also:
PreferenceComposite.addValue(java.lang.String)

getValueArray

public String[] getValueArray()

getValueArray

Specified by:
getValueArray in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Returns:
See Also:
PreferenceComposite.getValueArray()

setValues

public void setValues(String[] stringValues)

setValues

Specified by:
setValues in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Parameters:
stringValues -
See Also:
PreferenceComposite.setValues(java.lang.String[])

getType

public String getType()

getType

Specified by:
getType in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Returns:
See Also:
PreferenceComposite.getType()

setType

public void setType(String string)

setType

Specified by:
setType in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Parameters:
string -
See Also:
PreferenceComposite.setType(java.lang.String)

setName

public void setName(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(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(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 String getName()

getName

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

getValues

public 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 Locale parseLocal(String localString)

cloneValues

public String[] cloneValues()

clone

Specified by:
cloneValues in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Returns:
@throws java.lang.CloneNotSupportedException
See Also:
Object.clone()

equals

public boolean equals(Object obj)

equals

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

hashCode

public int hashCode()

hashCode

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

toString

public String toString()

toString

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

flush

public void flush()
           throws BackingStoreException
Throws:
BackingStoreException

getDescriptions

public Iterator getDescriptions()

getDescriptions

Specified by:
getDescriptions in interface org.apache.jetspeed.om.common.preference.PreferenceComposite
Returns:
See Also:
PreferenceComposite.getDescriptions()

createPrefenceNode

public static Preferences createPrefenceNode(org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite portlet)

createPrefenceNode

Creates a Preferences object for this portlet

Parameters:
portlet -
Returns:


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