You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by ip...@apache.org on 2004/12/06 19:59:32 UTC
svn commit: r110007 - incubator/apollo/trunk/src/java/org/apache/ws/resource/properties
Author: ips
Date: Mon Dec 6 10:59:30 2004
New Revision: 110007
URL: http://svn.apache.org/viewcvs?view=rev&rev=110007
Log:
renamed registerCallback() to setCallback() and added getCallback()
Modified:
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java?view=diff&rev=110007&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java&r1=110006&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java&r2=110007
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java Mon Dec 6 10:59:30 2004
@@ -17,129 +17,137 @@
import org.apache.commons.lang.SerializationException;
import org.w3c.dom.Element;
+
import javax.xml.soap.SOAPElement;
import java.util.Iterator;
/**
- * Represents a single resource property. A resource property can have
- * multiple values and can be converted into a DOM <code>Element</code>
- * or <code>SOAPElement</code> array.
+ * Represents a single resource property. A resource property can have multiple values and can be converted into a DOM
+ * <code>Element</code> or <code>SOAPElement</code> array.
*/
public interface ResourceProperty
{
- /**
- * Returns <tt>true</tt> if, and only if, this property contains no elements.
- *
- * @return <tt>true</tt> if, and only if, this property contains no elements
- */
- boolean isEmpty( );
-
- /**
- * Gets meta data of this resource property.
- *
- * @return meta data of this resource property.
- */
- ResourcePropertyMetaData getMetaData( );
-
- /**
- * Returns the resource property set that contains this property.
- *
- * @return the resource property set that contains this property.
- */
- ResourcePropertySet getSet( );
-
- /**
- * Adds a value.
- *
- * @param value the value to add.
- */
- void add( Object value )
- throws MetaDataViolationException;
-
- /**
- * Removes all values.
- */
- void clear( )
- throws MetaDataViolationException;
-
- /**
- * Retrieves a value at a specific index.
- *
- * @param index the index of value to retrieve.
- *
- * @return the value at the given index. This operation might fail if the index is out of bounds.
- */
- Object get( int index );
-
- /**
- * Returns an iterator over the property elements.
- *
- * @return an iterator over the property elements
- */
- Iterator iterator( );
-
- /**
- * Removes the first property element with the specified value.
- *
- * @param value value of a property element to remove
- *
- * @return true if, and only if, a property element was removed
- */
- boolean remove( Object value )
- throws MetaDataViolationException;
-
- /**
- * Sets a value at a specific index.
- *
- * @param index the index to set value at.
- * @param value the new value
- */
- void set( int index,
- Object value )
- throws MetaDataViolationException;
-
- /**
- * Returns the number of values in the resource property.
- *
- * @return the number of values.
- */
- int size( );
-
- /**
- * Converts the resource property into an array of DOM {@link Element}s. If the RP has no values (is null), and RP
- * element was defined as: <ul> <li>minOccurs >= 0 - the function returns null.</li> <li>nillable == true - the
- * function returns a single element with <i>xsi:nil="true"</i> attribute set.</li> </ul>
- *
- * @return the resource property as a DOM Element array
- *
- * @throws SerializationException if conversion fails
- */
- Element[] toElements( )
- throws SerializationException;
-
- /**
- * Converts the resource property value into an array of {@link SOAPElement}s. If the RP has no values (is null), and
- * RP element was defined as: <ul> <li>minOccurs >= 0 - the function returns null.</li> <li>nillable == true - the
- * function returns a single element with <i>xsi:nil="true"</i> attribute set.</li> </ul>
- *
- * @return the resource property as a SOAPElement array
- *
- * @throws SerializationException if conversion fails
- */
- SOAPElement[] toSOAPElements( )
- throws SerializationException;
-
- /**
- * Returns the XML representation of this property (i.e. the resource property elements).
- *
- * @return the XML representation of this property
- */
- String toXML( );
-
- /**
- *
- * @param callback
- */
- void registerCallback( ResourcePropertyCallback callback );
+ /**
+ * Returns <tt>true</tt> if, and only if, this property contains no elements.
+ *
+ * @return <tt>true</tt> if, and only if, this property contains no elements
+ */
+ boolean isEmpty();
+
+ /**
+ * Gets meta data of this resource property.
+ *
+ * @return meta data of this resource property.
+ */
+ ResourcePropertyMetaData getMetaData();
+
+ /**
+ * Returns the resource property set that contains this property.
+ *
+ * @return the resource property set that contains this property.
+ */
+ ResourcePropertySet getSet();
+
+ /**
+ * Adds a value.
+ *
+ * @param value the value to add.
+ */
+ void add( Object value )
+ throws MetaDataViolationException;
+
+ /**
+ * Removes all values.
+ */
+ void clear()
+ throws MetaDataViolationException;
+
+ /**
+ * Retrieves a value at a specific index.
+ *
+ * @param index the index of value to retrieve.
+ *
+ * @return the value at the given index. This operation might fail if the index is out of bounds.
+ */
+ Object get( int index );
+
+ /**
+ * Returns an iterator over the property elements.
+ *
+ * @return an iterator over the property elements
+ */
+ Iterator iterator();
+
+ /**
+ * Removes the first property element with the specified value.
+ *
+ * @param value value of a property element to remove
+ *
+ * @return true if, and only if, a property element was removed
+ */
+ boolean remove( Object value )
+ throws MetaDataViolationException;
+
+ /**
+ * Sets a value at a specific index.
+ *
+ * @param index the index to set value at.
+ * @param value the new value
+ */
+ void set( int index,
+ Object value )
+ throws MetaDataViolationException;
+
+ /**
+ * Returns the number of values in the resource property.
+ *
+ * @return the number of values.
+ */
+ int size();
+
+ /**
+ * Converts the resource property into an array of DOM {@link Element}s. If the RP has no values (is null), and RP
+ * element was defined as: <ul> <li>minOccurs >= 0 - the function returns null.</li> <li>nillable == true - the
+ * function returns a single element with <i>xsi:nil="true"</i> attribute set.</li> </ul>
+ *
+ * @return the resource property as a DOM Element array
+ *
+ * @throws SerializationException if conversion fails
+ */
+ Element[] toElements()
+ throws SerializationException;
+
+ /**
+ * Converts the resource property value into an array of {@link SOAPElement}s. If the RP has no values (is null),
+ * and RP element was defined as: <ul> <li>minOccurs >= 0 - the function returns null.</li> <li>nillable == true -
+ * the function returns a single element with <i>xsi:nil="true"</i> attribute set.</li> </ul>
+ *
+ * @return the resource property as a SOAPElement array
+ *
+ * @throws SerializationException if conversion fails
+ */
+ SOAPElement[] toSOAPElements()
+ throws SerializationException;
+
+ /**
+ * Returns the XML representation of this property (i.e. the resource property elements).
+ *
+ * @return the XML representation of this property
+ */
+ String toXML();
+
+ /**
+ * Sets a callback for this property.
+ *
+ * @param callback the callback
+ */
+ void setCallback( ResourcePropertyCallback callback );
+
+ /**
+ * Returns the callback for this property, or null if no callback has been set.
+ *
+ * @return the callback for this property, or null if no callback has been set
+ */
+ ResourcePropertyCallback getCallBack();
}
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java?view=diff&rev=110007&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java&r1=110006&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java&r2=110007
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyCallback.java Mon Dec 6 10:59:30 2004
@@ -18,7 +18,7 @@
/**
* A callback that should be registered on any property whose value
* on the managed resource may change. Register the callback by calling
- * {@link ResourceProperty#registerCallback(ResourcePropertyCallback)} on the
+ * {@link ResourceProperty#setCallback(ResourcePropertyCallback)} on the
* property.
*
* @author Ian Springer (Hewlett-Packard Company)
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java?view=diff&rev=110007&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java&r1=110006&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java&r2=110007
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java Mon Dec 6 10:59:30 2004
@@ -21,7 +21,7 @@
* A callback that should be registered on any mutable properties (i.e.
* properties that support the WSRP SetResourceProperties operation).
* Register the callback by calling
- * {@link ResourceProperty#registerCallback(ResourcePropertyCallback)} on the
+ * {@link ResourceProperty#setCallback(ResourcePropertyCallback)} on the
* property.
*
* @author Ian Springer (Hewlett-Packard Company)
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org