C# Class CmisSync.Lib.Cmis.ConvenienceExtenders.CmisConvenienceExtenders

Cmis convenience extenders.
Datei anzeigen Open project: OpenDataSpace/CmisSync

Public Methods

Method Description
AppendContent ( this doc, string content, bool lastChunk = true ) : IDocument
AreAllChildrenIgnored ( this obj ) : bool

Indicates if all children are ignored.

AreChangeEventsSupported ( this session ) : bool

Detect whether the repository has the ChangeLog capability.

ArePrivateWorkingCopySupported ( this session ) : bool

Detect whether the repository supports checkout/cancelCheckout/checkin

AsSessionParameter ( this repoInfo, string appName = null ) : string>.Dictionary
ContentStreamHash ( this doc, string type = "SHA-1" ) : byte[]

Returns the hash of the content stream on the server.

CreateDocument ( this folder, string name, string content, bool checkedOut = false ) : IDocument

Creates a document.

CreateFolder ( this folder, string name ) : IFolder

Creates a sub folder with the given name.

CreateSession ( this factory, RepoInfo repoInfo, IObjectFactory objectFactory = null, IAuthenticationProvider authenticationProvider = null, ICache cache = null, string appName = null ) : ISession
CreateSession ( this factory, RepoInfo repoInfo, string appName = null ) : ISession
IgnoreAllChildren ( this folder, string deviceId = "*" ) : void

Sets a flag to ignores all children of this folder.

IgnoredDevices ( this obj ) : IList

Lists all Ignored devices.

IsContentStreamHashSupported ( this session ) : bool

Returns the hash of the content stream on the server.

IsGetDescendantsSupported ( this session ) : bool

Determines if getDescendants calls are supported the specified session.

IsMultiFilingSupported ( this session ) : bool

Determines if multi filing is supported with the specified session.

IsServerAbleToUpdateModificationDate ( this session ) : bool

Determines if is server able to update modification date.

IsUnFilingSupported ( this session ) : bool

Determines if unfiling is supported with the specified session.

RemoveAllSyncIgnores ( this obj ) : void

Removes all sync ignores flags from the given cmis object

RemoveSyncIgnore ( this obj ) : void

Removes the sync ignore flags of the given device Ids from the given cmis object.

SecondaryObjectTypeIds ( this obj ) : IList

Secondary object type identifiers.

SetContent ( this doc, string content, bool overwrite = true, bool refresh = true ) : IObjectId

Sets the content stream of the document.

ToLogString ( this obj ) : string
UpdateLastWriteTimeUtc ( this obj, System.DateTime modificationDate ) : IObjectId

Updates the last write time in UTC via UpdateProperties

Private Methods

Method Description
GetHexVal ( char hex ) : int
StringToByteArray ( string hex ) : byte[]

Hex string to byte array.

Method Details

AppendContent() public static method

public static AppendContent ( this doc, string content, bool lastChunk = true ) : IDocument
doc this
content string
lastChunk bool
return IDocument

AreAllChildrenIgnored() public static method

Indicates if all children are ignored.
public static AreAllChildrenIgnored ( this obj ) : bool
obj this Remote cmis object.
return bool

AreChangeEventsSupported() public static method

Detect whether the repository has the ChangeLog capability.
public static AreChangeEventsSupported ( this session ) : bool
session this The Cmis Session
return bool

ArePrivateWorkingCopySupported() public static method

Detect whether the repository supports checkout/cancelCheckout/checkin
public static ArePrivateWorkingCopySupported ( this session ) : bool
session this The Cmis Session
return bool

AsSessionParameter() public static method

public static AsSessionParameter ( this repoInfo, string appName = null ) : string>.Dictionary
repoInfo this
appName string
return string>.Dictionary

ContentStreamHash() public static method

Returns the hash of the content stream on the server.
public static ContentStreamHash ( this doc, string type = "SHA-1" ) : byte[]
doc this Document with the content stream.
type string Type of the requested hash.
return byte[]

CreateDocument() public static method

Creates a document.
public static CreateDocument ( this folder, string name, string content, bool checkedOut = false ) : IDocument
folder this Parent folder.
name string Name of the document.
content string If content is not null, a content stream containing the given content will be added.
checkedOut bool If true, the new document will be created in checked out state.
return IDocument

CreateFolder() public static method

Creates a sub folder with the given name.
public static CreateFolder ( this folder, string name ) : IFolder
folder this parent folder.
name string Name of the new sub folder.
return IFolder

CreateSession() public static method

public static CreateSession ( this factory, RepoInfo repoInfo, IObjectFactory objectFactory = null, IAuthenticationProvider authenticationProvider = null, ICache cache = null, string appName = null ) : ISession
factory this
repoInfo CmisSync.Lib.Config.RepoInfo
objectFactory IObjectFactory
authenticationProvider IAuthenticationProvider
cache ICache
appName string
return ISession

CreateSession() public static method

public static CreateSession ( this factory, RepoInfo repoInfo, string appName = null ) : ISession
factory this
repoInfo CmisSync.Lib.Config.RepoInfo
appName string
return ISession

IgnoreAllChildren() public static method

Sets a flag to ignores all children of this folder.
public static IgnoreAllChildren ( this folder, string deviceId = "*" ) : void
folder this Folder which children should be ignored.
deviceId string Device Ids which should be ignored.
return void

IgnoredDevices() public static method

Lists all Ignored devices.
public static IgnoredDevices ( this obj ) : IList
obj this Cmis object.
return IList

IsContentStreamHashSupported() public static method

Returns the hash of the content stream on the server.
public static IsContentStreamHashSupported ( this session ) : bool
session this
return bool

IsGetDescendantsSupported() public static method

Determines if getDescendants calls are supported the specified session.
public static IsGetDescendantsSupported ( this session ) : bool
session this Cmis session.
return bool

IsMultiFilingSupported() public static method

Determines if multi filing is supported with the specified session.
public static IsMultiFilingSupported ( this session ) : bool
session this Cmis session.
return bool

IsServerAbleToUpdateModificationDate() public static method

Determines if is server able to update modification date.
public static IsServerAbleToUpdateModificationDate ( this session ) : bool
session this Cmis session.
return bool

IsUnFilingSupported() public static method

Determines if unfiling is supported with the specified session.
public static IsUnFilingSupported ( this session ) : bool
session this Cmis session.
return bool

RemoveAllSyncIgnores() public static method

Removes all sync ignores flags from the given cmis object
public static RemoveAllSyncIgnores ( this obj ) : void
obj this Remote CMIS Object.
return void

RemoveSyncIgnore() public static method

Removes the sync ignore flags of the given device Ids from the given cmis object.
public static RemoveSyncIgnore ( this obj ) : void
obj this Remote CMIS Object.
return void

SecondaryObjectTypeIds() public static method

Secondary object type identifiers.
public static SecondaryObjectTypeIds ( this obj ) : IList
obj this Cmis object.
return IList

SetContent() public static method

Sets the content stream of the document.
public static SetContent ( this doc, string content, bool overwrite = true, bool refresh = true ) : IObjectId
doc this Remote document.
content string New content as string.
overwrite bool If set to true overwrites existing content.
refresh bool If set to true refreshs the original remote doc instance.
return IObjectId

ToLogString() public static method

public static ToLogString ( this obj ) : string
obj this
return string

UpdateLastWriteTimeUtc() public static method

Updates the last write time in UTC via UpdateProperties
public static UpdateLastWriteTimeUtc ( this obj, System.DateTime modificationDate ) : IObjectId
obj this Fileable cmis object.
modificationDate System.DateTime Modification date.
return IObjectId