org.globus.wsrf.impl
Class SimpleResourceProperty

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

public class SimpleResourceProperty
extends BaseResourceProperty

A simple in-memory implementation of the ResourceProperty interface. The resource property values are stored in a List.


Field Summary
private static org.globus.util.I18n i18n
           
private  java.util.List list
           
private  boolean validation
           
 
Fields inherited from class org.globus.wsrf.impl.BaseResourceProperty
metaData
 
Constructor Summary
SimpleResourceProperty(javax.xml.namespace.QName name)
           
SimpleResourceProperty(ResourcePropertyMetaData metaData)
           
 
Method Summary
 void add(java.lang.Object value)
          Adds a value.
private  void checkReadOnly()
           
 void clear()
          Removes all values.
 java.lang.Object get(int index)
          Retrieves a value at a specific index.
 boolean isEmpty()
          Returns true if the resource property has any values.
 boolean isValidationEnabled()
           
 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.
 void setEnableValidation(boolean validation)
           
 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 org.globus.wsrf.impl.BaseResourceProperty
convert, convertObject, convertPrimitive, getMetaData, setMetaData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

i18n

private static org.globus.util.I18n i18n

list

private java.util.List list

validation

private boolean validation
Constructor Detail

SimpleResourceProperty

public SimpleResourceProperty(javax.xml.namespace.QName name)

SimpleResourceProperty

public SimpleResourceProperty(ResourcePropertyMetaData metaData)
Method Detail

setEnableValidation

public void setEnableValidation(boolean validation)

isValidationEnabled

public boolean isValidationEnabled()

add

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

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.

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.

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.

set

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

Parameters:
index - the index to set value at.
value - the new value

clear

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


size

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

Returns:
the number of values.

isEmpty

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

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.

Returns:
iterator over the values of this resource property.

checkReadOnly

private void checkReadOnly()

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:

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:

Returns:
the resource property as a DOM Element array.
Throws:
SerializationException - if conversion fails.