uk.org.ogsadai.common.properties
Class Property

java.lang.Object
  |
  +--java.util.Observable
        |
        +--uk.org.ogsadai.common.properties.Property
Direct Known Subclasses:
CallbackSelfNotifyingProperty, DynamicProperty, SelfNotifyingProperty, SelfUpdatingProperty, StaticProperty

public abstract class Property
extends java.util.Observable

Abstract class representing a property - a qualified name and a value.

The notion of a security context is supported in case accessing the value requires authorisation of some kind.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
protected  javax.xml.namespace.QName mName
          Property name
protected  SecurityContext mSecurityContext
          Security context for property access authorisation
 
Fields inherited from class java.util.Observable
 
Constructor Summary
Property()
           
 
Method Summary
 javax.xml.namespace.QName getName()
          Return the name of the property.
abstract  java.lang.Object getValue()
          Return the property value.
 void setName(javax.xml.namespace.QName name)
          Set the property name.
 void setSecurityContext(SecurityContext sec)
          Set the security context for authorising property accessing and updating.
abstract  void setValue(java.lang.Object object)
          Set the property value.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

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

mName

protected javax.xml.namespace.QName mName
Property name


mSecurityContext

protected SecurityContext mSecurityContext
Security context for property access authorisation

Constructor Detail

Property

public Property()
Method Detail

getName

public javax.xml.namespace.QName getName()
Return the name of the property.

Returns:
property name.

getValue

public abstract java.lang.Object getValue()
                                   throws PropertyValueException
Return the property value.

Returns:
the value for the property or null if it has not been set.
Throws:
PropertyValueException - if an error occurs when obtaining the value.

setName

public void setName(javax.xml.namespace.QName name)
Set the property name.

Parameters:
name - Property name.

setValue

public abstract void setValue(java.lang.Object object)
                       throws PropertyImmutableException,
                              PropertyValueException
Set the property value.

Parameters:
object - Property value.
Throws:
PropertyValueException - if an error occurs when setting the value.
PropertyImmutableException - if the property is immutable and so cannot be updated.

setSecurityContext

public void setSecurityContext(SecurityContext sec)
Set the security context for authorising property accessing and updating.

Parameters:
sec - Security context.