deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.ogcwebservices.wfs.operation.transaction
Class Transaction

java.lang.Object
  extended by org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
      extended by org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
          extended by org.deegree.ogcwebservices.wfs.operation.transaction.Transaction
All Implemented Interfaces:
Serializable, OGCWebServiceRequest

public class Transaction
extends AbstractWFSRequest

Represents a Transaction request to a web feature service.

A Transaction consists of a sequence of Insert, Update, Delete and Native operations.

From the WFS Specification 1.1.0 OGC 04-094 (#12, Pg.63):

A Transaction request is used to describe data transformation operations that are to be applied to web accessible feature instances. When the transaction has been completed, a web feature service will generate an XML response document indicating the completion status of the transaction.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Markus Schneider , last edited by: $Author: mschneider $
See Also:
Serialized Form

Nested Class Summary
static class Transaction.RELEASE_ACTION
          Controls how locked features are treated when a transaction request is completed.
 
Field Summary
 
Fields inherited from class org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
FORMAT_GML2, FORMAT_GML2_WFS100, FORMAT_GML3, FORMAT_XML
 
Constructor Summary
Transaction(String id, String version, Map<String,String> versionSpecificParameter, String lockID, List<TransactionOperation> operations, boolean releaseAllFeatures, TransactionDocument sourceDocument)
          Creates a new Transaction instance.
 
Method Summary
static Transaction create(Map<String,String> model)
          Creates a Transaction request from a key-value-pair encoding of the parameters contained in the given Map.
static Transaction create(String id, Element root)
          Creates a Transaction instance from a document that contains the DOM representation of the request.
static Transaction create(String id, String request)
          Creates a Transaction request from a key-value-pair encoding of the parameters contained in the passed variable 'request'.
 Set<QualifiedName> getAffectedFeatureTypes()
          Returns the names of the feature types that are affected by the transaction.
 String getLockId()
          Returns the lock identifier associated with this transaction.
 List<TransactionOperation> getOperations()
          Returns the TransactionOperations that are contained in the transaction.
 Transaction.RELEASE_ACTION getReleaseAction()
          Returns the release action mode to be applied after the transaction finished successfully.
 TransactionDocument getSourceDocument()
          Returns the source document that was used to create this Transaction instance.
 String toString()
           
 
Methods inherited from class org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
checkServiceParameter, checkVersionParameter, extractBBOXFilter, extractFilters, extractNamespaceParameter, extractTypeNames, getHandle, getServiceName
 
Methods inherited from class org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
getId, getParam, getParamAsInt, getParamValues, getRequestParameter, getRequiredParam, getVendorSpecificParameter, getVendorSpecificParameters, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Transaction

public Transaction(String id,
                   String version,
                   Map<String,String> versionSpecificParameter,
                   String lockID,
                   List<TransactionOperation> operations,
                   boolean releaseAllFeatures,
                   TransactionDocument sourceDocument)
Creates a new Transaction instance.

Parameters:
version - WFS version
id - Transaction id
versionSpecificParameter -
lockID - Lock Id
operations - List of operations to be carried out
releaseAllFeatures -
sourceDocument -
Method Detail

getSourceDocument

public TransactionDocument getSourceDocument()
Returns the source document that was used to create this Transaction instance.

Returns:
the source document

getOperations

public List<TransactionOperation> getOperations()
Returns the TransactionOperations that are contained in the transaction.

Returns:
the contained operations

getLockId

public String getLockId()
Returns the lock identifier associated with this transaction.

Returns:
the lock identifier associated with this transaction if it exists, null otherwise

getReleaseAction

public Transaction.RELEASE_ACTION getReleaseAction()
Returns the release action mode to be applied after the transaction finished successfully.

Returns:
the release action mode to be applied after the transaction finished successfully
See Also:
Transaction.RELEASE_ACTION

getAffectedFeatureTypes

public Set<QualifiedName> getAffectedFeatureTypes()
Returns the names of the feature types that are affected by the transaction.

Returns:
the names of the affected feature types

create

public static Transaction create(String id,
                                 String request)
                          throws InconsistentRequestException,
                                 InvalidParameterValueException,
                                 MissingParameterValueException
Creates a Transaction request from a key-value-pair encoding of the parameters contained in the passed variable 'request'.

Parameters:
id - id of the request
request - key-value-pair encoded GetFeature request
Returns:
new created Transaction instance
Throws:
InconsistentRequestException
InvalidParameterValueException
MissingParameterValueException

create

public static Transaction create(Map<String,String> model)
                          throws InconsistentRequestException,
                                 InvalidParameterValueException,
                                 MissingParameterValueException
Creates a Transaction request from a key-value-pair encoding of the parameters contained in the given Map.

Parameters:
model - key-value-pair encoded Transaction request
Returns:
new Transaction instance
Throws:
InconsistentRequestException
InvalidParameterValueException
MissingParameterValueException

create

public static Transaction create(String id,
                                 Element root)
                          throws OGCWebServiceException
Creates a Transaction instance from a document that contains the DOM representation of the request.

Parameters:
id -
root - element that contains the DOM representation of the request
Returns:
transaction instance
Throws:
OGCWebServiceException

toString

public String toString()
Overrides:
toString in class AbstractOGCWebServiceRequest

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org