org.apache.ws.resource.properties.impl
Class XmlBeansResourceProperty

java.lang.Object
  extended byorg.apache.ws.resource.properties.impl.XmlBeansResourceProperty
All Implemented Interfaces:
ResourceProperty

public class XmlBeansResourceProperty
extends java.lang.Object
implements ResourceProperty

LOG-DONE An Apache XMLBeans-based implementation of a resource property.

Author:
Ian P. Springer

Constructor Summary
XmlBeansResourceProperty(ResourcePropertyMetaData metaData, XmlBeansResourcePropertySet propSet)
          Creates a new XmlBeansResourceProperty object.
 
Method Summary
 void add(java.lang.Object propElem)
          DOCUMENT_ME
 void clear()
          Removes all values.
 java.lang.Object get(int index)
          DOCUMENT_ME
 ResourcePropertyCallback getCallBack()
          DOCUMENT_ME
 ResourcePropertyValueChangeListener getChangeListener()
           
 ResourcePropertyMetaData getMetaData()
          DOCUMENT_ME
 ResourcePropertySet getSet()
          Returns the resource property set that contains this property.
 boolean isEmpty()
          Returns true if, and only if, this property contains no elements.
 java.util.Iterator iterator()
          DOCUMENT_ME
 void load(org.apache.xmlbeans.XmlObject propXBean)
          This method loads a property element XMLBean, which is already in the resource properties document, into this XmlBeansResourceProperty.
 boolean remove(java.lang.Object propElem)
          DOCUMENT_ME
 void set(int index, java.lang.Object propElem)
          Sets a value at a specific index.
 void setCallback(ResourcePropertyCallback callback)
          DOCUMENT_ME
 void setChangeListener(ResourcePropertyValueChangeListener changeListener)
           
 int size()
          Returns the number of values in the resource property.
 org.w3c.dom.Element[] toElements()
          Converts the resource property into an array of DOM Elements.
 javax.xml.soap.SOAPElement[] toSOAPElements()
          DOCUMENT_ME
 java.lang.String toString()
          DOCUMENT_ME
 java.lang.String toXML()
          DOCUMENT_ME
 org.apache.xmlbeans.XmlObject[] toXmlObjects()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlBeansResourceProperty

public XmlBeansResourceProperty(ResourcePropertyMetaData metaData,
                                XmlBeansResourcePropertySet propSet)
Creates a new XmlBeansResourceProperty object.

Parameters:
metaData - DOCUMENT_ME
propSet - DOCUMENT_ME
Method Detail

getCallBack

public ResourcePropertyCallback getCallBack()
DOCUMENT_ME

Specified by:
getCallBack in interface ResourceProperty
Returns:
DOCUMENT_ME

setCallback

public void setCallback(ResourcePropertyCallback callback)
DOCUMENT_ME

Specified by:
setCallback in interface ResourceProperty
Parameters:
callback - DOCUMENT_ME

isEmpty

public boolean isEmpty()
Description copied from interface: ResourceProperty
Returns true if, and only if, this property contains no elements.

Specified by:
isEmpty in interface ResourceProperty
Returns:

getMetaData

public ResourcePropertyMetaData getMetaData()
DOCUMENT_ME

Specified by:
getMetaData in interface ResourceProperty
Returns:
DOCUMENT_ME

getSet

public ResourcePropertySet getSet()
Description copied from interface: ResourceProperty
Returns the resource property set that contains this property.

Specified by:
getSet in interface ResourceProperty
Returns:

add

public void add(java.lang.Object propElem)
DOCUMENT_ME

Specified by:
add in interface ResourceProperty
Parameters:
propElem - DOCUMENT_ME
Throws:
MetaDataViolationException - if the name of the element to be added does not match the name associated with this property

clear

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

Specified by:
clear in interface ResourceProperty
See Also:
ResourceProperty.clear()

get

public java.lang.Object get(int index)
DOCUMENT_ME

Specified by:
get in interface ResourceProperty
Parameters:
index - DOCUMENT_ME
Returns:
DOCUMENT_ME

iterator

public java.util.Iterator iterator()
DOCUMENT_ME

Specified by:
iterator in interface ResourceProperty
Returns:
DOCUMENT_ME

load

public void load(org.apache.xmlbeans.XmlObject propXBean)
This method loads a property element XMLBean, which is already in the resource properties document, into this XmlBeansResourceProperty. It is called by XmlBeansResourcePropertySet.XmlBeansResourcePropertySet(org.apache.xmlbeans.XmlObject) to populate newly created XmlBeansResourceProperty objects.

Parameters:
propXBean - a property element XMLBean that is already in the resource properties document
Throws:
MetaDataViolationException - if the name of the element to be added does not match the name associated with this property

remove

public boolean remove(java.lang.Object propElem)
DOCUMENT_ME

Specified by:
remove in interface ResourceProperty
Parameters:
propElem - DOCUMENT_ME
Returns:
DOCUMENT_ME

set

public void set(int index,
                java.lang.Object propElem)
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.
propElem - the new value
See Also:
ResourceProperty.set(int, Object)

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.
See Also:
ResourceProperty.size()

toElements

public org.w3c.dom.Element[] toElements()
                                 throws org.apache.commons.lang.SerializationException
Description copied from interface: ResourceProperty
Converts the resource property into an array of DOM Elements. 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:
org.apache.commons.lang.SerializationException - if conversion fails
See Also:
ResourceProperty.toElements()

toSOAPElements

public javax.xml.soap.SOAPElement[] toSOAPElements()
                                            throws org.apache.commons.lang.SerializationException
DOCUMENT_ME

Specified by:
toSOAPElements in interface ResourceProperty
Returns:
DOCUMENT_ME
Throws:
org.apache.commons.lang.SerializationException - DOCUMENT_ME

toString

public java.lang.String toString()
DOCUMENT_ME

Returns:
DOCUMENT_ME

toXML

public java.lang.String toXML()
DOCUMENT_ME

Specified by:
toXML in interface ResourceProperty
Returns:
DOCUMENT_ME

toXmlObjects

public org.apache.xmlbeans.XmlObject[] toXmlObjects()
Returns:

getChangeListener

public ResourcePropertyValueChangeListener getChangeListener()
Specified by:
getChangeListener in interface ResourceProperty

setChangeListener

public void setChangeListener(ResourcePropertyValueChangeListener changeListener)
Specified by:
setChangeListener in interface ResourceProperty


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.