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

PropertyContext - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.portlet.state
Interface PropertyContext

All Known Implementing Classes:
AbstractPropertyContext

public interface PropertyContext

Exposes to the portlet the interface to deal with the personalization state.

Version:
$Revision: 5448 $
Author:
Julien Viet

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.
 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.
 

Method Detail

getKeys

public java.util.Set getKeys()
Return the key set.

Returns:
the set of keys

getValue

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

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

isReadOnly

public boolean isReadOnly()
Return true if the preferences are read only.

Returns:
true if the preferences are read only

update

public void update(PropertyChange[] changes)
            throws java.lang.IllegalStateException
Update the preferences.

Throws:
java.lang.IllegalStateException - if the preferences is not writable
java.lang.IllegalArgumentException - if any change is not valid

getPortletKeys

public java.util.Set getPortletKeys()
                             throws java.lang.IllegalArgumentException
Return the key set.

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
Return for a key a value or null if no suitable value is found.

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
Say if the key is marked as read only or not.

Parameters:
key - the requested key
Returns:
the read only value
Throws:
java.lang.IllegalArgumentException - if the key or the array is null