Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.webdav.lib.methods
Class UnlockMethod  view UnlockMethod download UnlockMethod.java

java.lang.Object
  extended byorg.apache.commons.httpclient.HttpMethodBase
      extended byorg.apache.webdav.lib.methods.HttpRequestBodyMethodBase
          extended byorg.apache.webdav.lib.methods.XMLResponseMethodBase
              extended byorg.apache.webdav.lib.methods.UnlockMethod
All Implemented Interfaces:
org.apache.commons.httpclient.HttpMethod

public class UnlockMethod
extends XMLResponseMethodBase

UNLOCK Method.


Nested Class Summary
 
Nested classes inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
XMLResponseMethodBase.OptionsResponse, XMLResponseMethodBase.Response, XMLResponseMethodBase.ResponseWithinMultistatus, XMLResponseMethodBase.SingleResponse
 
Field Summary
static int ABORT_TRANSACTION
           
static int COMMIT_TRANSACTION
           
private  java.lang.String lockToken
           
static int NO_TRANSACTION
           
private  int transactionStatus
           
 
Fields inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
builder, decodeResponseHrefs, responseURLs
 
Fields inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase
 
Fields inherited from class org.apache.commons.httpclient.HttpMethodBase
 
Constructor Summary
UnlockMethod()
          Method constructor.
UnlockMethod(java.lang.String path)
          Method constructor.
UnlockMethod(java.lang.String path, java.lang.String lockToken)
          Method constructor.
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.
 
Method Summary
 void addRequestHeaders(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn)
          Generate additional headers needed by the request.
protected  java.lang.String generateRequestBody()
          DAV requests that contain a body must override this function to generate that body.
 java.lang.String getName()
          Obtains the name of the HTTP method as used in the HTTP request line, for example "GET" or "POST".
 int getTransactionStatus()
          Gets the parameter described in setTransactionStatus(int) 55 .
protected  void processResponseBody(org.apache.commons.httpclient.HttpState state, org.apache.commons.httpclient.HttpConnection conn)
          This method is invoked immediately after XMLResponseMethodBase.readResponseBody(HttpState,HttpConnection) 55 and can be overridden by sub-classes in order to provide custom body processing.
 void recycle()
          Reset the State of the class to its initial state, so that it can be used again.
 void setLockToken(java.lang.String lockToken)
           
 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) 55 instead.
 void setTransactionStatus(int transactionStatus)
          Sets the transaction status of this method when it is used to end a externally controlled transaction.
 
Methods inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase
convertElementToProperty, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponses, getResponseURLs, parseResponse, parseXMLResponse, readResponseBody, setDebug, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody
 
Methods inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase
isRequestContentAlreadySet, readContinueCode, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody
 
Methods inherited from class org.apache.commons.httpclient.HttpMethodBase
abort, addCookieRequestHeader, addHostRequestHeader, addProxyConnectionHeader, addRequestHeader, addRequestHeader, addResponseFooter, addUserAgentRequestHeader, checkNotUsed, checkUsed, execute, generateRequestLine, getAuthenticationRealm, getContentCharSet, getDoAuthentication, getEffectiveVersion, getFollowRedirects, getHostAuthState, getHostConfiguration, getMethodRetryHandler, getParams, getPath, getProxyAuthenticationRealm, getProxyAuthState, getQueryString, getRecoverableExceptionCount, getRequestCharSet, getRequestHeader, getRequestHeaderGroup, getRequestHeaders, getRequestHeaders, getResponseBody, getResponseBodyAsStream, getResponseBodyAsString, getResponseCharSet, getResponseContentLength, getResponseFooter, getResponseFooters, getResponseHeader, getResponseHeaderGroup, getResponseHeaders, getResponseHeaders, getResponseStream, getResponseTrailerHeaderGroup, getStatusCode, getStatusLine, getStatusText, getURI, hasBeenUsed, isAborted, isConnectionCloseForced, isHttp11, isRequestSent, isStrictMode, processResponseHeaders, processStatusLine, readResponse, readResponseHeaders, readStatusLine, releaseConnection, removeRequestHeader, removeRequestHeader, responseBodyConsumed, setConnectionCloseForced, setDoAuthentication, setFollowRedirects, setHostConfiguration, setHttp11, setMethodRetryHandler, setParams, setPath, setQueryString, setQueryString, setRequestHeader, setResponseStream, setStrictMode, setURI, shouldCloseConnection, validate, writeRequest, writeRequestHeaders, writeRequestLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

lockToken

private java.lang.String lockToken

transactionStatus

private int transactionStatus
Constructor Detail

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.


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.

Method Detail

setLockToken

public void setLockToken(java.lang.String lockToken)

getTransactionStatus

public int getTransactionStatus()
Gets the parameter described in setTransactionStatus(int) 55 .


setTransactionStatus

public void setTransactionStatus(int transactionStatus)
Sets the transaction status of this method when it is used to end a externally controlled transaction.


getName

public java.lang.String getName()
Description copied from class: org.apache.commons.httpclient.HttpMethodBase
Obtains the name of the HTTP method as used in the HTTP request line, for example "GET" or "POST".


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 org.apache.commons.httpclient.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) 55 instead.


addRequestHeaders

public void addRequestHeaders(org.apache.commons.httpclient.HttpState state,
                              org.apache.commons.httpclient.HttpConnection conn)
                       throws java.io.IOException,
                              org.apache.commons.httpclient.HttpException
Generate additional headers needed by the request.


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(org.apache.commons.httpclient.HttpState state,
                                   org.apache.commons.httpclient.HttpConnection conn)
Description copied from class: org.apache.commons.httpclient.HttpMethodBase
This method is invoked immediately after HttpMethodBase.readResponseBody(HttpState,HttpConnection)>HttpMethodBase.readResponseBody(HttpState,HttpConnection) 55 and can be overridden by sub-classes in order to provide custom body processing.

This implementation does nothing.