Class: HierarchyItem

HierarchyItem Class

Namespace

ITHit.WebDAV.Client
Represents one WebDAV item (file, folder or lock-null).

Members

ActiveLocks :Array.<ITHit.WebDAV.Client.LockInfo>

ActiveLocks
List of locks applied to this item.
Examples

AvailableBytes :number

AvailableBytes
Number of bytes available for this user on server. -1 if server does not support Quota.

CreationDate :Date

CreationDate
The date item was created.

DisplayName :string

DisplayName
User friendly item name.

Href :string

Href
This item path on the server.

LastModified :Date

LastModified
Most recent modification date.

Properties :ITHit.WebDAV.Client.PropertyList

Properties
List of item properties.

ResourceType :string

ResourceType
Type of the item (File or Folder).
See:
Current WebDAV session.

SupportedLocks :Array.<string>

SupportedLocks
Retrieves information about supported locks. Item can support exclusive, shared locks or do not support any locks. If you set exclusive lock other users will not be able to set any locks. If you set shared lock other users will be able to set shared lock on the item.
See:
Examples

UsedBytes :number

UsedBytes
Number of bytes used by this user on server. -1 if server does not support Quota.

VersionControlled

VersionControlled
Returns true if file is under version control. Otherwise false. To detect if version control could be enabled for this item call GetSupportedFeaturesAsync and check for VersionControl token. To enable version control call PutUnderVersionControlAsync.

Methods

CopyToAsync(oDestinationFolder, sDestinationName, bDeep, bOverwrite, oLockTokens, fCallback)

CopyToAsync
Copies this item to destination folder.
Name Type Description
oDestinationFolder ITHit.WebDAV.Client.Folder Folder to move to.
sDestinationName string Name to assign to copied item.
bDeep boolean Indicates whether children of this item should be copied.
bOverwrite boolean Whether existing destination item shall be overwritten.
oLockTokens Array.<ITHit.WebDAV.Client.LockUriTokenPair> optional Lock tokens for destination folder.
fCallback ITHit.WebDAV.Client.HierarchyItem~CopyToAsyncCallback Function to call when operation is completed.
Examples

DeleteAsync(oLockTokens, fCallback) → {ITHit.WebDAV.Client.Request}

DeleteAsync
Deletes this item.
Name Type Description
oLockTokens ITHit.WebDAV.Client.LockUriTokenPair | null Lock tokens for this item or any locked child item.
fCallback ITHit.WebDAV.Client.HierarchyItem~DeleteAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

GetAllPropertiesAsync(fCallback) → {ITHit.WebDAV.Client.Request}

GetAllPropertiesAsync
Retrieves all custom properties exposed by the item.
Name Type Description
fCallback ITHit.WebDAV.Client.HierarchyItem~GetAllPropertiesAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

GetParentAsync(aProperties, fCallback) → {ITHit.WebDAV.Client.Request}

GetParentAsync
Retrieves parent hierarchy item of this item.
Name Type Description
aProperties Array.<ITHit.WebDAV.Client.PropertyName> Additional properties requested from server. Default is empty array.
fCallback ITHit.WebDAV.Client.HierarchyItem~GetParentAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

GetPropertyNamesAsync(fCallback) → {ITHit.WebDAV.Client.Request}

GetPropertyNamesAsync
Returns names of all custom properties exposed by this item.
Name Type Description
fCallback ITHit.WebDAV.Client.HierarchyItem~GetPropertyNamesAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

GetPropertyValuesAsync(aNames, fCallback) → {ITHit.WebDAV.Client.Request}

GetPropertyValuesAsync
Retrieves values of specific properties.
Name Type Description
aNames Array.<ITHit.WebDAV.Client.PropertyName>
fCallback ITHit.WebDAV.Client.HierarchyItem~GetPropertyValuesAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

GetSourceAsync(fCallback) → {ITHit.WebDAV.Client.Request}

GetSourceAsync
Retrieves media type independent links.
Name Type Description
fCallback ITHit.WebDAV.Client.HierarchyItem~GetSourceAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.

GetSupportedFeaturesAsync(fCallback) → {ITHit.WebDAV.Client.Request}

GetSupportedFeaturesAsync
Gets features supported by this item, such as WebDAV class support.
Name Type Description
fCallback ITHit.WebDAV.Client.HierarchyItem~GetSupportedFeaturesAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

LockAsync(sLockScope, bDeep, sOwner, iTimeout, fCallback) → {ITHit.WebDAV.Client.Request}

LockAsync
Locks the item. If the lock was successfully applied, the server will return a lock token. You will pass this lock token back to the server when updating and unlocking the item. The actual lock time applied by the server may be different from the one requested by the client.
Name Type Description
sLockScope string Scope of the lock. See LockScope Enumeration ITHit.WebDAV.Client.LockScope
bDeep boolean Whether to lock entire subtree.
sOwner string Owner of the lock.
iTimeout number Timeout after which lock expires. Pass -1 to request an infinite timeout.
fCallback ITHit.WebDAV.Client.HierarchyItem~LockAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

MoveToAsync(oDestinationFolder, sDestinationName, bOverwrite, oLockTokens, fCallback) → {ITHit.WebDAV.Client.Request}

MoveToAsync
Moves this item to another location.
Name Type Description
oDestinationFolder ITHit.WebDAV.Client.Folder Folder to move to.
sDestinationName string Name to assign to moved item.
bOverwrite boolean Whether existing destination item shall be overwritten.
oLockTokens string | Array.<ITHit.WebDAV.Client.LockUriTokenPair> Lock tokens for item to be moved, for destination folder or file to be overwritten that are locked.
fCallback ITHit.WebDAV.Client.HierarchyItem~MoveToAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

RefreshAsync(fCallback) → {ITHit.WebDAV.Client.Request}

RefreshAsync
Refreshes item loading data from server.
Name Type Description
fCallback ITHit.WebDAV.Client.HierarchyItem~RefreshAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

RefreshLockAsync(sLockToken, iTimeout, fCallback) → {ITHit.WebDAV.Client.Request}

RefreshLockAsync
Prolongs the lock.
Name Type Description
sLockToken string Identifies lock to be prolonged.
iTimeout number New timeout to set.
fCallback ITHit.WebDAV.Client.HierarchyItem~RefreshLockAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

UnlockAsync(sLockToken, fCallback) → {ITHit.WebDAV.Client.Request}

UnlockAsync
Removes the lock.
Name Type Description
sLockToken string Identifies lock to be prolonged.
fCallback ITHit.WebDAV.Client.HierarchyItem~UnlockAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

UpdatePropertiesAsync(oPropertiesToAddOrUpdate, oPropertiesToDelete, sLockToken, fCallback) → {ITHit.WebDAV.Client.WebDavRequest|null}

UpdatePropertiesAsync
Updates values of properties exposed by this item.
Name Type Description
oPropertiesToAddOrUpdate Array.<ITHit.WebDAV.Client.Property> Properties to be updated.
oPropertiesToDelete Array.<ITHit.WebDAV.Client.PropertyName> Names of properties to be removed from this item.
sLockToken string optional Lock token.
fCallback ITHit.WebDAV.Client.HierarchyItem~UpdatePropertiesAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.WebDavRequest | null WebDAV request
Examples

Type Definitions

CopyToAsyncCallback(oResult)

CopyToAsyncCallback
Callback function to be called when copy operation is complete on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object

DeleteAsyncCallback(oResult)

DeleteAsyncCallback
Callback function to be called when delete operation is complete on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object

GetAllPropertiesAsyncCallback(oResult)

GetAllPropertiesAsyncCallback
Callback function to be called when all properties loaded from server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result Array.<ITHit.WebDAV.Client.Property> List of Property objects.

GetParentAsyncCallback(oResult)

GetParentAsyncCallback
Callback function to be called when parent folder loaded from server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result ITHit.WebDAV.Client.Folder Parent hierarchy item of this item. Null for root item.

GetPropertyNamesAsyncCallback(oResult)

GetPropertyNamesAsyncCallback
Callback function to be called when property names loaded from server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result Array.<ITHit.WebDAV.Client.PropertyName> List of PropertyName objects.

GetPropertyValuesAsyncCallback(oResult)

GetPropertyValuesAsyncCallback
Callback function to be called when item properties values loaded from server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result Array.<ITHit.WebDAV.Client.Property> List of Property objects.

GetSourceAsyncCallback(oResult)

GetSourceAsyncCallback
Callback function to be called when source loaded from server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result Array.<ITHit.WebDAV.Client.Source> | null Media type independent links or null.

GetSupportedFeaturesAsyncCallback(oResult)

GetSupportedFeaturesAsyncCallback
Callback function to be called when options info loaded from server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result ITHit.WebDAV.Client.OptionsInfo OptionsInfo object containing information about features supported by server.

LockAsyncCallback(oResult)

LockAsyncCallback
Callback function to be called when item is locked on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result ITHit.WebDAV.Client.LockInfo Instance of LockInfo with information about created lock.

MoveToAsyncCallback(oResult)

MoveToAsyncCallback
Callback function to be called when item is moved on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object

OpenItemAsyncCallback(oResult)

OpenItemAsyncCallback
Callback function to be called when folder loaded from server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result ITHit.WebDAV.Client.HierarchyItem Loaded item.

RefreshAsyncCallback(oResult)

RefreshAsyncCallback
Callback function to be called when item data loaded from server and item is refreshed.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object

RefreshLockAsyncCallback(oResult)

RefreshLockAsyncCallback
Callback function to be called when item lock is refreshed on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object
Name Type Description
Result ITHit.WebDAV.Client.LockInfo Instance of LockInfo with information about refreshed lock.

UnlockAsyncCallback(oResult)

UnlockAsyncCallback
Callback function to be called when item unlocked on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object

UpdatePropertiesAsyncCallback(oResult)

UpdatePropertiesAsyncCallback
Callback function to be called when item properties is updated on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object