UnlockMethod(java.lang.String path,
java.lang.String txHandle,
int transactionStatus)
Creates an unlock method that ends a transaction when server supports
them in a
| Methods inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase |
convertElementToProperty, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponses, getResponseURLs, parseResponse, parseXMLResponse, readResponseBody, setDebug, setDocument, setResponseHashtable, writeRequestBody |
| Methods inherited from class org.apache.commons.httpclient.HttpMethodBase |
addAuthorizationRequestHeader, addContentLengthRequestHeader, addCookieRequestHeader, addHostRequestHeader, addProxyAuthorizationRequestHeader, addProxyConnectionHeader, addRequestHeader, addRequestHeader, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, fakeResponse, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getFollowRedirects, getHostConfiguration, getMethodRetryHandler, getPath, getProxyAuthenticationRealm, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isConnectionCloseForced, isHttp11, isStrictMode, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setPath, setQueryString, setQueryString, setRequestHeader, setResponseStream, setStrictMode, shouldCloseConnection, validate, writeRequest, writeRequestHeaders, writeRequestLine |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_TRANSACTION
public static final int NO_TRANSACTION
- See Also:
- Constant Field Values
ABORT_TRANSACTION
public static final int ABORT_TRANSACTION
- See Also:
- Constant Field Values
COMMIT_TRANSACTION
public static final int COMMIT_TRANSACTION
- See Also:
- Constant Field Values
UnlockMethod
public UnlockMethod(java.lang.String path,
java.lang.String txHandle,
int transactionStatus)
- Creates an unlock method that ends a transaction when server supports
them in a
MS like style.
The transacion handle of transaction is stored as the lock token.
To start a transaction
use LockMethod.
- Parameters:
path - any path inside Slide's scopetxHandle - lock token specifying transaction handletransactionStatus - status of transaction as described in setTransactionStatus(int)
UnlockMethod
public UnlockMethod()
- Method constructor.
UnlockMethod
public UnlockMethod(java.lang.String path)
- Method constructor.
UnlockMethod
public UnlockMethod(java.lang.String path,
java.lang.String lockToken)
- Method constructor.
setLockToken
public void setLockToken(java.lang.String lockToken)
getTransactionStatus
public int getTransactionStatus()
- Gets the parameter described in
setTransactionStatus(int).
- Returns:
- either
COMMIT_TRANSACTION or ABORT_TRANSACTION as the real
transaction status or NO_TRANSACTION to indicate this method is not used for
transaction control
setTransactionStatus
public void setTransactionStatus(int transactionStatus)
- Sets the transaction status of this method when it is used to end a externally controlled
transaction.
- Parameters:
transactionStatus - COMMIT_TRANSACTION to set the status to successful commit or
ABORT_TRANSACTION to let the transaction abort discarding all changes associated to it.
getName
public java.lang.String getName()
recycle
public void recycle()
- Description copied from class:
XMLResponseMethodBase
- Reset the State of the class to its initial state, so that it can be
used again.
- Specified by:
recycle in interface HttpMethod- Overrides:
recycle in class XMLResponseMethodBase
setRequestHeader
public void setRequestHeader(java.lang.String headerName,
java.lang.String headerValue)
- Set header, handling the special case of the lock-token header so
that it calls
setLockToken(java.lang.String) instead.
- Parameters:
headerName - Header nameheaderValue - Header value
addRequestHeaders
public void addRequestHeaders(HttpState state,
HttpConnection conn)
throws java.io.IOException,
HttpException
- Generate additional headers needed by the request.
- Parameters:
state - HttpState tokenconn - The connection being used to send the request.
- Throws:
java.io.IOException
HttpException
generateRequestBody
protected java.lang.String generateRequestBody()
- Description copied from class:
XMLResponseMethodBase
- DAV requests that contain a body must override this function to
generate that body.
The default behavior simply returns an empty body.
- Overrides:
generateRequestBody in class XMLResponseMethodBase
processResponseBody
protected void processResponseBody(HttpState state,
HttpConnection conn)
|