Holger's
Java API

com.antelmann.mgmt
Interface Entity

All Superinterfaces:
Resource, Serializable
All Known Subinterfaces:
User
All Known Implementing Classes:
EntityImpl, ImageHolder, RowItem, TimeUser, UserImpl

public interface Entity
extends Resource

represents an entity that is specified by various properties that may flexibly change.

Author:
Holger Antelmann

Method Summary
 Map<String,Object> getProperties()
          returns an unmodifiable view of the map that represents the existing properties.
 Object getProperty(String key)
          allows access to some property; may return null if not set
 Object removeProperty(String key)
          removes the given key from the properties
 Object setProperty(String key, Object value)
          removes the given property
 
Methods inherited from interface com.antelmann.mgmt.Resource
getID
 

Method Detail

getProperty

Object getProperty(String key)
allows access to some property; may return null if not set


setProperty

Object setProperty(String key,
                   Object value)
                   throws IllegalArgumentException
removes the given property

Returns:
the value of the property previously set if any (thus may return null)
Throws:
IllegalArgumentException - if the given key is a required property for this instance. Object removeProperty (String key) throws IllegalArgumentException; /** edit/set a given property value based on the given key
IllegalArgumentException - if the given key/value combination is not allowed on the given instance.

removeProperty

Object removeProperty(String key)
                      throws IllegalArgumentException
removes the given key from the properties

Returns:
the previous value of the given key or null if previously unset
Throws:
IllegalArgumentException - if the given key cannot be removed on the given instance.

getProperties

Map<String,Object> getProperties()
returns an unmodifiable view of the map that represents the existing properties. To alter the properties, use the other methods defined in this interface. Solely altering the properties through the other provided methods allows to register listeners that will notice changes in the properties.



(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads