Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.portlet.state
Class AbstractPropertyContext

    java.lang.Object
      org.jboss.portal.portlet.state.AbstractPropertyContext

All Implemented Interfaces:
  PropertyContext

    public class AbstractPropertyContext

extends java.lang.Object
implements PropertyContext

Version:
  $Revision: 6757 $
Author:
  Julien Viet

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_SUCCESSFUL` The state has been succesfully updated.

Fields inherited from interface org.jboss.portal.portlet.state.PropertyContext
`PREFERENCES_ATTRIBUTE`

Constructor Summary
`AbstractPropertyContext(AccessMode access, PropertyMap prefs, boolean render)` Create a new object.

Method Summary
`java.util.Set<java.lang.String>` | `getKeys()` Return an immutable set of keys.
`PropertyMap` | `getPrefs()`
`int` | `getStatus()`
`java.util.List<java.lang.String>` | `getValue(java.lang.String key)` Return for a specified key an immutable list of its values or null if the value does not exist.
`boolean` | `isReadOnly()` Return true if the preferences are globally 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_SUCCESSFUL

    public static final int UPDATE_SUCCESSFUL

  The state has been succesfully updated.

  See Also:
    Constant Field Values

Constructor Detail

### AbstractPropertyContext

    public AbstractPropertyContext(AccessMode access,
                                   PropertyMap prefs,
                                   boolean render)
                            throws java.lang.IllegalArgumentException

  Create a new object.

  Parameters:
    `prefs` - the user 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`
  Parameters:
    `changes` - the list of changes
  Throws:
    `java.lang.IllegalStateException` - if the preferences is not writable

### getKeys

    public java.util.Set<java.lang.String> getKeys()

  Description copied from interface: `PropertyContext`
  Return an immutable set of keys.

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

### getValue

    public java.util.List<java.lang.String> getValue(java.lang.String key)
                                              throws java.lang.IllegalArgumentException

  Description copied from interface: `PropertyContext`
  Return for a specified key an immutable list of its values 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

### isReadOnly

    public boolean isReadOnly()

  Description copied from interface: `PropertyContext`
  Return true if the preferences are globally read only. The value returned by this method is valid only during the action request. Any call to this method during the render request will produce a non accurate value.

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

### getPrefs

    public PropertyMap getPrefs()

### getStatus

    public int getStatus()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008. All Rights Reserved.