org.globus.wsrf.impl
Class PersistentResourceProperty

java.lang.Object
  extended byorg.globus.wsrf.impl.PersistentResourceProperty
All Implemented Interfaces:
ResourceProperty

public class PersistentResourceProperty
extends java.lang.Object
implements ResourceProperty

A wrapper for a ResourceProperty object. If set is called it will set the dirty flag of the associated DirtyFlagHolder to true.

See Also:
PersistentReflectionResource

Field Summary
private  DirtyFlagHolder dirtyFlagHolder
           
private  ResourceProperty rp
           
 
Constructor Summary
PersistentResourceProperty(ResourceProperty resourceProperty, DirtyFlagHolder dirtyFlagHolder)
           
 
Method Summary
 void add(java.lang.Object value)
          Adds a value.
 void clear()
          Removes all values.
 java.lang.Object get(int index)
          Retrieves a value at a specific index.
 ResourcePropertyMetaData getMetaData()
          Gets meta data of this resource property.
 boolean isEmpty()
          Returns true if the resource property has any values.
 java.util.Iterator iterator()
          Returns iterator over the values of this resource property.
 boolean remove(java.lang.Object value)
          Removes a specific value.
 void set(int index, java.lang.Object value)
          Sets a value at a specific index.
 int size()
          Returns the number of values in the resource property.
 org.w3c.dom.Element[] toElements()
          Converts the resource property value into a DOM Element array.
 javax.xml.soap.SOAPElement[] toSOAPElements()
          Converts the resource property value into a SOAPElement array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rp

private ResourceProperty rp

dirtyFlagHolder

private DirtyFlagHolder dirtyFlagHolder
Constructor Detail

PersistentResourceProperty

public PersistentResourceProperty(ResourceProperty resourceProperty,
                                  DirtyFlagHolder dirtyFlagHolder)
                           throws java.lang.Exception
Parameters:
resourceProperty - ResourceProperty to wrap
dirtyFlagHolder - DirtyFlagHolder to be set to "dirty" when the property is changed
Throws:
java.lang.Exception
Method Detail

set

public void set(int index,
                java.lang.Object value)
Description copied from interface: ResourceProperty
Sets a value at a specific index.

Specified by:
set in interface ResourceProperty
Parameters:
index - the index to set value at.
value - the new value

add

public void add(java.lang.Object value)
Description copied from interface: ResourceProperty
Adds a value.

Specified by:
add in interface ResourceProperty
Parameters:
value - the value to add.

remove

public boolean remove(java.lang.Object value)
Description copied from interface: ResourceProperty
Removes a specific value. If the resource property contains multiple of the same value, only the first one is removed.

Specified by:
remove in interface ResourceProperty
Parameters:
value - value to remove.
Returns:
true if the value was removed. False otherwise.

get

public java.lang.Object get(int index)
Description copied from interface: ResourceProperty
Retrieves a value at a specific index.

Specified by:
get in interface ResourceProperty
Parameters:
index - the index of value to retrieve.
Returns:
the value at the given index. This operation might fail if the index is out of bounds.

clear

public void clear()
Description copied from interface: ResourceProperty
Removes all values.

Specified by:
clear in interface ResourceProperty

size

public int size()
Description copied from interface: ResourceProperty
Returns the number of values in the resource property.

Specified by:
size in interface ResourceProperty
Returns:
the number of values.

isEmpty

public boolean isEmpty()
Description copied from interface: ResourceProperty
Returns true if the resource property has any values.

Specified by:
isEmpty in interface ResourceProperty
Returns:
true if the resource property has any values. False, otherwise.

iterator

public java.util.Iterator iterator()
Description copied from interface: ResourceProperty
Returns iterator over the values of this resource property.

Specified by:
iterator in interface ResourceProperty
Returns:
iterator over the values of this resource property.

toSOAPElements

public javax.xml.soap.SOAPElement[] toSOAPElements()
                                            throws SerializationException
Description copied from interface: ResourceProperty
Converts the resource property value into a SOAPElement array. Each value is wrapped into an element named after the resource property. If the RP has no values (is null), and RP element was defined as:

Specified by:
toSOAPElements in interface ResourceProperty
Returns:
the resource property as a SOAPElement array.
Throws:
SerializationException - if conversion fails.

toElements

public org.w3c.dom.Element[] toElements()
                                 throws SerializationException
Description copied from interface: ResourceProperty
Converts the resource property value into a DOM Element array. Each value is wrapped into an element named after the resource property. If the RP has no values (is null), and RP element was defined as:

Specified by:
toElements in interface ResourceProperty
Returns:
the resource property as a DOM Element array.
Throws:
SerializationException - if conversion fails.

getMetaData

public ResourcePropertyMetaData getMetaData()
Description copied from interface: ResourceProperty
Gets meta data of this resource property.

Specified by:
getMetaData in interface ResourceProperty
Returns:
meta data of this resource property. Never null.