org.apache.webdav.lib.methods

Class CheckinMethod


public class CheckinMethod
extends XMLResponseMethodBase

The CHECKIN method can be applied to a checked-out version-controlled resource to produce a new version whose content and dead properties are copied from the checked-out resource.

This implementation of a CHECKIN client method does support a a request body.

If a CHECKIN request fails, the server state preceding the request MUST be restored. The request body MUST be a DAV:checkin XML element with at most one DAV:keep-checked-out or DAV:fork-ok.

Example Request

 CHECKIN /foo.html HTTP/1.1
 Host: www.server.org
 Content-type: text/xml; charset="utf-8"
 Content-Length: xx
 

Example Response

 HTTP/1.1 201 Created
 Location: http://server.org/history/1/1.1
 Content-type: text/xml; charset="utf-8"
 

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

XMLResponseMethodBase.OptionsResponse, XMLResponseMethodBase.Response, XMLResponseMethodBase.ResponseWithinMultistatus, XMLResponseMethodBase.SingleResponse

Field Summary

Fields inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

builder, decodeResponseHrefs, responseURLs

Constructor Summary

CheckinMethod()
Method constructor.
CheckinMethod(String path)
Method constructor.

Method Summary

String
getName()
void
parseResponse(InputStream input, HttpState state, HttpConnection conn)
Parse response.

Methods inherited from class org.apache.webdav.lib.methods.XMLResponseMethodBase

convertElementToProperty, generateRequestBody, getDebug, getRequestContentLength, getResponseDocument, getResponseHashtable, getResponseURLs, getResponses, parseResponse, parseXMLResponse, readResponseBody, recycle, setDebug, setDecodeResponseHrefs, setDocument, setResponseHashtable, writeRequestBody

Methods inherited from class org.apache.webdav.lib.methods.HttpRequestBodyMethodBase

getRequestContentLength, isRequestContentAlreadySet, readContinueCode, recycle, setRequestBody, setRequestBody, setRequestBody, setRequestBody, setRequestBody, writeRequestBody

Constructor Details

CheckinMethod

public CheckinMethod()
Method constructor.

CheckinMethod

public CheckinMethod(String path)
Method constructor.

Method Details

getName

public String getName()

parseResponse

public void parseResponse(InputStream input,
                          HttpState state,
                          HttpConnection conn)
            throws IOException,
                   HttpException
Parse response.
Overrides:
parseResponse in interface XMLResponseMethodBase
Parameters:
input - Input stream