Class xhrdav.DavFs.Request

Constructor

Request ( xhrdav.Client davSite, (goog.net.XhrIo/goog.net.XhrManager) xhrIo ) Static
An encapsulation of everything needed to make a DavFs request. code »
Parameters
davSite : xhrdav.Client
WebDAV site.
xhrIo : (goog.net.XhrIo/goog.net.XhrManager)
request object of closure library (For Cross-site resource sharing[CORS]).

Instance members

Instance MethodsDefined By

contentReadHandler_ ( string path, number statusCode, Object content, Object headers ) : Array. Private xhrdav.DavFs.Request
Content read Handler code »
Parameters
path : string
HTTP Request path.
statusCode : number
HTTP Status code.
content : Object
Response body data.
headers : Object
Response headers.
Returns
Array.
Errors, new Location.
copy ( string path, string dstPath, Function handler, Object= opt_headers, Object= opt_params, Object= context, {xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
Copy resource code »
See #updateRequestHandler_
Parameters
path : string
Move src resource path.
dstPath : string
Move destination path.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {xhrId:string=}=
xhr options.
onXhrComplete : Function=
onXhrComplete callback function.
createRequestParameters_ ( Object= opt_headers, Object= opt_params, string= opt_xhrId ) : Object Private xhrdav.DavFs.Request
Create Request paramters. code »
Throws Not found of xhrIo object.
Parameters
opt_headers : Object=
HTTP Request Headers.
opt_params : Object=
HTTP Query parameters.
opt_xhrId : string=
Xhrmanager Id.
Returns
Object
created request map object.
Create ResourceController. code »
Parameters
resource : (xhrdav.Resource/Object)=
Json/Hash object for WebDAV resource.
Returns
xhrdav.ResourceController
createed request resource controller object.
exists ( string path, Function handler, Object= opt_headers, Object= opt_params, Object= context, {xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
Resource Exists to WebDAV server code »
Parameters
path : string
exists resource path.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {xhrId:string=}=
xhr options.
onXhrComplete : Function=
onXhrComplete callback function.
existsHandler_ ( string path, number statusCode, Object content, Object headers ) : Array. Private xhrdav.DavFs.Request
Exists Handler code »
Parameters
path : string
HTTP Request path.
statusCode : number
HTTP Status code.
content : Object
Response body data.
headers : Object
Response headers.
Returns
Array.
Errors, new Location.
getListDirFromMultistatus ( Object content, Object= opt_helper ) : (xhrdav.Resource/xhrdav.ResourceController/Object) xhrdav.DavFs.Request
Build Directory tree from multistatus code »
Parameters
content : Object
multistatus response data.
opt_helper : Object=
Returning resource controller.
Returns
(xhrdav.Resource/xhrdav.ResourceController/Object)
converted object for WebDAV resources.
getProps ( string path, Function handler, Object= opt_headers, Object= opt_params, Object= context, {hasCtrl:boolean=/asModel:boolean=/xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
Get property for a single resource. code »
See #propfindRequestHandler_
Parameters
path : string
property get request path.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {hasCtrl:boolean=/asModel:boolean=/xhrId:string=}=
xhr and response options.
onXhrComplete : Function=
onXhrComplete callback function.
listDir ( string path, Function handler, Object= opt_headers, Object= opt_params, Object= context, {hasCtrl:boolean=/asModel:boolean=/xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
listing collection code »
See #propfindRequestHandler_
Parameters
path : string
Listing request path.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {hasCtrl:boolean=/asModel:boolean=/xhrId:string=}=
xhr and response options.
onXhrComplete : Function=
onXhrComplete callback function.
mkDir ( string path, Function handler, Object= opt_headers, Object= opt_params, Object= context, {xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
Create directory (collection) code »
Parameters
path : string
Create dierctory path.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {xhrId:string=}=
xhr options.
onXhrComplete : Function=
onXhrComplete callback function.
move ( string path, string dstPath, Function handler, Object= opt_headers, Object= opt_params, Object= context, {xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
Move resource code »
Parameters
path : string
Move src resource path.
dstPath : string
Move destination path.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {xhrId:string=}=
xhr options.
onXhrComplete : Function=
onXhrComplete callback function.
processMultistatus_ ( string path, number statusCode, Object content, Object headers, unknown headers ) : Array. Private xhrdav.DavFs.Request
Processing Reponse Multi-Status Data code »
Parameters
path : string
HTTP Request path.
statusCode : number
HTTP Status code.
content : Object
Response body data.
headers : Object
Response headers.
headers : unknown
No description.
Returns
Array.
response contents.
propfindRequestHandler_ ( string method, string path, Function handler, Object= opt_request, Object= context, {hasCtrl:boolean/asModel:boolean}= opt_helper, Function= onXhrComplete ) Private xhrdav.DavFs.Request
Propfind request(listDir, getProps) handler. code »
Parameters
method : string
Method name of xhrdav.Client instance.
path : string
propfind request path.
handler : Function
callback handler function.
opt_request : Object=
Request parameters.
context : Object=
Callback scope.
opt_helper : {hasCtrl:boolean/asModel:boolean}=
response options.
onXhrComplete : Function=
onXhrComplete callback function.
read ( string path, Function handler, Object= opt_headers, Object= opt_params, {xhrId:string=}= opt_helper, Function= onXhrComplete, unknown onXhrComplete ) xhrdav.DavFs.Request
Read data from WebDAV server code »
Parameters
path : string
read file path.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
opt_helper : {xhrId:string=}=
xhr options.
onXhrComplete : Function=
onXhrComplete callback function.
onXhrComplete : unknown
No description.
remove ( string path, Function handler, Object= opt_headers, Object= opt_params, Object= context, {xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
Remove resource code »
Parameters
path : string
Remove resource path.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {xhrId:string=}=
xhr options.
onXhrComplete : Function=
onXhrComplete callback function.
responseHandler_ ( Function handler, Function processHandler, string path, * context, number statusCode, Object content, Object headers ) Private xhrdav.DavFs.Request
WebDAV Response process handler(callback) code »
Parameters
handler : Function
callback client.
processHandler : Function
callback process response handler.
path : string
Request path.
context : *
callback function scope.
statusCode : number
HTTP Status code.
content : Object
Response body data.
headers : Object
Response headers.
simpleErrorHandler_ ( string path, number statusCode, Object content, Object headers ) : Array. Private xhrdav.DavFs.Request
Error Handler Errors object structure: {status: , path: , summary: , message: } code »
Parameters
path : string
HTTP Request path.
statusCode : number
HTTP Status code.
content : Object
Response body data.
headers : Object
Response headers.
Returns
Array.
Errors, new Location.
updateRequestHandler_ ( string method, string path, string dstPath, Function handler, Object= opt_request, Object= context, Function= onXhrComplete ) Private xhrdav.DavFs.Request
Update(move, copy) request handler. code »
Parameters
method : string
Method name of xhrdav.Client instance.
path : string
Update src file path.
dstPath : string
Update destination path.
handler : Function
callback handler function.
opt_request : Object=
Request parameters.
context : Object=
Callback scope.
onXhrComplete : Function=
onXhrComplete callback function.
upload ( string path, File file, Function handler, Object= opt_headers, Object= opt_params, Object= context, {xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
Upload data to WebDAV server code »
Throws Not a file object.
Parameters
path : string
upload file path.
file : File
File object(File API).
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {xhrId:string=}=
xhr options.
onXhrComplete : Function=
onXhrComplete callback function.
write ( string path, Object content, Function handler, Object= opt_headers, Object= opt_params, Object= context, {xhrId:string=}= opt_helper, Function= onXhrComplete ) xhrdav.DavFs.Request
Write data to WebDAV server code »
Parameters
path : string
upload file path.
content : Object
data string.
handler : Function
callback handler function.
opt_headers : Object=
Request headers options.
opt_params : Object=
Request query paramters.
context : Object=
Callback scope.
opt_helper : {xhrId:string=}=
xhr options.
onXhrComplete : Function=
onXhrComplete callback function.

Instance PropertiesDefined By

No description. code »
No description. code »

Static members

Static MethodsDefined By

buildRequestErrors ( {statusCode: number/path: string/content: string=} data ) : {status: number|path: string|html: string|summary: string=|message: string=} Static xhrdav.DavFs.Request
Building request errors code »
Parameters
data : {statusCode: number/path: string/content: string=}
Response data.
Returns
{status: number/path: string/html: string/summary: string=/message: string=}
errors Map data.