webdav.client 5.20.5664
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.npmignore +2 -0
- package/Help/ClassReference/Create.html +3026 -0
- package/Help/ClassReference/ITHit.Environment.html +2961 -0
- package/Help/ClassReference/ITHit.LogLevel.html +3198 -0
- package/Help/ClassReference/ITHit.Logger.html +3381 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.AsyncResult.html +3096 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.BrowserExtension.html +3493 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.CancellableResult.html +3262 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.DavConstants.html +4368 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Depth.html +3035 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.DocManager.html +4756 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Encoder.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Error.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.BadRequestException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.ConflictException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.DependencyFailedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.ForbiddenException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.Error.html +2969 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.Multistatus.html +2920 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.MultistatusResponse.html +2920 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.PropertyMultistatus.html +2972 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Info.PropertyMultistatusResponse.html +2920 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.InsufficientStorageException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.IntegrationException.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.LockedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.MethodNotAllowedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.NotFoundException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.NotImplementedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.Parsers.InsufficientStorage.html +3022 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PreconditionFailedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PropertyConflictException.html +3147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PropertyException.html +3147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PropertyForbiddenException.html +3147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.PropertyNotFoundException.html +3147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.QuotaNotExceededException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.SufficientDiskSpaceException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.UnauthorizedException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.WebDavException.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Exceptions.WebDavHttpException.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Features.html +3423 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.File.html +9512 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Folder.html +11207 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.HierarchyItem.html +8575 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.HttpStatus.html +4945 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.LockInfo.html +3141 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.LockScope.html +3020 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.LockUriTokenPair.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.CancelUpload.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.CopyMove.html +2967 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Delete.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.ErrorResponse.html +2968 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Get.GoAsync.html +3047 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Get.html +2921 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Head.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.HttpMethod.html +2982 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Lock.Go.html +3083 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Lock.GoAsync.html +3101 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Lock.html +2924 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.LockRefresh.Go.html +3083 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.LockRefresh.GoAsync.html +3101 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.LockRefresh.html +2924 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Mkcol.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.MultiResponse.html +2968 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Options.html +2965 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Propfind.html +2967 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Proppatch.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Propstat.html +2950 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Put.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Report.html +2978 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Response.html +2968 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.ResponseFactory.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Search.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.SingleResponse.html +2959 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Undelete.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.Unlock.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.UpdateToVersion.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Methods.VersionControl.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.MsOfficeEditExtensions.html +3289 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Multistatus.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.MultistatusResponse.html +3051 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.OptionsInfo.html +2961 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.OrderProperty.html +3172 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.PageResults.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Property.html +3229 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.PropertyList.html +3265 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.PropertyMultistatusResponse.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.PropertyName.html +3184 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Request.html +3818 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.RequestProgress.html +3186 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.ResourceType.html +2973 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.ResumableUpload.html +3482 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.SPSManager.html +3170 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.SearchQuery.html +3186 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Source.html +3006 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.DocManager.MsOfficeEditExtensions.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.CopyMove.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.CreateFile.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.CreateFolder.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.Delete.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetFolderItems.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetHeadRequests.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemByFolder.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemBySession.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.GetParent.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.ItemExists.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.MicrosoftOfficeDiscovery.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.NameCheck.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.Progress.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.Refresh.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.Search.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyItems.SupportedFeatures.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyProperties.GetProperties.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.HierarchyProperties.UpdateProperties.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.CheckSupport.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.Etag.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.GetLocks.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.Lock.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Locks.RefreshLock.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Versions.GetVersions.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Versions.ManageVersions.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Versions.PutUnderVersion.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.Versions.ReadContent.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Tests.WebDavSession.Events.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.AutoUploader.html +2970 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Collections.Map.html +3130 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Collections.Pair.html +3004 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.ContentWriter.html +3158 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Controls.DropZone.html +3012 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Controls.FSEntryFactory.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Controls.HtmlControl.html +3002 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Controls.Input.html +3012 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.DropZoneCollection.html +3354 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.AsyncEvent.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.BaseEvent.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.BeforeUploadStarted.html +3242 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.Error.html +2918 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.EventName.html +3059 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.ProgressChanged.html +2918 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.QueueChanged.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.StateChanged.html +2918 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.UploadError.html +3371 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Events.UploadItemsCreated.html +3358 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.FSEntry.html +3039 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.FileSpan.html +3023 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Groups.Group.html +2978 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Groups.GroupManager.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.InputCollection.html +3354 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.ItemSettings.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Path.Generator.html +3102 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Path.PathCache.html +2910 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Progress.html +3186 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Providers.ProgressTracker.html +2961 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Providers.UploadDiff.html +3003 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Providers.UploadProvider.html +3049 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Queue.html +3824 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.ServerItem.html +2978 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Settings.html +3060 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.State.html +3243 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.BaseState.html +2908 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.CanceledState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.CompletedState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.Factory.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.PausedState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.QueuedState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.ResumeState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.SkippedState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.States.UploadingState.html +2914 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.UploadItem.html +6147 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.UploadLocation.html +2978 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Uploader.html +3314 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.UploaderSession.html +4374 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Utils.DavUrl.html +2996 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Utils.DavUrlBuilder.html +2961 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Upload.Utils.RepeatableAction.html +3077 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.UploadProgressInfo.html +3096 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.Version.html +4373 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.WebDavRequest.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.WebDavResponse.html +2912 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.WebDavSession.html +5097 -0
- package/Help/ClassReference/ITHit.WebDAV.Client.WebDavUtil.html +2912 -0
- package/Help/ClassReference/fonts/glyphicons-halflings-regular.eot +0 -0
- package/Help/ClassReference/fonts/glyphicons-halflings-regular.svg +229 -0
- package/Help/ClassReference/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/Help/ClassReference/fonts/glyphicons-halflings-regular.woff +0 -0
- package/Help/ClassReference/global.html +8985 -0
- package/Help/ClassReference/index.html +3889 -0
- package/Help/ClassReference/scripts/bootstrap.min.js +7 -0
- package/Help/ClassReference/scripts/jquery.min.js +6 -0
- package/Help/ClassReference/scripts/jquery.min.map +1 -0
- package/Help/ClassReference/scripts/linenumber.js +29 -0
- package/Help/ClassReference/scripts/main.js +104 -0
- package/Help/ClassReference/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/Help/ClassReference/scripts/prettify/lang-css.js +2 -0
- package/Help/ClassReference/scripts/prettify/prettify.js +28 -0
- package/Help/ClassReference/scripts/underscore-min.js +6 -0
- package/Help/ClassReference/scripts/underscore-min.map +1 -0
- package/Help/ClassReference/styles/bootstrap.min.css +7 -0
- package/Help/ClassReference/styles/jaguar.css +406 -0
- package/Help/ClassReference/styles/prettify-jsdoc.css +111 -0
- package/Help/ClassReference/styles/prettify-tomorrow.css +132 -0
- package/Help/index.html +6 -0
- package/IT Hit WebDAV AJAX Library License Agreement.rtf +314 -0
- package/ITHitWebDAVClient.js +87 -0
- package/Plugins/ITHitEditDocumentOpener.deb +0 -0
- package/Plugins/ITHitEditDocumentOpener.msi +0 -0
- package/Plugins/ITHitEditDocumentOpener.pkg +0 -0
- package/Plugins/ITHitEditDocumentOpener.rpm +0 -0
- package/README.md +98 -0
- package/Tests/DocManager/MsOfficeEditExtensions.js +53 -0
- package/Tests/Helper.js +214 -0
- package/Tests/HierarchyItems/CopyMove.js +341 -0
- package/Tests/HierarchyItems/CreateFile.js +157 -0
- package/Tests/HierarchyItems/CreateFolder.js +156 -0
- package/Tests/HierarchyItems/Delete.js +73 -0
- package/Tests/HierarchyItems/GetFolderItems.js +87 -0
- package/Tests/HierarchyItems/GetHeadRequests.js +73 -0
- package/Tests/HierarchyItems/GetItemByFolder.js +91 -0
- package/Tests/HierarchyItems/GetItemBySession.js +135 -0
- package/Tests/HierarchyItems/GetParent.js +58 -0
- package/Tests/HierarchyItems/ItemExists.js +73 -0
- package/Tests/HierarchyItems/MicrosoftOfficeDiscovery.js +51 -0
- package/Tests/HierarchyItems/NameCheck.js +184 -0
- package/Tests/HierarchyItems/Progress.js +89 -0
- package/Tests/HierarchyItems/Quota.js +35 -0
- package/Tests/HierarchyItems/Refresh.js +68 -0
- package/Tests/HierarchyItems/Search.js +187 -0
- package/Tests/HierarchyItems/SupportedFeatures.js +53 -0
- package/Tests/HierarchyProperties/GetProperties.js +192 -0
- package/Tests/HierarchyProperties/UpdateFolderProperties.js +138 -0
- package/Tests/HierarchyProperties/UpdateProperties.js +187 -0
- package/Tests/ITHitTests.css +72 -0
- package/Tests/ITHitTests.js +560 -0
- package/Tests/Locks/CheckSupport.js +66 -0
- package/Tests/Locks/CopyLock.js +67 -0
- package/Tests/Locks/Etag.js +277 -0
- package/Tests/Locks/GetLocks.js +117 -0
- package/Tests/Locks/Lock.js +134 -0
- package/Tests/Locks/RefreshLock.js +94 -0
- package/Tests/Upload/CancelUpload.js +34 -0
- package/Tests/Upload/GetBytesUploaded.js +47 -0
- package/Tests/Versions/GetVersions.js +84 -0
- package/Tests/Versions/ManageVersions.js +180 -0
- package/Tests/Versions/PutUnderVersion.js +98 -0
- package/Tests/Versions/ReadContent.js +82 -0
- package/Tests/WebDavSession/Events.js +125 -0
- package/Tests/index.html +9 -0
- package/Tests/qunit-runner/highlight/github.css +124 -0
- package/Tests/qunit-runner/highlight/highlight.js +1 -0
- package/Tests/qunit-runner/main.js +340 -0
- package/Tests/qunit-runner/qunit/jquery.js +10308 -0
- package/Tests/qunit-runner/qunit/qunit.css +237 -0
- package/Tests/qunit-runner/qunit/qunit.js +2495 -0
- package/package.json +25 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('HierarchyItems.Delete');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.HierarchyItems.Delete
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.HierarchyItems.Delete', null, {}, /** @lends ITHit.WebDAV.Client.Tests.HierarchyItems.Delete */{
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {ITHit.WebDAV.Client.WebDavSession} [webDavSession=new ITHit.WebDAV.Client.WebDavSession()]
|
|
14
|
+
* @param {string} [sFolderAbsolutePath='http://localhost:87654/my_folder/']
|
|
15
|
+
* @param {function} [fCallback=function() {}]
|
|
16
|
+
*/
|
|
17
|
+
Delete: function(webDavSession, sFolderAbsolutePath, fCallback) {
|
|
18
|
+
webDavSession.OpenFolderAsync(sFolderAbsolutePath, null, function(oAsyncResult) {
|
|
19
|
+
|
|
20
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
21
|
+
var oFolder = oAsyncResult.Result;
|
|
22
|
+
|
|
23
|
+
oFolder.DeleteAsync(null, function(oAsyncResult) {
|
|
24
|
+
|
|
25
|
+
if (oAsyncResult.IsSuccess) {
|
|
26
|
+
console.log('Folder successfully deleted.');
|
|
27
|
+
} else if (oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.WebDavHttpException) {
|
|
28
|
+
var sErrorText = oAsyncResult.Error.Message + ' ' + oAsyncResult.Error.Status.Code + ' ' +
|
|
29
|
+
oAsyncResult.Error.Status.Description;
|
|
30
|
+
|
|
31
|
+
// Find which items failed to delete.
|
|
32
|
+
for(var i = 0, l = oAsyncResult.Error.Multistatus.Responses.length; i < l; i++) {
|
|
33
|
+
var oResponse = oAsyncResult.Error.Multistatus.Responses[i];
|
|
34
|
+
sErrorText += '\n' + oResponse.Href + ' ' + oResponse.Status.Code + ' ' +
|
|
35
|
+
oResponse.Status.Description;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
console.log('Delete error: ' + sErrorText);
|
|
39
|
+
} else {
|
|
40
|
+
console.log('Delete error: ' + String(oAsyncResult.Error));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
fCallback(oAsyncResult);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
QUnitRunner.test('Delete folder and check it not found', function (test) {
|
|
51
|
+
QUnit.stop();
|
|
52
|
+
Helper.Create([
|
|
53
|
+
'HierarchyItems/Delete/my_folder/'
|
|
54
|
+
], function() {
|
|
55
|
+
QUnit.start();
|
|
56
|
+
|
|
57
|
+
QUnit.stop();
|
|
58
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.Delete.Delete(webDavSession, Helper.GetAbsolutePath('HierarchyItems/Delete/my_folder/'), function(oAsyncResult) {
|
|
59
|
+
QUnit.start();
|
|
60
|
+
|
|
61
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of delete request');
|
|
62
|
+
|
|
63
|
+
QUnit.stop();
|
|
64
|
+
webDavSession.OpenFolderAsync(Helper.GetAbsolutePath('HierarchyItems/Delete/my_folder/'), null, function(oAsyncResult) {
|
|
65
|
+
QUnit.start();
|
|
66
|
+
|
|
67
|
+
test.strictEqual(oAsyncResult.IsSuccess, false, 'Check failure request on get deleted folder');
|
|
68
|
+
test.strictEqual(oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.NotFoundException, true, 'Check error is NotFoundException');
|
|
69
|
+
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('HierarchyItems.GetFolderItems');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.HierarchyItems.GetFolderItems
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.HierarchyItems.GetFolderItems', null, {}, /** @lends ITHit.WebDAV.Client.Tests.HierarchyItems.GetFolderItems */{
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {ITHit.WebDAV.Client.WebDavSession} [webDavSession=new ITHit.WebDAV.Client.WebDavSession()]
|
|
14
|
+
* @param {string} [sFolderAbsolutePath='http://localhost:87654/']
|
|
15
|
+
* @param {function} [fCallback=function() {}]
|
|
16
|
+
*/
|
|
17
|
+
GetChildren: function(webDavSession, sFolderAbsolutePath, fCallback) {
|
|
18
|
+
webDavSession.OpenFolderAsync(sFolderAbsolutePath, null, function(oFolderAsyncResult) {
|
|
19
|
+
|
|
20
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
21
|
+
var oFolder = oFolderAsyncResult.Result;
|
|
22
|
+
|
|
23
|
+
oFolder.GetChildrenAsync(null, null, function(oItemsAsyncResult) {
|
|
24
|
+
|
|
25
|
+
/** @typedef {ITHit.WebDAV.Client.HierarchyItems[]} aItems */
|
|
26
|
+
var aItems = oItemsAsyncResult.Result;
|
|
27
|
+
|
|
28
|
+
for (var i = 0, l = aItems.length; i < l; i++) {
|
|
29
|
+
console.log(aItems[i].DisplayName);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
fCallback(oItemsAsyncResult);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @param {ITHit.WebDAV.Client.WebDavSession} [webDavSession=new ITHit.WebDAV.Client.WebDavSession()]
|
|
39
|
+
* @param {string} [sFolderAbsolutePath='http://localhost:87654/']
|
|
40
|
+
* @param {number} [offset=10]
|
|
41
|
+
* @param {number} [pageSize=5]
|
|
42
|
+
* @param {ITHit.WebDAV.Client.OrderProperty[]} [sortColumns=[new ITHit.WebDAV.Client.OrderProperty(new ITHit.WebDAV.Client.PropertyName('name', 'myNs'), true)]]
|
|
43
|
+
* @param {function} [fCallback=function() {}]
|
|
44
|
+
*/
|
|
45
|
+
GetPage: function (webDavSession, sFolderAbsolutePath, offset, pageSize, sortColumns, fCallback) {
|
|
46
|
+
webDavSession.OpenFolderAsync(sFolderAbsolutePath, null, function (oFolderAsyncResult) {
|
|
47
|
+
|
|
48
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
49
|
+
var oFolder = oFolderAsyncResult.Result;
|
|
50
|
+
|
|
51
|
+
oFolder.GetPageAsync(null, offset, pageSize, sortColumns, function (oPagingAsyncResult) {
|
|
52
|
+
|
|
53
|
+
/** @type {ITHit.WebDAV.Client.HierarchyItem[]} aItems */
|
|
54
|
+
var aItems = oPagingAsyncResult.Result.Page; // Items on the requested page.
|
|
55
|
+
/** @type {number} totalPages */
|
|
56
|
+
var totalPages = Math.ceil(oPagingAsyncResult.Result.TotalItems / pageSize); // Total number of pages.
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
QUnitRunner.test('List folder content', function (test) {
|
|
63
|
+
QUnit.stop();
|
|
64
|
+
Helper.Create([
|
|
65
|
+
'HierarchyItems/GetChildren/item1.txt',
|
|
66
|
+
'HierarchyItems/GetChildren/item2.txt'
|
|
67
|
+
], function() {
|
|
68
|
+
QUnit.start();
|
|
69
|
+
|
|
70
|
+
QUnit.stop();
|
|
71
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.GetFolderItems.GetChildren(webDavSession, Helper.GetAbsolutePath('HierarchyItems/GetChildren/'), function(oAsyncResult) {
|
|
72
|
+
QUnit.start();
|
|
73
|
+
|
|
74
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of get children request');
|
|
75
|
+
test.strictEqual(oAsyncResult.Result.length, 2, 'Check children length');
|
|
76
|
+
|
|
77
|
+
var aFileNames = [];
|
|
78
|
+
for (var i = 0, l = oAsyncResult.Result.length; i < l; i++) {
|
|
79
|
+
aFileNames.push(oAsyncResult.Result[i].DisplayName);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
aFileNames = aFileNames.sort();
|
|
83
|
+
test.strictEqual(aFileNames[0], 'item1.txt', 'Check first child name');
|
|
84
|
+
test.strictEqual(aFileNames[1], 'item2.txt', 'Check second child name');
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('HierarchyItems.GetHeadRequests');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.HierarchyItems.GetHeadRequests
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.HierarchyItems.GetHeadRequests', null, {}, /** @lends ITHit.WebDAV.Client.Tests.HierarchyItems.GetHeadRequests */{
|
|
11
|
+
|
|
12
|
+
XhrSend: function(method, sPath, fCallback) {
|
|
13
|
+
var xhr = new XMLHttpRequest();
|
|
14
|
+
xhr.open(method, sPath, true);
|
|
15
|
+
xhr.onreadystatechange = function() {
|
|
16
|
+
if (xhr.readyState === 4) {
|
|
17
|
+
var oHeaders = {};
|
|
18
|
+
var aHeaders = xhr.getAllResponseHeaders().split('\n');
|
|
19
|
+
for (var i = 0; i < aHeaders.length; i++) {
|
|
20
|
+
var aParts = aHeaders[i].split(':');
|
|
21
|
+
if (aParts.length > 1) {
|
|
22
|
+
oHeaders[aParts.shift()] = aParts.join(':').replace(/^\s+|\s+$/g, '');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
fCallback(xhr, oHeaders);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
xhr.send();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
QUnitRunner.test('Check GET request support on folder', function (test) {
|
|
35
|
+
var sFilePath = 'HierarchyItems/GetHeadRequests/';
|
|
36
|
+
Helper.Create(sFilePath, QUnitRunner.async(function () {
|
|
37
|
+
|
|
38
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.GetHeadRequests.XhrSend('GET', Helper.GetAbsolutePath(sFilePath), QUnitRunner.async(function (xhr) {
|
|
39
|
+
|
|
40
|
+
test.strictEqual(xhr.status, 200, 'Check response status');
|
|
41
|
+
}));
|
|
42
|
+
}));
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
QUnitRunner.test('Check HEAD support on folder', function (test) {
|
|
47
|
+
var sFilePath = 'HierarchyItems/GetHeadRequests/';
|
|
48
|
+
Helper.Create(sFilePath, QUnitRunner.async(function () {
|
|
49
|
+
|
|
50
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.GetHeadRequests.XhrSend('HEAD', Helper.GetAbsolutePath(sFilePath), QUnitRunner.async(function (xhr, oHeadHeaders) {
|
|
51
|
+
|
|
52
|
+
test.strictEqual(xhr.status, 200, 'Check response status');
|
|
53
|
+
|
|
54
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.GetHeadRequests.XhrSend('GET', Helper.GetAbsolutePath(sFilePath), QUnitRunner.async(function (xhr, oGetHeaders) {
|
|
55
|
+
|
|
56
|
+
test.strictEqual(xhr.status, 200, 'Check response status');
|
|
57
|
+
|
|
58
|
+
var aHeaders = [
|
|
59
|
+
'Content-Type',
|
|
60
|
+
'Last-Modified',
|
|
61
|
+
'etag'
|
|
62
|
+
];
|
|
63
|
+
for (var i = 0, l = aHeaders.length; i < l; i++) {
|
|
64
|
+
if (oHeadHeaders[aHeaders[i]] && oGetHeaders[aHeaders[i]]) {
|
|
65
|
+
test.strictEqual(oHeadHeaders[aHeaders[i]], oGetHeaders[aHeaders[i]], 'Check "' + aHeaders[i] + '" header equals on HEAD and GET requests');
|
|
66
|
+
} else {
|
|
67
|
+
console.error('Header "' + aHeaders[i] + '" is not support');
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
}));
|
|
72
|
+
}));
|
|
73
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('HierarchyItems.GetItemByFolder');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemByFolder
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemByFolder', null, {}, /** @lends ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemByFolder */{
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {ITHit.WebDAV.Client.WebDavSession} [webDavSession=new ITHit.WebDAV.Client.WebDavSession()]
|
|
14
|
+
* @param {string} [sFolderAbsolutePath='http://localhost:87654/Products/']
|
|
15
|
+
* @param {string} [sFileName='myfile.txt']
|
|
16
|
+
* @param {function} [fCallback=function() {}]
|
|
17
|
+
*/
|
|
18
|
+
GetFile: function(webDavSession, sFolderAbsolutePath, sFileName, fCallback) {
|
|
19
|
+
webDavSession.OpenFolderAsync(sFolderAbsolutePath, null, function(oFolderAsyncResult) {
|
|
20
|
+
|
|
21
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
22
|
+
var oFolder = oFolderAsyncResult.Result;
|
|
23
|
+
|
|
24
|
+
oFolder.GetFileAsync(sFileName, function(oFileAsyncResult) {
|
|
25
|
+
|
|
26
|
+
/** @typedef {ITHit.WebDAV.Client.File} oFile */
|
|
27
|
+
var oFile = oFileAsyncResult.Result;
|
|
28
|
+
|
|
29
|
+
console.log('File `' + oFile.DisplayName + '` successful loaded from folder `' + oFolder.DisplayName + '`.');
|
|
30
|
+
|
|
31
|
+
fCallback(oFileAsyncResult);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
QUnitRunner.test('Get item using Folder', function (test) {
|
|
39
|
+
QUnit.stop();
|
|
40
|
+
Helper.Create([
|
|
41
|
+
'HierarchyItems/GetItemByFolder/my_folder/',
|
|
42
|
+
'HierarchyItems/GetItemByFolder/my_file.txt'
|
|
43
|
+
], function() {
|
|
44
|
+
QUnit.start();
|
|
45
|
+
|
|
46
|
+
QUnit.stop();
|
|
47
|
+
webDavSession.OpenFolderAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemByFolder/'), null, function(oAsyncResult) {
|
|
48
|
+
QUnit.start();
|
|
49
|
+
|
|
50
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
51
|
+
var oFolder = oAsyncResult.Result;
|
|
52
|
+
|
|
53
|
+
QUnit.stop();
|
|
54
|
+
oFolder.GetItemAsync('my_folder', function(oAsyncResult) {
|
|
55
|
+
QUnit.start();
|
|
56
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.Folder, true, 'Check result is instance of Folder');
|
|
57
|
+
|
|
58
|
+
QUnit.stop();
|
|
59
|
+
oFolder.GetItemAsync('my_file.txt', function(oAsyncResult) {
|
|
60
|
+
QUnit.start();
|
|
61
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.File, true, 'Check result is instance of File');
|
|
62
|
+
|
|
63
|
+
QUnit.stop();
|
|
64
|
+
oFolder.GetFolderAsync('my_folder', function(oAsyncResult) {
|
|
65
|
+
QUnit.start();
|
|
66
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.Folder, true, 'Check result is instance of Folder');
|
|
67
|
+
|
|
68
|
+
QUnit.stop();
|
|
69
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemByFolder.GetFile(webDavSession, Helper.GetAbsolutePath('HierarchyItems/GetItemByFolder/'), 'my_file.txt', function(oAsyncResult) {
|
|
70
|
+
QUnit.start();
|
|
71
|
+
|
|
72
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.File, true, 'Check result is instance of File');
|
|
73
|
+
|
|
74
|
+
QUnit.stop();
|
|
75
|
+
oFolder.GetFileAsync('my_folder', function(oAsyncResult) {
|
|
76
|
+
QUnit.start();
|
|
77
|
+
test.strictEqual(oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.WebDavException, true, 'Check error is WebDavException on get folder by GetFile method');
|
|
78
|
+
|
|
79
|
+
QUnit.stop();
|
|
80
|
+
oFolder.GetFolderAsync('my_file.txt', function(oAsyncResult) {
|
|
81
|
+
QUnit.start();
|
|
82
|
+
test.strictEqual(oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.WebDavException, true, 'Check error is WebDavException on get file by GetFolder method');
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('HierarchyItems.GetItemBySession');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemBySession
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemBySession', null, {}, /** @lends ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemBySession */{
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {ITHit.WebDAV.Client.WebDavSession} [webDavSession=new ITHit.WebDAV.Client.WebDavSession()]
|
|
14
|
+
* @param {string} [sFolderAbsolutePath='http://localhost:87654/Documents/']
|
|
15
|
+
* @param {function} [fCallback=function() {}]
|
|
16
|
+
*/
|
|
17
|
+
GetFolder: function(webDavSession, sFolderAbsolutePath, fCallback) {
|
|
18
|
+
webDavSession.OpenFolderAsync(sFolderAbsolutePath, null, function(oAsyncResult) {
|
|
19
|
+
|
|
20
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
21
|
+
var oFolder = oAsyncResult.Result;
|
|
22
|
+
|
|
23
|
+
console.log('Loaded folder `' + oFolder.DisplayName + '`.');
|
|
24
|
+
|
|
25
|
+
fCallback(oAsyncResult);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
QUnitRunner.test('Get item using WebDavSession', function (test) {
|
|
32
|
+
QUnit.stop();
|
|
33
|
+
Helper.Create([
|
|
34
|
+
'HierarchyItems/GetItemBySession/item1.txt'
|
|
35
|
+
], function() {
|
|
36
|
+
QUnit.start();
|
|
37
|
+
|
|
38
|
+
QUnit.stop();
|
|
39
|
+
webDavSession.OpenItemAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/'), null, function(oAsyncResult) {
|
|
40
|
+
QUnit.start();
|
|
41
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.Folder, true, 'Check result is instance of Folder');
|
|
42
|
+
|
|
43
|
+
QUnit.stop();
|
|
44
|
+
webDavSession.OpenItemAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/item1.txt'), null, function(oAsyncResult) {
|
|
45
|
+
QUnit.start();
|
|
46
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.File, true, 'Check result is instance of File');
|
|
47
|
+
|
|
48
|
+
QUnit.stop();
|
|
49
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.GetItemBySession.GetFolder(webDavSession, Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/'), function(oAsyncResult) {
|
|
50
|
+
QUnit.start();
|
|
51
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.Folder, true, 'Check result is instance of Folder');
|
|
52
|
+
|
|
53
|
+
QUnit.stop();
|
|
54
|
+
webDavSession.OpenFileAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/item1.txt'), null, function(oAsyncResult) {
|
|
55
|
+
QUnit.start();
|
|
56
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.File, true, 'Check result is instance of File');
|
|
57
|
+
|
|
58
|
+
QUnit.stop();
|
|
59
|
+
webDavSession.OpenFileAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/'), null, function(oAsyncResult) {
|
|
60
|
+
QUnit.start();
|
|
61
|
+
test.strictEqual(oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.WebDavException, true, 'Check error is WebDavException on get folder by OpenFile method');
|
|
62
|
+
|
|
63
|
+
QUnit.stop();
|
|
64
|
+
webDavSession.OpenFolderAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/item1.txt'), null, function(oAsyncResult) {
|
|
65
|
+
QUnit.start();
|
|
66
|
+
test.strictEqual(oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.WebDavException, true, 'Check error is WebDavException on get file by OpenFolder method');
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
QUnitRunner.test('Check NotFound exception by session calls', function (test) {
|
|
77
|
+
QUnit.stop();
|
|
78
|
+
webDavSession.OpenItemAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/not-found/'), null, function(oAsyncResult) {
|
|
79
|
+
QUnit.start();
|
|
80
|
+
|
|
81
|
+
test.strictEqual(oAsyncResult.IsSuccess, false, 'Check failure on open not found item request');
|
|
82
|
+
test.strictEqual(oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.NotFoundException, true, 'Check error is NotFoundException');
|
|
83
|
+
|
|
84
|
+
QUnit.stop();
|
|
85
|
+
webDavSession.OpenFolderAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/not-found/'), null, function(oAsyncResult) {
|
|
86
|
+
QUnit.start();
|
|
87
|
+
|
|
88
|
+
test.strictEqual(oAsyncResult.IsSuccess, false, 'Check failure on open not found folder request');
|
|
89
|
+
test.strictEqual(oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.NotFoundException, true, 'Check error is NotFoundException');
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
QUnit.stop();
|
|
93
|
+
webDavSession.OpenFileAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/not-found.txt'), null, function(oAsyncResult) {
|
|
94
|
+
QUnit.start();
|
|
95
|
+
|
|
96
|
+
test.strictEqual(oAsyncResult.IsSuccess, false, 'Check failure on open not found file request');
|
|
97
|
+
test.strictEqual(oAsyncResult.Error instanceof ITHit.WebDAV.Client.Exceptions.NotFoundException, true, 'Check error is NotFoundException');
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
QUnitRunner.test('Get item using WebDavSession, with parameters in URL', function (test) {
|
|
104
|
+
QUnit.stop();
|
|
105
|
+
Helper.Create([
|
|
106
|
+
'HierarchyItems/GetItemBySession/param1.txt'
|
|
107
|
+
], function() {
|
|
108
|
+
QUnit.start();
|
|
109
|
+
|
|
110
|
+
QUnit.stop();
|
|
111
|
+
webDavSession.OpenItemAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/param1.txt?param1=1¶m2=2'), null, function(oAsyncResult) {
|
|
112
|
+
QUnit.start();
|
|
113
|
+
|
|
114
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of open item with params request');
|
|
115
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.File, true, 'Check result is instance of File');
|
|
116
|
+
|
|
117
|
+
QUnit.stop();
|
|
118
|
+
webDavSession.OpenFolderAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/?param1=1¶m2=2'), null, function(oAsyncResult) {
|
|
119
|
+
QUnit.start();
|
|
120
|
+
|
|
121
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of open folder with params request');
|
|
122
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.Folder, true, 'Check result is instance of Folder');
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
QUnit.stop();
|
|
126
|
+
webDavSession.OpenFileAsync(Helper.GetAbsolutePath('HierarchyItems/GetItemBySession/param1.txt?param1=1¶m2=2'), null, function(oAsyncResult) {
|
|
127
|
+
QUnit.start();
|
|
128
|
+
|
|
129
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of open file with params request');
|
|
130
|
+
test.strictEqual(oAsyncResult.Result instanceof ITHit.WebDAV.Client.File, true, 'Check result is instance of File');
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('HierarchyItems.GetParent');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.HierarchyItems.GetParent
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.HierarchyItems.GetParent', null, {}, /** @lends ITHit.WebDAV.Client.Tests.HierarchyItems.GetParent */{
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {ITHit.WebDAV.Client.WebDavSession} [webDavSession=new ITHit.WebDAV.Client.WebDavSession()]
|
|
14
|
+
* @param {string} [sFolderAbsolutePath='http://localhost:87654/my_folder/']
|
|
15
|
+
* @param {function} [fCallback=function() {}]
|
|
16
|
+
*/
|
|
17
|
+
GetParent: function(webDavSession, sFolderAbsolutePath, fCallback) {
|
|
18
|
+
webDavSession.OpenFolderAsync(sFolderAbsolutePath, null, function(oFolderAsyncResult) {
|
|
19
|
+
|
|
20
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
21
|
+
var oFolder = oFolderAsyncResult.Result;
|
|
22
|
+
|
|
23
|
+
oFolder.GetParentAsync(null, function(oParentAsyncResult) {
|
|
24
|
+
|
|
25
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oParentFolder */
|
|
26
|
+
var oParentFolder = oParentAsyncResult.Result;
|
|
27
|
+
|
|
28
|
+
console.log('Parent folder: ' + oParentFolder.DisplayName);
|
|
29
|
+
|
|
30
|
+
oParentFolder.GetParentAsync(null, function(oParentParentAsyncResult) {
|
|
31
|
+
|
|
32
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oParentFolder */
|
|
33
|
+
var oParentParentFolder = oParentParentAsyncResult.Result;
|
|
34
|
+
|
|
35
|
+
if (oParentParentFolder === null) {
|
|
36
|
+
console.log('Folder is root!');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
fCallback(oParentAsyncResult, oParentParentAsyncResult);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
QUnitRunner.test('Get parent folder', function (test) {
|
|
48
|
+
QUnit.stop();
|
|
49
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.GetParent.GetParent(webDavSession, Helper.GetAbsolutePath(''), function(oParentAsyncResult, oParentParentAsyncResult) {
|
|
50
|
+
QUnit.start();
|
|
51
|
+
|
|
52
|
+
test.strictEqual(oParentAsyncResult.IsSuccess, true, 'Check success of first get parent folder request');
|
|
53
|
+
test.strictEqual(oParentAsyncResult.Result instanceof ITHit.WebDAV.Client.Folder, true, 'Check result is instance of Folder');
|
|
54
|
+
test.strictEqual(oParentParentAsyncResult.IsSuccess, true, 'Check success of second get parent folder request');
|
|
55
|
+
|
|
56
|
+
//test.strictEqual(oParentParentAsyncResult.Result, null, 'Check result is null - root folder'); // Root folder can be is folder
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('HierarchyItems.ItemExists');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.HierarchyItems.ItemExists
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.HierarchyItems.ItemExists', null, {}, /** @lends ITHit.WebDAV.Client.Tests.HierarchyItems.ItemExists */{
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {ITHit.WebDAV.Client.WebDavSession} [webDavSession=new ITHit.WebDAV.Client.WebDavSession()]
|
|
14
|
+
* @param {string} [sFolderAbsolutePath='http://localhost:87654/']
|
|
15
|
+
* @param {function} [fCallback=function() {}]
|
|
16
|
+
*/
|
|
17
|
+
ItemExists: function(webDavSession, sFolderAbsolutePath, fCallback) {
|
|
18
|
+
webDavSession.OpenFolderAsync(sFolderAbsolutePath, null, function(oAsyncResult) {
|
|
19
|
+
|
|
20
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
21
|
+
var oFolder = oAsyncResult.Result;
|
|
22
|
+
|
|
23
|
+
oFolder.ItemExistsAsync('my_folder', function(oAsyncResult) {
|
|
24
|
+
|
|
25
|
+
if (oAsyncResult.Result) {
|
|
26
|
+
console.log('Item exists');
|
|
27
|
+
} else {
|
|
28
|
+
console.log('Item not found');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
fCallback(oAsyncResult);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
QUnitRunner.test('Item exists', function (test) {
|
|
39
|
+
QUnit.stop();
|
|
40
|
+
Helper.Create([
|
|
41
|
+
'HierarchyItems/ItemExists/'
|
|
42
|
+
], function() {
|
|
43
|
+
QUnit.start();
|
|
44
|
+
|
|
45
|
+
QUnit.stop();
|
|
46
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.ItemExists.ItemExists(webDavSession, Helper.GetAbsolutePath('HierarchyItems/ItemExists/'), function(oAsyncResult) {
|
|
47
|
+
QUnit.start();
|
|
48
|
+
|
|
49
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of item exists request');
|
|
50
|
+
test.strictEqual(oAsyncResult.Result, false, 'Check result is false - not found folder');
|
|
51
|
+
|
|
52
|
+
// Create folder
|
|
53
|
+
QUnit.stop();
|
|
54
|
+
webDavSession.OpenFolderAsync(Helper.GetAbsolutePath('HierarchyItems/ItemExists/'), null, function(oAsyncResult) {
|
|
55
|
+
var oFolder = oAsyncResult.Result;
|
|
56
|
+
oFolder.CreateFolderAsync('my_folder', null, null, function(oAsyncResult) {
|
|
57
|
+
QUnit.start();
|
|
58
|
+
|
|
59
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of create folder request');
|
|
60
|
+
|
|
61
|
+
QUnit.stop();
|
|
62
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.ItemExists.ItemExists(webDavSession, Helper.GetAbsolutePath('HierarchyItems/ItemExists/'), function(oAsyncResult) {
|
|
63
|
+
QUnit.start();
|
|
64
|
+
|
|
65
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of item exists request');
|
|
66
|
+
test.strictEqual(oAsyncResult.Result, true, 'Check result is true - folder is exists');
|
|
67
|
+
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {ITHit.WebDAV.Client.WebDavSession} webDavSession
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
QUnit.module('HierarchyItems.MicrosoftOfficeDiscovery');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @class ITHit.WebDAV.Client.Tests.HierarchyItems.MicrosoftOfficeDiscovery
|
|
9
|
+
*/
|
|
10
|
+
ITHit.DefineClass('ITHit.WebDAV.Client.Tests.HierarchyItems.MicrosoftOfficeDiscovery', null, {}, /** @lends ITHit.WebDAV.Client.Tests.HierarchyItems.MicrosoftOfficeDiscovery */{
|
|
11
|
+
|
|
12
|
+
OpenParent: function (test, sPath) {
|
|
13
|
+
QUnit.stop();
|
|
14
|
+
webDavSession.OpenFolderAsync(sPath, null, function(oAsyncResult) {
|
|
15
|
+
QUnit.start();
|
|
16
|
+
|
|
17
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of open folder request (PROPFIND) to `' + sPath + '`');
|
|
18
|
+
|
|
19
|
+
/** @typedef {ITHit.WebDAV.Client.Folder} oFolder */
|
|
20
|
+
var oFolder = oAsyncResult.Result;
|
|
21
|
+
|
|
22
|
+
if (!oFolder) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
QUnit.stop();
|
|
27
|
+
oFolder.GetSupportedFeaturesAsync(function(oAsyncResult) {
|
|
28
|
+
QUnit.start();
|
|
29
|
+
|
|
30
|
+
test.strictEqual(oAsyncResult.IsSuccess, true, 'Check success of supported features request (OPTIONS) to `' + sPath + '`');
|
|
31
|
+
|
|
32
|
+
var sParentPath = ITHit.WebDAV.Client.HierarchyItem.GetFolderParentUri(sPath);
|
|
33
|
+
if (sParentPath !== null) {
|
|
34
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.MicrosoftOfficeDiscovery.OpenParent(test, sParentPath);
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
QUnitRunner.test('Microsoft Office discovery', function (test) {
|
|
43
|
+
QUnit.stop();
|
|
44
|
+
Helper.Create([
|
|
45
|
+
'Ms/Office/'
|
|
46
|
+
], function() {
|
|
47
|
+
QUnit.start();
|
|
48
|
+
|
|
49
|
+
ITHit.WebDAV.Client.Tests.HierarchyItems.MicrosoftOfficeDiscovery.OpenParent(test, Helper.GetAbsolutePath('Ms/Office/'));
|
|
50
|
+
});
|
|
51
|
+
});
|