uk.org.ogsadai.common.properties
Class PropertiesImpl

java.lang.Object
  |
  +--uk.org.ogsadai.common.properties.PropertiesImpl
All Implemented Interfaces:
java.util.Map, Properties

public class PropertiesImpl
extends java.lang.Object
implements Properties

An implementation of a collection of uk.org.ogsadai.common.Property objects.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
private static DAILogger LOG
           
private  PropertyEventDispatcher mDispatcher
           
private  java.util.Map mPropertiesTable
           
 
Constructor Summary
PropertiesImpl()
           
 
Method Summary
 void addPropertyListener(PropertyListener listener)
          Registers a property listener.
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
 boolean isEmpty()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Puts a javax.xml.namespace.QName:uk.org.ogsadai.common.properties.Property pair into the properties map.
 Property put(Property property)
          Add the specified Property to the map.
 void putAll(java.util.Map t)
           
 java.lang.Object remove(java.lang.Object key)
           
 int size()
           
 java.util.Collection values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
See Also:
Constant Field Values

LOG

private static DAILogger LOG

mPropertiesTable

private final java.util.Map mPropertiesTable

mDispatcher

private final PropertyEventDispatcher mDispatcher
Constructor Detail

PropertiesImpl

public PropertiesImpl()
Method Detail

addPropertyListener

public void addPropertyListener(PropertyListener listener)
Description copied from interface: Properties
Registers a property listener. The listener will be notified each time a property event occurs.

Specified by:
addPropertyListener in interface Properties
Parameters:
listener - The PropertyListener to register.

put

public Property put(Property property)
Description copied from interface: Properties
Add the specified Property to the map.

Specified by:
put in interface Properties
Parameters:
property - The Property to add to the map. The value of property.getName() will be used as the key.
Returns:
the previous Property object mapped to the property.getName() key or null if no mapping existed previously.

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Puts a javax.xml.namespace.QName:uk.org.ogsadai.common.properties.Property pair into the properties map.

Specified by:
put in interface java.util.Map
Parameters:
key - The QName for the property.
value - The Property corresponding to the QName.
Throws:
java.lang.IllegalArgumentException - if key is not a QName or value is not a Property or if key does not equal the Property object getName() value.
See Also:
Map.put(java.lang.Object, java.lang.Object)

size

public int size()
Specified by:
size in interface java.util.Map

clear

public void clear()
Specified by:
clear in interface java.util.Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map