Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.muse.ws.resource.properties.impl
Class SimpleResourcePropertyCollection

    java.lang.Object
      org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollection

All Implemented Interfaces:
  GetMultipleResourceProperties, GetResourceProperty, GetResourcePropertyDocument, GetResourcePropertyExtensions, PutResourcePropertyDocument, ResourcePropertiesMetadataValidation, ResourcePropertiesSchemaValidation, ResourcePropertyCollection, ResourcePropertyListeners, SetResourceProperties, SetResourcePropertiesComponents, SetResourcePropertiesExtensions, SetResourcePropertiesPermissions, XmlSerializable

public class SimpleResourcePropertyCollection
extends java.lang.Object
implements ResourcePropertyCollection

SimpleResourcePropertyCollection is Muse's default implementation of the WS-RF state model. It delegates the handling of actual WS-RP methods to capabilities that define the resource properties, serving only to enforce WS-RP schema and metadata constraints and the formatting of WS-RP faults. It also provides the implementation of the listener framework that allows other components to hook into various parts of the WS-RP operations.

Author:
  Dan Jemiolo (danj)

Constructor Summary
`SimpleResourcePropertyCollection()`

Method Summary
`void` | `addCapability(WsResourceCapability capability)` Registers the capability with the schema so that users of the schema can determine which capability is responsible for which resource properties.
`void` | `addChangeApprover(PropertyChangeApprover approver)` Associates the given approver with the appropriate property.
`void` | `addChangeListener(PropertyChangeListener listener)` Associates the given listener with the appropriate property.
`protected void` | `addInitialValues(QName qname)`
`protected void` | `addPermissions(QName qname)`
`void` | `addReadListener(PropertyReadListener listener)` Associates the given listener with the appropriate property.
`protected void` | `addStaticValues(QName qname)`
`protected void` | `addValidValues(QName qname)`
`void` | `applyMetadata()` Takes the RMD that has been provided through setMetadata() and creates components that will enforce it.
`protected void` | `changeCompleted(QName qname, org.w3c.dom.Element oldValue, org.w3c.dom.Element newValue)` Reports the completed property change to all PropertyChangeListeners.
`protected void` | `changeRequested(QName qname, org.w3c.dom.Element oldValue, org.w3c.dom.Element newValue, java.lang.Object securityToken)` Reports the pending property change to all PropertyChangeApprovers.
`protected SetRequest` | `createInsertRequests(org.w3c.dom.Element newDoc)`
`protected void` | `deleteMutableProperties()`
`void` | `deleteResourceProperty(QName qname)` Removes all properties with the given name.
`void` | `deleteResourceProperty(QName qname, java.lang.Object securityToken)` Removes all properties with the given name.
`WsResourceCapability` | `getCapability(QName qname)`
`java.util.Iterator` | `getChangeApprovers(QName property)`
`java.util.Iterator` | `getChangeListeners(QName property)`
`MetadataDescriptor` | `getMetadata()`
`org.w3c.dom.Element[]` | `getMultipleResourceProperties(QName[] qnames)` Returns zero or more instances of the given properties.
`java.lang.Object` | `getPropertyAsObject(QName qname, java.lang.Class type)` Returns zero or more instances of the given property, deserialized into instances of the given type.
`java.util.Collection` | `getPropertyNames()`
`java.util.Iterator` | `getReadListeners(QName property)`
`org.w3c.dom.Element[]` | `getResourceProperty(QName qname)` Returns zero or more instances of the given property. Users who want more type safety and better encapsulation should use getPropertyAsObject(QName, Class).
`org.w3c.dom.Element` | `getResourcePropertyDocument()`
`ResourcePropertiesSchema` | `getSchema()`
`java.lang.Object` | `getSecurityToken()` Returns the security token that can be used by users of the WS-RP document to verify that they are internal callers with permission to circumvent published restrictions on property changes, etc.
`boolean` | `hasPropertyDefinition(QName qname)`
`void` | `insertOrUpdate(QName property, java.lang.Object value)` This is just a convenience method that will call insertOrUpdate(QName, Object[]) with a one-element array.
`void` | `insertOrUpdate(QName property, java.lang.Object[] values)` Checks to see if there is already an instance of the property, and if so, updates it with the given values; otherwise, it inserts the values.
`void` | `insertResourceProperty(QName qname, java.lang.Object[] values)` Creates new instances of the given property using the given values.
`void` | `insertResourceProperty(QName qname, java.lang.Object[] values, java.lang.Object securityToken)` Creates a new instance of the given property for each value specified in the array of values.
`org.w3c.dom.Element` | `putResourcePropertyDocument(org.w3c.dom.Element newDoc)`
`protected org.w3c.dom.Element[]` | `readRequested(QName qname, org.w3c.dom.Element[] properties)` Reports all property read requests to the PropertyReadListeners.
`void` | `removeChangeApprover(PropertyChangeApprover approver)` Removes the assocation between the given approver and its property.
`void` | `removeChangeListener(PropertyChangeListener listener)` Removes the assocation between the given listener and its property.
`void` | `removeReadListener(PropertyReadListener listener)` Removes the assocation between the given listener and its property.
`void` | `setMetadata(MetadataDescriptor metadata)` Provides the given WS-RMD MetadataDescriptor to this WS-RP document.
`void` | `setResourceProperties(SetRequest request)` Modifies one or more property instances according to the definition of the three WS-RP write operations: Insert, Update, and Delete.
`void` | `setSchema(ResourcePropertiesSchema schema)` Applies the given XMLSchema definitions to this WS-RP document.
`java.lang.String` | `toString()`
`org.w3c.dom.Element` | `toXML()` Converts this object into an XML representation, as defined by its related schema or specification.
`org.w3c.dom.Element` | `toXML(org.w3c.dom.Document factory)` Converts this object into an XML representation, as defined by its related schema or specification.
`void` | `updateResourceProperty(QName qname, java.lang.Object[] values)` Replaces all of a property's current values with the given values.
`void` | `updateResourceProperty(QName qname, java.lang.Object[] values, java.lang.Object securityToken)` Updates all instances of the given property using the given values; all previous values will be removed in lieu of these new values.
`protected void` | `validateDelete(QName qname, int currentSize, int toDelete)` Confirms that deleting the desired number of property instances will result in a WS-RP document that is valid according to the schema.
`protected void` | `validateInsert(QName qname, int currentSize, org.w3c.dom.Element[] values)` Confirms that inserting the desired property instances will result in a WS-RP document that is valid according to the schema.
`void` | `validateMetadata()` Iterates through every property in the WS-RMD metadata and verifies that the current WS-RP document is valid.
`protected void` | `validateNillable(QName qname, org.w3c.dom.Element[] instances, boolean isNillable)`
`void` | `validateSchema()` Iterates through every property in the WS-RP document's XMLSchema and verifies current document is valid.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimpleResourcePropertyCollection

    public SimpleResourcePropertyCollection()

Method Detail

### addCapability

    public void addCapability(WsResourceCapability capability)

  Description copied from interface: `ResourcePropertiesSchemaValidation`
  Registers the capability with the schema so that users of the schema can determine which capability is responsible for which resource properties.

  Specified by:
    `addCapability` in interface `ResourcePropertiesSchemaValidation`
  Parameters:
    `capability` -

### addChangeApprover

    public final void addChangeApprover(PropertyChangeApprover approver)

  Description copied from interface: `ResourcePropertyListeners`
  Associates the given approver with the appropriate property. All approvers will be notified of pending changes to their property; if one of the approvers rejects the change (by throwing an exception), the change will not be completed. Each approver will continue to exist until it is removed with removeChangeApprover(PropertyChangeApprover).

  Specified by:
    `addChangeApprover` in interface `ResourcePropertyListeners`
  Parameters:
    `approver` - The approver that will be notified of all pending changes.
  See Also:
    `PropertyChangeApprover.getPropertyName()`, `ResourcePropertyListeners.removeChangeApprover(PropertyChangeApprover)`

### addChangeListener

    public final void addChangeListener(PropertyChangeListener listener)

  Description copied from interface: `ResourcePropertyListeners`
  Associates the given listener with the appropriate property. The listeners will be notified of completed changes to their property. Each listener will continue to exist until it is removed with removeChangeListener(PropertyChangeListener).

  Specified by:
    `addChangeListener` in interface `ResourcePropertyListeners`
  Parameters:
    `listener` - The listener that will be notified of all completed changes.
  See Also:
    `PropertyChangeListener.getPropertyName()`, `ResourcePropertyListeners.removeChangeListener(PropertyChangeListener)`

### addInitialValues

    protected void addInitialValues(QName qname)

### addPermissions

    protected void addPermissions(QName qname)

### addReadListener

    public final void addReadListener(PropertyReadListener listener)

  Description copied from interface: `ResourcePropertyListeners`
  Associates the given listener with the appropriate property. The listeners will be notified of all pending read requests for a property, giving them the opportunity to reject the read or to modify the value of the property before it is returned to the caller. Each listener will continue to exist until it is removed with removeReadListener(PropertyReadListener).

  Specified by:
    `addReadListener` in interface `ResourcePropertyListeners`
  Parameters:
    `listener` - The listener that will be notified of all pending read requests.
  See Also:
    `PropertyReadListener.getPropertyName()`, `ResourcePropertyListeners.removeReadListener(PropertyReadListener)`

### addStaticValues

    protected void addStaticValues(QName qname)

### addValidValues

    protected void addValidValues(QName qname)

### applyMetadata

    public void applyMetadata()

  Description copied from interface: `ResourcePropertiesMetadataValidation`
  Takes the RMD that has been provided through setMetadata() and creates components that will enforce it. This method only needs to be called once after setMetadata() is called. After this method is called, any attempt to modify the WS-RP container in a way that is incompatible with the RMD will fail.

  Specified by:
    `applyMetadata` in interface `ResourcePropertiesMetadataValidation`

### changeCompleted

    protected final void changeCompleted(QName qname,
                                         org.w3c.dom.Element oldValue,
                                         org.w3c.dom.Element newValue)
                                  throws BaseFault

  Reports the completed property change to all PropertyChangeListeners. If one of the listeners fails and throws an exception, the method is over - it will not report the change to all remaining listeners

  Parameters:
    `qname` -
    `oldValue` -
    `newValue` -
  Throws:
    `BaseFault` -
    - If one of the listeners fails while responding to the change; this does not indicate that the change was invalid, just that the listener's reaction failed.

### changeRequested

    protected final void changeRequested(QName qname,
                                         org.w3c.dom.Element oldValue,
                                         org.w3c.dom.Element newValue,
                                         java.lang.Object securityToken)
                                  throws BaseFault

  Reports the pending property change to all PropertyChangeApprovers. As soon as one approver cancels the change by throwing an exception, the method is over - it does not report to all approvers once one has objected.

  Parameters:
    `qname` -
    `oldValue` -
    `newValue` -
    `securityToken` -
  Throws:
    `BaseFault` -
    - If one of the approvers does not approve!

### createInsertRequests

    protected SetRequest createInsertRequests(org.w3c.dom.Element newDoc)
                                       throws UnableToPutResourcePropertyDocumentFault,
                                              BaseFault

  Throws:
    `UnableToPutResourcePropertyDocumentFault`
    `BaseFault`

### deleteMutableProperties

    protected void deleteMutableProperties()
                                    throws BaseFault

  Throws:
    `BaseFault`

### deleteResourceProperty

    public void deleteResourceProperty(QName qname)
                                throws BaseFault

  Description copied from interface: `SetResourcePropertiesComponents`
  Removes all properties with the given name.

  Specified by:
    `deleteResourceProperty` in interface `SetResourcePropertiesComponents`
  Throws:
    `BaseFault`

### deleteResourceProperty

    public void deleteResourceProperty(QName qname,
                                       java.lang.Object securityToken)
                                throws BaseFault

  Description copied from interface: `SetResourcePropertiesPermissions`
  Removes all properties with the given name. This call will not complete if the given security token doesn't match the document's token and the caller is trying to delete an immutable property.

  Specified by:
    `deleteResourceProperty` in interface `SetResourcePropertiesPermissions`
  Parameters:
    `qname` - The name of the property to delete.
    `securityToken` - The token used to verify permission to call this method.
  Throws:
    `BaseFault` -
    - If there were zero instances of the property named.
    - If performing the delete would result in the number of property instances being below the schema's minimum value.
    - If the property is read-only or insert-only and the security token is not valid.
    - If one of the PropertyChangeListeners assigned to this property throws an exception while reacting to the deletion.

### getCapability

    public WsResourceCapability getCapability(QName qname)

  Specified by:
    `getCapability` in interface `ResourcePropertiesSchemaValidation`
  Parameters:
    `qname` - The name of the resource property whose capability is being queried.
  Returns:
    The capability that defines the given property, or null if the property does not exist.

### getChangeApprovers

    public final java.util.Iterator getChangeApprovers(QName property)

  Specified by:
    `getChangeApprovers` in interface `ResourcePropertyListeners`
  Returns:
    An iterator for the collection of PropertyChangeApprovers. The approvers are not guaranteed to be in a particular order.

### getChangeListeners

    public final java.util.Iterator getChangeListeners(QName property)

  Specified by:
    `getChangeListeners` in interface `ResourcePropertyListeners`
  Returns:
    An iterator for the collection of PropertyChangeListeners. The listeners are not guaranteed to be in a particular order.

### getMetadata

    public final MetadataDescriptor getMetadata()

  Specified by:
    `getMetadata` in interface `ResourcePropertiesMetadataValidation`
  Returns:
    The RMD for this WS-RP document.

### getMultipleResourceProperties

    public org.w3c.dom.Element[] getMultipleResourceProperties(QName[] qnames)
                                                        throws InvalidResourcePropertyQNameFault,
                                                               BaseFault

  Description copied from interface: `GetMultipleResourceProperties`
  Returns zero or more instances of the given properties.

  Specified by:
    `getMultipleResourceProperties` in interface `GetMultipleResourceProperties`
  Parameters:
    `qnames` - The names of the properties to find.
  Returns:
    An array of DOM Elements, where each Element is an instance of one of the properties named. The Elements will be ordered such that all properties with the same name are grouped together, with Group #1 = QName #1, Group #2 = QName #2, etc. There is no guarantee that the Elements are the internal data structures used by the WS-RP document.
  Throws:
    `BaseFault` -
    - If one of the properties is undefined in the document's schema. This is not the same as finding zero instances of a defined property.
    `InvalidResourcePropertyQNameFault`

### getPropertyAsObject

    public java.lang.Object getPropertyAsObject(QName qname,
                                                java.lang.Class type)
                                         throws BaseFault

  Description copied from interface: `GetResourcePropertyExtensions`
  Returns zero or more instances of the given property, deserialized into instances of the given type. This method differs from getResourceProperty(QName) in that it returns POJOs rather than XML.

  Specified by:
    `getPropertyAsObject` in interface `GetResourcePropertyExtensions`
  Parameters:
    `qname` - The name of the property to find.
    `type` - The type of the property instances returned by this method. Every object in the returned array can be cast to this type.
  Returns:
    An array of objects, where each object is an instance of the property named. There is no guarantee that the objects are the internal data structures used by the WS-RP document. The objects should be the POJO equivalent of the Elements returned by getResourceProperty(QName).
  Throws:
    `BaseFault` -
    - If the property is undefined in the document's schema. This is not the same as finding zero instances of a defined property.
    - If there is an error creating instances of the given type using the property values found.
  See Also:
    `GetResourceProperty`

### getPropertyNames

    public java.util.Collection getPropertyNames()

  Specified by:
    `getPropertyNames` in interface `ResourcePropertiesSchemaValidation`
  Returns:
    All of the resource properties defined by the schema.

### getReadListeners

    public final java.util.Iterator getReadListeners(QName property)

  Specified by:
    `getReadListeners` in interface `ResourcePropertyListeners`
  Returns:
    An iterator for the collection of PropertyReadListeners. The listeners are not guaranteed to be in a particular order.

### getResourceProperty

    public org.w3c.dom.Element[] getResourceProperty(QName qname)
                                              throws InvalidResourcePropertyQNameFault,
                                                     BaseFault

  Returns zero or more instances of the given property.
  Users who want more type safety and better encapsulation should use getPropertyAsObject(QName, Class).

  Specified by:
    `getResourceProperty` in interface `GetResourceProperty`
  Parameters:
    `qname` - The name of the property to find.
  Returns:
    An array of DOM Elements, where each Element is an instance of the property named. There is no guarantee that the Elements are the internal data structures used by the WS-RP document.
  Throws:
    `InvalidResourcePropertyQNameFault` -
    - If the property is undefined in the document's schema. This is not the same as finding zero instances of a defined property.
    `BaseFault`
  See Also:
    `getPropertyAsObject(QName, Class)`

### getResourcePropertyDocument

    public org.w3c.dom.Element getResourcePropertyDocument()
                                                    throws BaseFault

  Specified by:
    `getResourcePropertyDocument` in interface `GetResourcePropertyDocument`
  Returns:
    The resource's entire WS-RP document, with the most up-to-date values of all properties.
  Throws:
    `BaseFault`

### getSchema

    public final ResourcePropertiesSchema getSchema()

  Specified by:
    `getSchema` in interface `ResourcePropertiesSchemaValidation`
  Returns:
    The XSD for this WS-RP document.

### getSecurityToken

    public java.lang.Object getSecurityToken()

  Description copied from interface: `SetResourcePropertiesPermissions`
  Returns the security token that can be used by users of the WS-RP document to verify that they are internal callers with permission to circumvent published restrictions on property changes, etc. The security token system may be used to allow modification of read-only properties, modification to properties that are not supposed to be set with WS-RP's generic SetResourceProperties, and other special behavior.
  The token should be given to internal components that will need special permissions, but it should not be used by components that are handling external requests directly.

  Specified by:
    `getSecurityToken` in interface `SetResourcePropertiesPermissions`
  Returns:
    The valid security token for the WS-RP document.

### hasPropertyDefinition

    public boolean hasPropertyDefinition(QName qname)

  Specified by:
    `hasPropertyDefinition` in interface `ResourcePropertiesSchemaValidation`
  Parameters:
    `qname` - The name of a resource property to search the schema for.
  Returns:
    True if there is a schema definition with the given name.

### insertOrUpdate

    public void insertOrUpdate(QName property,
                               java.lang.Object value)
                        throws BaseFault

  Description copied from interface: `SetResourcePropertiesExtensions`
  This is just a convenience method that will call insertOrUpdate(QName, Object[]) with a one-element array.

  Specified by:
    `insertOrUpdate` in interface `SetResourcePropertiesExtensions`
  Throws:
    `BaseFault`

### insertOrUpdate

    public void insertOrUpdate(QName property,
                               java.lang.Object[] values)
                        throws BaseFault

  Description copied from interface: `SetResourcePropertiesExtensions`
  Checks to see if there is already an instance of the property, and if so, updates it with the given values; otherwise, it inserts the values. The former maps to update(QName, Object[]), the latter to insert(QName, Object[]). This method should be used when you want to override a default value for a property that may have already been set.
  This method is not thread-safe in that there is a possibility that another WS-RP set request will happen in between the time the read test is done (to determine existence) and the set is done.

  Specified by:
    `insertOrUpdate` in interface `SetResourcePropertiesExtensions`
  Throws:
    `BaseFault`

### insertResourceProperty

    public void insertResourceProperty(QName qname,
                                       java.lang.Object[] values)
                                throws BaseFault

  Description copied from interface: `SetResourcePropertiesComponents`
  Creates new instances of the given property using the given values.

  Specified by:
    `insertResourceProperty` in interface `SetResourcePropertiesComponents`
  Throws:
    `BaseFault`

### insertResourceProperty

    public void insertResourceProperty(QName qname,
                                       java.lang.Object[] values,
                                       java.lang.Object securityToken)
                                throws BaseFault

  Description copied from interface: `SetResourcePropertiesPermissions`
  Creates a new instance of the given property for each value specified in the array of values. This call will not complete if the given security token doesn't match the document's token and the caller is trying to insert an immutable property.

  Specified by:
    `insertResourceProperty` in interface `SetResourcePropertiesPermissions`
  Parameters:
    `qname` - The name of the property instances to create.
    `values` - The set of values that will be assigned to the new property instances. Each value will be created once.
    `securityToken` - The token used to verify permission to call this method.
  Throws:
    `BaseFault` -
    - If the property is not defined in the document's schema.
    - If adding the new instances would create more than the maximum defined by the schema.
    - If the property is read-only and the security token is not valid.
    - If one of the PropertyChangeListeners assigned to this property throws an exception while reacting to the insertion.
    - If the container tries to create or manipulate the Topic for the property and fails.

### putResourcePropertyDocument

    public org.w3c.dom.Element putResourcePropertyDocument(org.w3c.dom.Element newDoc)
                                                    throws UnableToPutResourcePropertyDocumentFault,
                                                           BaseFault

  Specified by:
    `putResourcePropertyDocument` in interface `PutResourcePropertyDocument`
  Parameters:
    `newDoc` - The new WSRP document for the resource instance.
  Returns:
    If the change was a complete success, the method returns null. If any differences exist between the given WSRP document and the one that is present after the method is finished, the method returns the entire WSRP document.
  Throws:
    `BaseFault`
    `UnableToPutResourcePropertyDocumentFault`

### readRequested

    protected final org.w3c.dom.Element[] readRequested(QName qname,
                                                        org.w3c.dom.Element[] properties)
                                                 throws BaseFault

  Reports all property read requests to the PropertyReadListeners. If one of the listeners fails and throws an exception, the method is over - it will not report to all remaining listeners once one has failed. Listeners will receive the actual values that will be given to the caller, so they can modify them if desired.

  Parameters:
    `qname` - The name of the property being read.
    `properties` - The current values of the property, which will be given to the caller once all listeners have been invoked.
  Throws:
    `BaseFault` -
    - If one of the listeners fails.

### removeChangeApprover

    public final void removeChangeApprover(PropertyChangeApprover approver)

  Description copied from interface: `ResourcePropertyListeners`
  Removes the assocation between the given approver and its property. The approver will no longer be notified of pending changes.

  Specified by:
    `removeChangeApprover` in interface `ResourcePropertyListeners`
  Parameters:
    `approver` -

### removeChangeListener

    public final void removeChangeListener(PropertyChangeListener listener)

  Description copied from interface: `ResourcePropertyListeners`
  Removes the assocation between the given listener and its property. The approver will no longer be notified of completed changes.

  Specified by:
    `removeChangeListener` in interface `ResourcePropertyListeners`
  Parameters:
    `listener` -

### removeReadListener

    public final void removeReadListener(PropertyReadListener listener)

  Description copied from interface: `ResourcePropertyListeners`
  Removes the assocation between the given listener and its property. The approver will no longer be notified of pending read requests.

  Specified by:
    `removeReadListener` in interface `ResourcePropertyListeners`
  Parameters:
    `listener` -

### setMetadata

    public void setMetadata(MetadataDescriptor metadata)

  Description copied from interface: `ResourcePropertiesMetadataValidation`
  Provides the given WS-RMD MetadataDescriptor to this WS-RP document. This metadata will be used for all subsequent validations, including calls to validateMetadata() and SetResourceProperties-like operations.
  Note that this method does not perform validation and it does not create listeners to do so in the future. To do these things, use validateMetadata and applyMetadata, respectively.

  Specified by:
    `setMetadata` in interface `ResourcePropertiesMetadataValidation`
  Parameters:
    `metadata` - The WS-RMD metadata for this WS-RP document.
  See Also:
    `ResourcePropertiesMetadataValidation.applyMetadata()`, `ResourcePropertiesMetadataValidation.validateMetadata()`

### setResourceProperties

    public void setResourceProperties(SetRequest request)
                               throws BaseFault

  Description copied from interface: `SetResourceProperties`
  Modifies one or more property instances according to the definition of the three WS-RP write operations: Insert, Update, and Delete. The operations in the request are processed in order. There is no transaction support as part of basic WS-RP, so if one operation fails, the operations that were completed before it will remain intact.

  Specified by:
    `setResourceProperties` in interface `SetResourceProperties`
  Parameters:
    `request` - The SetResourceProperties request that contains the individual operations { Insert, Update, Delete } to perform on the document.
  Throws:
    `BaseFault` -
    - If one of the individual set operations fails. Please review the different fault cases for each set operation in the SetResourcePropertiesRequests interface.
  See Also:
    `SetResourceProperties`

### setSchema

    public void setSchema(ResourcePropertiesSchema schema)

  Description copied from interface: `ResourcePropertiesSchemaValidation`
  Applies the given XMLSchema definitions to this WS-RP document. This schema will be used for all subsequent validations, including calls to validateSchema() and SetResourceProperties-like operations.
  Note that this method does not perform validation.

  Specified by:
    `setSchema` in interface `ResourcePropertiesSchemaValidation`
  Parameters:
    `schema` - The XSD properties definition for this WS-RP document.
  See Also:
    `ResourcePropertiesSchemaValidation.validateSchema()`

### toString

    public java.lang.String toString()

  Returns:
    An XML representation of the current WS-RP document, without the XML header.

### toXML

    public org.w3c.dom.Element toXML()

  Description copied from interface: `XmlSerializable`
  Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

  Specified by:
    `toXML` in interface `XmlSerializable`
  Returns:
    An XML representation of this object.

### toXML

    public org.w3c.dom.Element toXML(org.w3c.dom.Document factory)

  Description copied from interface: `XmlSerializable`
  Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

  Specified by:
    `toXML` in interface `XmlSerializable`
  Parameters:
    `factory` - The DOM Document that will be used to create all of the nodes in the resulting XML fragment.
  Returns:
    An XML representation of this object.

### updateResourceProperty

    public void updateResourceProperty(QName qname,
                                       java.lang.Object[] values)
                                throws BaseFault

  Description copied from interface: `SetResourcePropertiesComponents`
  Replaces all of a property's current values with the given values.

  Specified by:
    `updateResourceProperty` in interface `SetResourcePropertiesComponents`
  Throws:
    `BaseFault`

### updateResourceProperty

    public void updateResourceProperty(QName qname,
                                       java.lang.Object[] values,
                                       java.lang.Object securityToken)
                                throws BaseFault

  Description copied from interface: `SetResourcePropertiesPermissions`
  Updates all instances of the given property using the given values; all previous values will be removed in lieu of these new values. This call will not complete if the given security token doesn't match the document's token and the caller is trying to update an immutable property.

  Specified by:
    `updateResourceProperty` in interface `SetResourcePropertiesPermissions`
  Parameters:
    `qname` - The name of the property to update.
    `values` - The values to assign to the property.
    `securityToken` - The token used to verify permission to call this method.
  Throws:
    `BaseFault` -
    - If the property is not defined in the document's schema.
    - If a new value is null and the property is not nillable.
    - If the property is read-only and the security token is not valid.
    - If one of the PropertyChangeListeners assigned to this property throws an exception while reacting to the update.

### validateDelete

    protected void validateDelete(QName qname,
                                  int currentSize,
                                  int toDelete)
                           throws BaseFault

  Confirms that deleting the desired number of property instances will result in a WS-RP document that is valid according to the schema.

  Parameters:
    `qname` - The name of the property whose instances are being deleted.
    `currentSize` - The current number of instances (before the delete).
    `toDelete` - The number of instances being deleted.
  Throws:
    `BaseFault` -
    - If the property name is undefined.
    - If deleting the instances would put the property below its minimum value ("minOccurs").

### validateInsert

    protected void validateInsert(QName qname,
                                  int currentSize,
                                  org.w3c.dom.Element[] values)
                           throws BaseFault

  Confirms that inserting the desired property instances will result in a WS-RP document that is valid according to the schema.

  Parameters:
    `qname` - The name of the property that is being inserted.
    `currentSize` - The current number of instances (before the insertion).
    `values` - The property values to insert into the document.
  Throws:
    `BaseFault` -
    - If the property name is undefined.
    - If inserting the instances would put the property above its maximum value ("maxOccurs").
    - If any of the values is null, and the property is not nillable.

### validateMetadata

    public void validateMetadata()
                          throws BaseFault

  Description copied from interface: `ResourcePropertiesMetadataValidation`
  Iterates through every property in the WS-RMD metadata and verifies that the current WS-RP document is valid. This method should be used sparingly, as it will validate every property; for cases such as SetResourceProperties, the implementation of the operations should validate the individual property being targeted, not the whole document.

  Specified by:
    `validateMetadata` in interface `ResourcePropertiesMetadataValidation`
  Throws:
    `BaseFault` -
    - If there is a property in the WS-RMD document that is not in the schema.
    - If the WS-RMD defines a set of valid values for a property and one of the current values is not included in that set.

### validateNillable

    protected void validateNillable(QName qname,
                                    org.w3c.dom.Element[] instances,
                                    boolean isNillable)
                             throws SchemaValidationFault

  Throws:
    `SchemaValidationFault`

### validateSchema

    public void validateSchema()
                        throws BaseFault

  Description copied from interface: `ResourcePropertiesSchemaValidation`
  Iterates through every property in the WS-RP document's XMLSchema and verifies current document is valid. This method should be used sparingly, as it will validate every property; for cases such as SetResourceProperties, the implementation of the operations should validate the individual property being targeted, not the whole document.

  Specified by:
    `validateSchema` in interface `ResourcePropertiesSchemaValidation`
  Throws:
    `BaseFault` -
    - If the number of instances of a property is below the required minimum.
    - If the number of instances of a property is above the required maximum.
    - If an instance of the property is null (the equivalent of an empty XML element) but the property is not nillable.

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD