站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

AbstractPropertyContext - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.portlet.state
Class AbstractPropertyContext

java.lang.Object
  extended byorg.jboss.portal.portlet.state.AbstractPropertyContext
All Implemented Interfaces:
PropertyContext

public class AbstractPropertyContext
extends java.lang.Object
implements PropertyContext


Field Summary
static int NO_CHANGE
          No change have been done or attempted.
static int UPDATE_FAILED
          Attempts to update the state that failed has been performed.
static int UPDATE_SUCCEDED
          The state has been succesfully updated.
 
Constructor Summary
AbstractPropertyContext(AccessMode access, ValueMap userPrefs, PreferencesInfo portletPrefs)
          Create a new object.
 
Method Summary
 java.util.Set getKeys()
          Return the key set.
 java.util.Set getPortletKeys()
          Return the key set.
 Value getPortletValue(java.lang.String key)
          Return for a key a value or null if no suitable value is found.
 ValueMap getPrefs()
           
 int getStatus()
           
 Value getValue(java.lang.String key)
          Return for a specified key its value or null if the value does not exist.
 boolean isPortletReadOnly(java.lang.String key)
          Say if the key is marked as read only or not.
 boolean isReadOnly()
          Return true if the preferences are read only.
 void update(PropertyChange[] changes)
          Update the preferences.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CHANGE

public static final int NO_CHANGE
No change have been done or attempted.

See Also:
Constant Field Values

UPDATE_FAILED

public static final int UPDATE_FAILED
Attempts to update the state that failed has been performed.

See Also:
Constant Field Values

UPDATE_SUCCEDED

public static final int UPDATE_SUCCEDED
The state has been succesfully updated.

See Also:
Constant Field Values
Constructor Detail

AbstractPropertyContext

public AbstractPropertyContext(AccessMode access,
                               ValueMap userPrefs,
                               PreferencesInfo portletPrefs)
                        throws java.lang.IllegalArgumentException
Create a new object. If the userPrefs argument is null then the object is considered as globally read only.

Parameters:
userPrefs - the user prefs
portletPrefs - the portlet prefs
Throws:
java.lang.IllegalArgumentException - if the portletPrefs are null
Method Detail

update

public void update(PropertyChange[] changes)
            throws java.lang.IllegalStateException
Description copied from interface: PropertyContext
Update the preferences.

Specified by:
update in interface PropertyContext
Throws:
java.lang.IllegalStateException - if the preferences is not writable

getKeys

public java.util.Set getKeys()
Description copied from interface: PropertyContext
Return the key set.

Specified by:
getKeys in interface PropertyContext
Returns:
the set of keys

getValue

public Value getValue(java.lang.String key)
               throws java.lang.IllegalArgumentException
Description copied from interface: PropertyContext
Return for a specified key its value or null if the value does not exist.

Specified by:
getValue in interface PropertyContext
Parameters:
key - the lookup key
Returns:
the key value or null if it does not exist
Throws:
java.lang.IllegalArgumentException - if the key is null

getPortletKeys

public java.util.Set getPortletKeys()
                             throws java.lang.IllegalArgumentException
Description copied from interface: PropertyContext
Return the key set.

Specified by:
getPortletKeys in interface PropertyContext
Returns:
the system key set
Throws:
java.lang.IllegalArgumentException - if the array is null

getPortletValue

public Value getPortletValue(java.lang.String key)
                      throws java.lang.IllegalArgumentException
Description copied from interface: PropertyContext
Return for a key a value or null if no suitable value is found.

Specified by:
getPortletValue in interface PropertyContext
Parameters:
key - the requested key
Returns:
the found value or null
Throws:
java.lang.IllegalArgumentException - if the key or the array is null

isPortletReadOnly

public boolean isPortletReadOnly(java.lang.String key)
                          throws java.lang.IllegalArgumentException
Description copied from interface: PropertyContext
Say if the key is marked as read only or not.

Specified by:
isPortletReadOnly in interface PropertyContext
Parameters:
key - the requested key
Returns:
the read only value
Throws:
java.lang.IllegalArgumentException - if the key or the array is null

isReadOnly

public boolean isReadOnly()
Description copied from interface: PropertyContext
Return true if the preferences are read only.

Specified by:
isReadOnly in interface PropertyContext
Returns:
true if the preferences are read only

getPrefs

public ValueMap getPrefs()

getStatus

public int getStatus()