org.apache.pluto.internal.impl
Class PortletPreferencesImpl

java.lang.Object
  extended byorg.apache.pluto.internal.impl.PortletPreferencesImpl
All Implemented Interfaces:
javax.portlet.PortletPreferences

public class PortletPreferencesImpl
extends java.lang.Object
implements javax.portlet.PortletPreferences

Implementation of the javax.portlet.PortletPreferences interface.

See Also:
PortletPreferences, PortletPreferenceImpl

Constructor Summary
PortletPreferencesImpl(PortletContainer container, InternalPortletWindow window, InternalPortletRequest request, java.lang.Integer methodId)
          Constructs an instance.
 
Method Summary
 java.util.Map getMap()
           
 java.util.Enumeration getNames()
           
 java.lang.String getValue(java.lang.String key, java.lang.String defaultValue)
           
 java.lang.String[] getValues(java.lang.String key, java.lang.String[] defaultValues)
           
 boolean isReadOnly(java.lang.String key)
           
 void reset(java.lang.String key)
           
 void setValue(java.lang.String key, java.lang.String value)
           
 void setValues(java.lang.String key, java.lang.String[] values)
           
 void store()
          Stores the portlet preferences to a persistent storage.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortletPreferencesImpl

public PortletPreferencesImpl(PortletContainer container,
                              InternalPortletWindow window,
                              InternalPortletRequest request,
                              java.lang.Integer methodId)
Constructs an instance.

Parameters:
container - the portlet container.
window - the internal portlet window.
request - the internal portlet request.
methodId - the request method ID: render request or action request.
Method Detail

isReadOnly

public boolean isReadOnly(java.lang.String key)
Specified by:
isReadOnly in interface javax.portlet.PortletPreferences

getValue

public java.lang.String getValue(java.lang.String key,
                                 java.lang.String defaultValue)
Specified by:
getValue in interface javax.portlet.PortletPreferences

getValues

public java.lang.String[] getValues(java.lang.String key,
                                    java.lang.String[] defaultValues)
Specified by:
getValues in interface javax.portlet.PortletPreferences

setValue

public void setValue(java.lang.String key,
                     java.lang.String value)
              throws javax.portlet.ReadOnlyException
Specified by:
setValue in interface javax.portlet.PortletPreferences
Throws:
javax.portlet.ReadOnlyException

setValues

public void setValues(java.lang.String key,
                      java.lang.String[] values)
               throws javax.portlet.ReadOnlyException
Specified by:
setValues in interface javax.portlet.PortletPreferences
Throws:
javax.portlet.ReadOnlyException

getNames

public java.util.Enumeration getNames()
Specified by:
getNames in interface javax.portlet.PortletPreferences

getMap

public java.util.Map getMap()
Specified by:
getMap in interface javax.portlet.PortletPreferences

reset

public void reset(java.lang.String key)
           throws javax.portlet.ReadOnlyException
Specified by:
reset in interface javax.portlet.PortletPreferences
Throws:
javax.portlet.ReadOnlyException

store

public void store()
           throws java.io.IOException,
                  javax.portlet.ValidatorException
Stores the portlet preferences to a persistent storage. This method should only be invoked within processAction() method.

Specified by:
store in interface javax.portlet.PortletPreferences
Throws:
java.lang.IllegalStateException - if this method is not invoked within processAction() method.
javax.portlet.ValidatorException - if the portlet preferences are not valid.
java.io.IOException - if an error occurs with the persistence mechanism.
See Also:
#internalStore()

toString

public java.lang.String toString()
Returns the string representation of this object. Preferences are separated by ';' character, while values in one preference are separated by ',' character.

Returns:
the string representation of this object.
See Also:
Object.toString()


Copyright © 2003-2008 Apache Software Foundation. All Rights Reserved.