ContentLibraryManager

Superclass:
NSObject
Declared In:

Introduction

The ContentLibraryManager singleton object represents an interface for the storage and retrieval of all content files.

Availability
v11


Methods

-deleteContentInfoByFileId:andVersion:
-deRegisterDelegate:
-getAllCategories
-getAllContentInfo
-getAllContentInfoVersions:
-getContentFileInfoStateByFileId:andVersion:
-getContentInfoByFileId:andVersion:
-getContentsAsynchronouslyByPath:recursive:
-getContentsByPath:recursive:
-getFileSyncRootItem
+instance
-registerDelegate:
-removeAllContentInfo
-requestToDownloadAllFiles
-requestToDownloadFileByFileId:andVersion:
-saveContentInfo:

deleteContentInfoByFileId:andVersion:


- (BOOL)deleteContentInfoByFileId:(NSNumber *)fileId 
        andVersion:(NSNumber *)versionNo; 
Parameters
fileId

The identifier of the file.

versionNo

The version number of the file.

Return Value

NO in a case if operation failed.

Discussion

Removes particular File Version form File system. Only content removed - item itself stays alive.

Availability
v11

deRegisterDelegate:


- (void)deRegisterDelegate:(id<ContentLibraryManagerDelegate>)delegate; 
Parameters
delegate

An object that adheres to the ContentLibraryManagerDelegate protocol.

Discussion

Deregisters the delegate from this class.

Availability
v11

getAllCategories


- (NSArray *)getAllCategories; 
Return Value

An array of all categories as NSString* instances.

Discussion

Gets the list of all the categories for all the content files.

Availability
v11

getAllContentInfo


- (NSArray *)getAllContentInfo; 
Return Value

An array of all ContentFileInfoType instances in storage. For files that have more than one version, the latest version is returned.

Discussion

Gets ContentFileInfoType instances of all available content info files.

Availability
v11

getAllContentInfoVersions:


- (NSArray *)getAllContentInfoVersions:(NSNumber *)fileId; 
Parameters
fileId

The identifier of the file.

Return Value

An array of ContentFileInfoType instances for all the versions of the file.

Discussion

Gets list of ContentFileInfoType instances. Each of them represent corresponding version.

Availability
v11

getContentFileInfoStateByFileId:andVersion:


- (ContentFileInfoState)getContentFileInfoStateByFileId:(NSNumber *)fileId 
        andVersion:(NSNumber *)versionNo; 
Parameters
fileId

The identifier of the file.

versionNo

The version number of the file.

Return Value

The state of a specific file version.

Discussion

Gets a file info state of a file version.

See

Availability
v11

getContentInfoByFileId:andVersion:


- (ContentFileInfoType *)getContentInfoByFileId:(NSNumber *)fileId 
        andVersion:(NSNumber *)versionNo; 
Parameters
fileId

The identifier of the file.

versionNo

The version number of the file.

Return Value

The ContentFileInformation instance for the file and version if it exists.

Discussion

Gets the content info for a specific file and version.

Availability
v11

getContentsAsynchronouslyByPath:recursive:


- (NSInteger)getContentsAsynchronouslyByPath:(NSString *)path 
        recursive:(BOOL) isRecursive; 
Parameters
path

The path of the folder from which to get the contents.

isRecursive

A Boolean value denoting whether or not to also step into subfolders and return their contents as subarrays.

Return Value

The number of files being returned.

Discussion

Gets contents of a certain path.

Availability
v11

getContentsByPath:recursive:


- (NSArray *)getContentsByPath:(NSString *)path recursive:(BOOL) isRecursive; 
Parameters
path

The path of the folder from which to get the contents.

isRecursive

A Boolean value denoting whether or not to also step into subfolders and return their contents as subarrays.

Return Value

The array of ContentFileInfoType instances that represent content of a folder py path.

Discussion

Gets contents of a certain path.

Availability
v11

getFileSyncRootItem


- (NSArray *)getFileSyncRootItem; 
Return Value

Array of File Sync items

Availability
v11

instance


+ (ContentLibraryManager *)instance; 
Return Value

Singleton of ContentLibraryManager

Discussion

Gets singleton instance of the content libray manager.

Availability
v11

registerDelegate:


- (void)registerDelegate:(id<ContentLibraryManagerDelegate>)delegate; 
Parameters
delegate

An object that adheres to the ContentLibraryManagerDelegate protocol.

Discussion

Registers the delegate for this class.

Availability
v11

removeAllContentInfo


- (BOOL)removeAllContentInfo; 
Return Value

NO in a case if operation failed.

Discussion

Removes all content info files.

Availability
v11

requestToDownloadAllFiles


- (BOOL)requestToDownloadAllFiles; 
Return Value

NO in a case if operation failed.

Discussion

Requests to download all latest versions of non-mandatory files.

Availability
v11

requestToDownloadFileByFileId:andVersion:


- (BOOL)requestToDownloadFileByFileId:(NSNumber *)fileId 
        andVersion:(NSNumber *)versionNo; 
Parameters
fileId

The identifier of the file.

versionNo

The version number of the file.

Return Value

NO in a case if operation failed.

Discussion

Requests to download a specific file version.

Availability
v11

saveContentInfo:


- (void)saveContentInfo:(ContentFileInfoType *)contentFileInfo; 
Parameters
contentFileInfo

The ContentFileInfoType instance to be saved.

Discussion

Saves content file info to data storage.

Availability
v11

Properties

contentInfoCount
contentLibraryAbsolutePath
dataPath
downloadedContentInfoCount
ineffectiveDownloadedContentInfoCount
isAsynchronousOperationFinished
versionedFilesCount

contentInfoCount


@property (readonly,
    nonatomic) NSInteger contentInfoCount; 
Discussion

The amount of files in the content library.

Availability
v11

contentLibraryAbsolutePath


@property (readonly,
    nonatomic) NSString *contentLibraryAbsolutePath; 
Discussion

The absolute path of the content library.

Availability
v11

dataPath


@property (readonly,
    nonatomic) NSString *dataPath; 
Discussion

The absolute path of the File Sync Items.


downloadedContentInfoCount


@property (readonly,
    nonatomic) NSInteger downloadedContentInfoCount; 
Discussion

The amount of downloaded files in the content library.

Availability
v11

ineffectiveDownloadedContentInfoCount


@property (readonly,
    nonatomic) NSInteger ineffectiveDownloadedContentInfoCount; 
Discussion

The amount of ineffective downloaded files in the content library.

Availability
v11

isAsynchronousOperationFinished


@property (assign,
    atomic) BOOL isAsynchronousOperationFinished; 
Discussion

A Boolean value denoting whether or not Asynchronous operation of getting contents from given path is completed.


versionedFilesCount


@property (nonatomic) NSInteger versionedFilesCount; 
Discussion

Number of versioned files which are not the latest version. it will help in calculating total number of files