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

## com.ibm.websphere.personalization.resources
Class ResourceImpl

    java.lang.Object
      com.ibm.websphere.personalization.resources.ResourceImpl

All Implemented Interfaces:
  Resource, java.io.Serializable

    public class ResourceImpl

extends java.lang.Object
implements Resource

This class provides a basic implementation of the Resource interface with dynamic property functionality.

This class may be extended or directly instantiated for custom resource collections which need to support dynamic properties.

See Also:
  Serialized Form

Field Summary
`protected java.util.Hashtable` | `properties`

Constructor Summary
`ResourceImpl()`
`ResourceImpl(java.lang.String id)` Creates a resource with the specified id.

Method Summary
`java.lang.Object` | `get(java.lang.String name)` Returns a dynamic property stored with the given name accessible from the resource.
`java.lang.String` | `getId()` Returns id of the this Resource.
`java.util.Enumeration` | `keys()` Get all keys associated for dynamic properties accessible from this resource.
`void` | `put(java.lang.String name, java.lang.Object value)` Store a dynamic property of the given value under the given name.
`void` | `remove(java.lang.String name)` Remove object of specified key as a dynamic property of this resource.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### properties

    protected java.util.Hashtable properties

Constructor Detail

### ResourceImpl

    public ResourceImpl()

### ResourceImpl

    public ResourceImpl(java.lang.String id)

  Creates a resource with the specified id.

  See Also:
    `ResourceDomain3.findById(String, RequestContext)`

Method Detail

### getId

    public java.lang.String getId()

  Description copied from interface: `Resource`
  Returns id of the this Resource. This id must uniquely identify the data represented by this Resource. This method does not need to return a value which is mapped to a single column in the underlying content store, but it must work in coordination with the ResourceManager3 findById method such that `manager.findById(resource.getId(), context).getId().equals(resource.getId())` returns true.

  Specified by:
    `getId` in interface `Resource`
  See Also:
    `Resource.getId()`

### put

    public void put(java.lang.String name,
                    java.lang.Object value)

  Description copied from interface: `Resource`
  Store a dynamic property of the given value under the given name.

  Specified by:
    `put` in interface `Resource`
  See Also:
    `Resource.put(String, Object)`

### get

    public java.lang.Object get(java.lang.String name)

  Description copied from interface: `Resource`
  Returns a dynamic property stored with the given name accessible from the resource. Implementing this method is optional. Implementors may instead define properties on the subclass which are called by the Personalization Engine through Java reflection.

  Specified by:
    `get` in interface `Resource`
  See Also:
    `Resource.get(String)`

### remove

    public void remove(java.lang.String name)

  Description copied from interface: `Resource`
  Remove object of specified key as a dynamic property of this resource.

  Specified by:
    `remove` in interface `Resource`
  See Also:
    `Resource.remove(String)`

### keys

    public java.util.Enumeration keys()

  Description copied from interface: `Resource`
  Get all keys associated for dynamic properties accessible from this resource.

  Specified by:
    `keys` in interface `Resource`
  See Also:
    `Resource.keys()`

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