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

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 addChangeListener(ResourcePropertyValueChangeListener changeListener)
          Registers the specified value-change listener on this property.
 void clear()
          Removes all values.
 java.lang.Object get(int index)
          DOCUMENT_ME
 ResourcePropertyCallback getCallBack()
          DOCUMENT_ME
 ResourcePropertyValueChangeListener[] getChangeListeners()
          Returns the value-change listeners that are registered on this property.
 ResourcePropertyMetaData getMetaData()
          Gets meta data of this resource property.
 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
 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()
          Returns the XML representation of this property (i.e.
 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:
true if, and only if, this property contains no elements
See Also:
ResourceProperty.isEmpty()

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

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:
the resource property set that contains this property.
See Also:
ResourceProperty.getSet()

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()
Description copied from interface: ResourceProperty
Returns the XML representation of this property (i.e. the resource property elements).

Specified by:
toXML in interface ResourceProperty
Returns:
the XML representation of this property
See Also:
ResourceProperty.toXML()

toXmlObjects

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

getChangeListeners

public ResourcePropertyValueChangeListener[] getChangeListeners()
Description copied from interface: ResourceProperty
Returns the value-change listeners that are registered on this property.

Specified by:
getChangeListeners in interface ResourceProperty
Returns:
the value-change listeners that are registered on this property; may be empty, but never null
See Also:
ResourceProperty.getChangeListeners()

addChangeListener

public void addChangeListener(ResourcePropertyValueChangeListener changeListener)
Description copied from interface: ResourceProperty
Registers the specified value-change listener on this property.

Specified by:
addChangeListener in interface ResourceProperty
Parameters:
changeListener - a property value-change listener
See Also:
ResourceProperty.addChangeListener(ResourcePropertyValueChangeListener)


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