org.deegree_impl.services.wfs.protocol
Class WFSTransactionResponse_Impl

java.lang.Object
  extended byorg.deegree_impl.services.OGCWebServiceResponse_Impl
      extended byorg.deegree_impl.services.wfs.protocol.WFSBasicResponse_Impl
          extended byorg.deegree_impl.services.wfs.protocol.WFSTransactionResponse_Impl
All Implemented Interfaces:
Marshallable, OGCWebServiceResponse, WFSBasicResponse, WFSTransactionResponse

class WFSTransactionResponse_Impl
extends WFSBasicResponse_Impl
implements WFSTransactionResponse, Marshallable

In response to a transaction request, the web feature server shall generate an object document indicating the termination status of the transaction. In addition, if the transaction request includes operations, then the web feature server must report the feature identifiers of all newly created features. In the event that the transaction fails to execute, a web feature server shall also indicate this in the response.

--------------------------------------------------------

Version:
$Revision: 1.5 $ $Date: 2004/04/27 15:40:38 $
Author:
Andreas Poth

Field Summary
private  java.lang.String handle
           
private  java.util.ArrayList insertResults
           
private  java.lang.String locator
           
private  java.lang.String message
           
private  java.lang.String status
           
 
Fields inherited from class org.deegree_impl.services.OGCWebServiceResponse_Impl
 
Constructor Summary
(package private) WFSTransactionResponse_Impl(OGCWebServiceRequest request, java.lang.String[] affectedFeatureTypes, org.w3c.dom.Document exception, WFSInsertResult[] insertResults, java.lang.String status, java.lang.String handle)
          Creates a new WFSTransactionResponse_Impl object.
 
Method Summary
 void addAffectedFeatureTypes(java.lang.String affectedFeatureTypes)
          adds the
 void addInserResult(WFSInsertResult insertResult)
           
 java.lang.String exportAsXML()
          returns the XML reprsentation of the wfs transaction result
 java.lang.String[] getAffectedFeatureTypes()
          returns a list of feature type names that has been affected by the response.
 java.lang.String getHandle()
          The handle attribute is included to allow a server to associate any text to the response.
 WFSInsertResult[] getInsertResult()
          The is used to delimit one or more feature identifiers of newly created features.
 java.lang.String getLocator()
          In the event that a transaction request fails, the can be used to indicate which part of the transaction failed.
 java.lang.String getMessage()
          Returns any error messages.
 java.lang.String getStatus()
          A transaction can terminate with a status of: SUCCESS: The transaction was successfully completed.
 void setAffectedFeatureTypes(java.lang.String[] affectedFeatureTypes)
          sets the
 void setHandle(java.lang.String handle)
           
 void setInsertResult(WFSInsertResult[] insertResults)
           
 void setLocator(java.lang.String locator)
           
 void setMessage(java.lang.String message)
           
 void setStatus(java.lang.String status)
           
 java.lang.String toString()
           
 
Methods inherited from class org.deegree_impl.services.OGCWebServiceResponse_Impl
getException, getRequest, setException, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.services.wfs.protocol.WFSBasicResponse
getAffectedFeatureTypes
 
Methods inherited from interface org.deegree.services.OGCWebServiceResponse
getException, getRequest, setException, setRequest
 

Field Detail

insertResults

private java.util.ArrayList insertResults

handle

private java.lang.String handle

locator

private java.lang.String locator

message

private java.lang.String message

status

private java.lang.String status
Constructor Detail

WFSTransactionResponse_Impl

WFSTransactionResponse_Impl(OGCWebServiceRequest request,
                            java.lang.String[] affectedFeatureTypes,
                            org.w3c.dom.Document exception,
                            WFSInsertResult[] insertResults,
                            java.lang.String status,
                            java.lang.String handle)
Creates a new WFSTransactionResponse_Impl object.

Parameters:
request -
affectedFeatureTypes -
exception -
insertResults -
status -
handle -
Method Detail

getInsertResult

public WFSInsertResult[] getInsertResult()
The is used to delimit one or more feature identifiers of newly created features. The insert results are reported in the order in which the operations were specified in the request. Additionally, they can be correlated using the handle attribute.

Specified by:
getInsertResult in interface WFSTransactionResponse

addInserResult

public void addInserResult(WFSInsertResult insertResult)
See Also:
getInsertResult()

setInsertResult

public void setInsertResult(WFSInsertResult[] insertResults)
See Also:
getInsertResult()

getStatus

public java.lang.String getStatus()
A transaction can terminate with a status of:
  • SUCCESS: The transaction was successfully completed.
  • FAILED: One or more operations in the transaction failed.
  • PARTIAL: The transaction partially succeeded and the data may be in an inconsistent state. For systems that do not support atomic transactions, this outcome is a distinct possibility.

    Specified by:
    getStatus in interface WFSTransactionResponse

  • setStatus

    public void setStatus(java.lang.String status)
    See Also:
    getStatus()

    getLocator

    public java.lang.String getLocator()
    In the event that a transaction request fails, the can be used to indicate which part of the transaction failed. If the failed operation is labeled using a handle attribute then that can be used to locate the failure. Otherwise, the web feature server may try to identify the failure relative to the beginning of the transaction request possibly using line numbers or some other convenient mechanism.

    Specified by:
    getLocator in interface WFSTransactionResponse

    setLocator

    public void setLocator(java.lang.String locator)
    See Also:
    getLocator()

    getMessage

    public java.lang.String getMessage()
    Returns any error messages.

    Specified by:
    getMessage in interface WFSTransactionResponse

    setMessage

    public void setMessage(java.lang.String message)
    See Also:
    getMessage()

    getHandle

    public java.lang.String getHandle()
    The handle attribute is included to allow a server to associate any text to the response. The purpose of the handle attribute is to provide an error handling mechanism for locating a statement that might fail.

    Specified by:
    getHandle in interface WFSTransactionResponse

    setHandle

    public void setHandle(java.lang.String handle)
    See Also:
    getHandle()

    toString

    public java.lang.String toString()
    Overrides:
    toString in class WFSBasicResponse_Impl
    Returns:

    exportAsXML

    public java.lang.String exportAsXML()
    returns the XML reprsentation of the wfs transaction result

    Specified by:
    exportAsXML in interface Marshallable
    Returns:
    XML-representation of this object

    getAffectedFeatureTypes

    public java.lang.String[] getAffectedFeatureTypes()
    returns a list of feature type names that has been affected by the response.

    Specified by:
    getAffectedFeatureTypes in interface WFSBasicResponse

    addAffectedFeatureTypes

    public void addAffectedFeatureTypes(java.lang.String affectedFeatureTypes)
    adds the


    setAffectedFeatureTypes

    public void setAffectedFeatureTypes(java.lang.String[] affectedFeatureTypes)
    sets the