org.apache.muse.ws.resource.properties.set.impl
Class SimpleSetOperationFactory

java.lang.Object
  extended by org.apache.muse.ws.resource.properties.set.impl.SimpleSetOperationFactory
All Implemented Interfaces:
SetOperationFactory

public class SimpleSetOperationFactory
extends Object
implements SetOperationFactory

SimpleSetOperationFactory provides an API for constructing and parsing WS-RP SetResourceProperties requests, including the Insert, Delete, and Update operations. There are convenience methods for creating outbound requests with each operation type as well as a factory method for parsing inbound XML into executables.

Author:
Dan Jemiolo (danj)

Constructor Summary
SimpleSetOperationFactory()
           
 
Method Summary
 SetRequest createDelete(QName qname)
          This is a convenience method that creates a new SetRequest object an populates it with a DeleteRequest for the given property.
 SetRequest createInsert(QName qname, Object[] values)
          This is a convenience method that creates a new SetRequest object an populates it with a InsertRequest for the given property.
 SetRequest createSet(Element request)
          Parses the given XML fragment according to the WS-RP spec for SetResourceProperties requests.
 SetRequest createUpdate(QName qname, Object[] values)
          This is a convenience method that creates a new SetRequest object an populates it with a UpdateRequest for the given property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSetOperationFactory

public SimpleSetOperationFactory()
Method Detail

createDelete

public SetRequest createDelete(QName qname)
Description copied from interface: SetOperationFactory
This is a convenience method that creates a new SetRequest object an populates it with a DeleteRequest for the given property.

Specified by:
createDelete in interface SetOperationFactory
Parameters:
qname - The name of the property to delete.

createInsert

public SetRequest createInsert(QName qname,
                               Object[] values)
Description copied from interface: SetOperationFactory
This is a convenience method that creates a new SetRequest object an populates it with a InsertRequest for the given property.

Specified by:
createInsert in interface SetOperationFactory
Parameters:
qname - The name of the property to insert.
values - The initial values for each instance of the property. This array should not be null, nor empty.

createSet

public SetRequest createSet(Element request)
                     throws BaseFault
Description copied from interface: SetOperationFactory
Parses the given XML fragment according to the WS-RP spec for SetResourceProperties requests.

Specified by:
createSet in interface SetOperationFactory
Parameters:
request - An XML fragment containing a SetResourceProperties request.
Returns:
A SimpleSetRequest that contains one AbstractSetRequestComponent for each operation defined in the request. This object can be used to execute the request against a WS-RP container.
Throws:
BaseFault -
  • If the request is empty (contains no operations).
  • If one of the operation types is invalid (only Insert, Delete, and Update are allowed).
  • If one of the operations is not properly formatted.

createUpdate

public SetRequest createUpdate(QName qname,
                               Object[] values)
Description copied from interface: SetOperationFactory
This is a convenience method that creates a new SetRequest object an populates it with a UpdateRequest for the given property.

Specified by:
createUpdate in interface SetOperationFactory
Parameters:
qname - The name of the property to update.


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.