TICDSListOfPreviouslySynchronizedDocumentsOperation Class Reference
Inherits from | TICDSOperation : NSOperation |
Declared in | TICDSListOfPreviouslySynchronizedDocumentsOperation.h |
Overview
The TICDSListOfPreviouslySynchronizedDocumentsOperation
class describes a generic operation used by the TICoreDataSync
framework to fetch a list of documents that have previously been synchronized for this application.
The operation carries out the following tasks:
- Get a list of document identifiers for available documents.
- Fetch the
documentInfo
dictionary for each document. - Get the most recent synchronization date for each successfully-fetched document dictionary (the most recently modified file in
RecentSyncs
).
Operations are typically created automatically by the relevant sync manager.
%warning%
Warning: You must use one of the subclasses ofTICDSListOfPreviouslySynchronizedDocumentsOperation
.
Tasks
Methods Overridden by Subclasses
-
– buildArrayOfDocumentIdentifiers
Build an array of
NSString
document identifiers for all available, previously-synchronized documents. -
– fetchInfoDictionaryForDocumentWithSyncID:
Fetch the
documentInfo
dictionary for the document with the specified ID. -
– fetchLastSynchronizationDateForDocumentWithSyncID:
Fetch the last synchronization date for a document with the given synchronization ID.
Callbacks
-
– builtArrayOfDocumentIdentifiers:
Pass back the assembled
NSArray
ofNSString
document identifiers. -
– fetchedInfoDictionary:forDocumentWithSyncID:
Pass back the
documentInfo
dictionary for a given document sync identifier. -
– fetchedLastSynchronizationDate:forDocumentWithSyncID:
Pass back the last synchronization date for a given document sync identifier.
Properties
-
availableDocuments
An array of documents, built as information comes in.
property -
availableDocumentSyncIDs
An array used internally by the operation to keep track of the available document sync identifiers.
property
Completion
-
numberOfInfoDictionariesToFetch
The total number of info dictionaries that need to be fetched.
property -
numberOfInfoDictionariesFetched
The number of info dictionaries that have already been fetched.
property -
numberOfInfoDictionariesThatFailedToFetch
The number of info dictionaries that failed to fetch because of an error.
property -
numberOfLastSynchronizationDatesToFetch
The total number of last synchronization dates that need to be fetched.
property -
numberOfLastSynchronizationDatesFetched
The number of last synchronization dates that have already been fetched.
property -
numberOfLastSynchronizationDatesThatFailedToFetch
The number of last synchronization dates failed to fetch because of an error.
property
Properties
availableDocumentSyncIDs
An array used internally by the operation to keep track of the available document sync identifiers.
@property (nonatomic, strong) NSArray *availableDocumentSyncIDs
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
availableDocuments
An array of documents, built as information comes in.
@property (strong) NSMutableArray *availableDocuments
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
numberOfInfoDictionariesFetched
The number of info dictionaries that have already been fetched.
@property (nonatomic, assign) NSUInteger numberOfInfoDictionariesFetched
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
numberOfInfoDictionariesThatFailedToFetch
The number of info dictionaries that failed to fetch because of an error.
@property (nonatomic, assign) NSUInteger numberOfInfoDictionariesThatFailedToFetch
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
numberOfInfoDictionariesToFetch
The total number of info dictionaries that need to be fetched.
@property (nonatomic, assign) NSUInteger numberOfInfoDictionariesToFetch
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
numberOfLastSynchronizationDatesFetched
The number of last synchronization dates that have already been fetched.
@property (nonatomic, assign) NSUInteger numberOfLastSynchronizationDatesFetched
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
Instance Methods
buildArrayOfDocumentIdentifiers
Build an array of NSString
document identifiers for all available, previously-synchronized documents.
- (void)buildArrayOfDocumentIdentifiers
Discussion
Call builtArrayOfDocumentIdentifiers:
when the array is built.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
builtArrayOfDocumentIdentifiers:
Pass back the assembled NSArray
of NSString
document identifiers.
- (void)builtArrayOfDocumentIdentifiers:(NSArray *)anArray
Parameters
- anArray
The array of identifiers. Pass
nil
if an error occurred.
Discussion
If an error occurred, call setError:
first, then specify nil
for anArray
.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
fetchInfoDictionaryForDocumentWithSyncID:
Fetch the documentInfo
dictionary for the document with the specified ID.
- (void)fetchInfoDictionaryForDocumentWithSyncID:(NSString *)aSyncID
Parameters
- aSyncID
The synchronization identifier for the document.
Call
fetchedInfoDictionary:forDocumentWithSyncID:
for each document as it is fetched.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
fetchLastSynchronizationDateForDocumentWithSyncID:
Fetch the last synchronization date for a document with the given synchronization ID.
- (void)fetchLastSynchronizationDateForDocumentWithSyncID:(NSString *)aSyncID
Parameters
- aSyncID
The synchronization identifier for the document.
Call
fetchedLastSynchronizationDate:forDocumentWithSyncID:
when the date is fetched.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
fetchedInfoDictionary:forDocumentWithSyncID:
Pass back the documentInfo
dictionary for a given document sync identifier.
- (void)fetchedInfoDictionary:(NSDictionary *)anInfoDictionary forDocumentWithSyncID:(NSString *)aSyncID
Parameters
- anInfoDictionary
The
documentInfo
dictionary, ornil
if an error occurred.
- aSyncID
The unique synchronization identifier of the given document.
Discussion
If an error occurred, call setError:
first, then specify nil
for anInfoDictionary
.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h
fetchedLastSynchronizationDate:forDocumentWithSyncID:
Pass back the last synchronization date for a given document sync identifier.
- (void)fetchedLastSynchronizationDate:(NSDate *)aDate forDocumentWithSyncID:(NSString *)aSyncID
Parameters
- aDate
The last synchronization date, or
nil
if an error occurred.
- aSyncID
The unique synchronization identifier of the given document.
Discussion
If an error occurred, call setError:
first, then specify nil
for aDate
.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.h