C# Class CmisSync.Lib.Consumer.SituationSolver.AbstractEnhancedSolver

Abstract enhanced solver.
Inheritance: ISolver
Datei anzeigen Open project: OpenDataSpace/CmisSync Class Usage Examples

Protected Properties

Property Type Description
OperationsLogger log4net.ILog

Public Methods

Method Description
AbstractEnhancedSolver ( ISession session, IMetaDataStorage storage, IFileTransmissionStorage transmissionStorage = null ) : System

Initializes a new instance of the CmisSync.Lib.Consumer.SituationSolver.AbstractEnhancedSolver class.

Solve ( IFileSystemInfo localFileSystemInfo, IObjectId remoteId, ContentChangeType localContent, ContentChangeType remoteContent ) : void

Solve the specified situation by using localFile and remote object.

Protected Methods

Method Description
DownloadCacheFile ( IFileInfo target, IDocument remoteDocument, Transmission transmission, IFileSystemInfoFactory fsFactory ) : byte[]
DownloadChanges ( IFileInfo target, IDocument remoteDocument, IMappedObject obj, IFileSystemInfoFactory fsFactory, ITransmissionManager transmissionManager, log4net.ILog logger ) : byte[]
EnsureThatLocalFileNameContainsLegalCharacters ( IFileSystemInfo localFile, DotCMIS.Exceptions.CmisConstraintException e ) : void

Ensures the that local file name contains legal characters. If the given file contains UTF-8 only character and the given exception has been returned from the server on creating a file/folder, an interaction exception is thrown with a hint about the problem. Otherwise nothing happens.

GetParent ( IFileSystemInfo fileInfo ) : IDirectoryInfo
IsParentReadOnly ( IFileSystemInfo localFileSystemInfo ) : bool
UploadFile ( IFileInfo localFile, IDocument doc, Transmission transmission ) : byte[]

Uploads the file content to the remote document.

WriteOrUseUuidIfSupported ( IFileSystemInfo info ) : System.Guid

Private Methods

Method Description
LoadCacheFile ( IFileInfo target, IDocument remoteDocument, IFileSystemInfoFactory fsFactory ) : bool
SaveCacheFile ( IFileInfo target, IDocument remoteDocument, byte hash, long length, Transmission transmissionEvent ) : void

Method Details

AbstractEnhancedSolver() public method

Initializes a new instance of the CmisSync.Lib.Consumer.SituationSolver.AbstractEnhancedSolver class.
public AbstractEnhancedSolver ( ISession session, IMetaDataStorage storage, IFileTransmissionStorage transmissionStorage = null ) : System
session ISession Cmis Session.
storage IMetaDataStorage Meta Data Storage.
transmissionStorage IFileTransmissionStorage File Transmission Storage.
return System

DownloadCacheFile() protected method

protected DownloadCacheFile ( IFileInfo target, IDocument remoteDocument, Transmission transmission, IFileSystemInfoFactory fsFactory ) : byte[]
target IFileInfo
remoteDocument IDocument
transmission CmisSync.Lib.FileTransmission.Transmission
fsFactory IFileSystemInfoFactory
return byte[]

DownloadChanges() protected method

protected DownloadChanges ( IFileInfo target, IDocument remoteDocument, IMappedObject obj, IFileSystemInfoFactory fsFactory, ITransmissionManager transmissionManager, log4net.ILog logger ) : byte[]
target IFileInfo
remoteDocument IDocument
obj IMappedObject
fsFactory IFileSystemInfoFactory
transmissionManager ITransmissionManager
logger log4net.ILog
return byte[]

EnsureThatLocalFileNameContainsLegalCharacters() protected method

Ensures the that local file name contains legal characters. If the given file contains UTF-8 only character and the given exception has been returned from the server on creating a file/folder, an interaction exception is thrown with a hint about the problem. Otherwise nothing happens.
protected EnsureThatLocalFileNameContainsLegalCharacters ( IFileSystemInfo localFile, DotCMIS.Exceptions.CmisConstraintException e ) : void
localFile IFileSystemInfo Local file which produces a CmisConstraintException on the server.
e DotCMIS.Exceptions.CmisConstraintException The returned CmisConstraintException returned by the server.
return void

GetParent() protected method

protected GetParent ( IFileSystemInfo fileInfo ) : IDirectoryInfo
fileInfo IFileSystemInfo
return IDirectoryInfo

IsParentReadOnly() protected method

protected IsParentReadOnly ( IFileSystemInfo localFileSystemInfo ) : bool
localFileSystemInfo IFileSystemInfo
return bool

Solve() public abstract method

Solve the specified situation by using localFile and remote object.
public abstract Solve ( IFileSystemInfo localFileSystemInfo, IObjectId remoteId, ContentChangeType localContent, ContentChangeType remoteContent ) : void
localFileSystemInfo IFileSystemInfo Local filesystem info instance.
remoteId IObjectId Remote identifier or object.
localContent ContentChangeType Signalizes how the local content has been modified.
remoteContent ContentChangeType Signalizes how the remote content has been modified.
return void

UploadFile() protected method

Uploads the file content to the remote document.
protected UploadFile ( IFileInfo localFile, IDocument doc, Transmission transmission ) : byte[]
localFile IFileInfo Local file.
doc IDocument Remote document.
transmission CmisSync.Lib.FileTransmission.Transmission
return byte[]

WriteOrUseUuidIfSupported() protected method

protected WriteOrUseUuidIfSupported ( IFileSystemInfo info ) : System.Guid
info IFileSystemInfo
return System.Guid

Property Details

OperationsLogger protected_oe static_oe property

The file operations logger.
protected static ILog,log4net OperationsLogger
return log4net.ILog