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
documentInfodictionary 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.
You must use one of the subclasses of TICDSListOfPreviouslySynchronizedDocumentsOperation.
Tasks
Methods Overridden by Subclasses
-
– buildArrayOfDocumentIdentifiersBuild an array of
NSStringdocument identifiers for all available, previously-synchronized documents. -
– fetchInfoDictionaryForDocumentWithSyncID:Fetch the
documentInfodictionary 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
NSArrayofNSStringdocument identifiers. -
– fetchedInfoDictionary:forDocumentWithSyncID:Pass back the
documentInfodictionary for a given document sync identifier. -
– fetchedLastSynchronizationDate:forDocumentWithSyncID:Pass back the last synchronization date for a given document sync identifier.
Properties
-
availableDocumentsAn array of documents, built as information comes in.
property -
availableDocumentSyncIDsAn array used internally by the operation to keep track of the available document sync identifiers.
property
Completion
-
numberOfInfoDictionariesToFetchThe total number of info dictionaries that need to be fetched.
property -
numberOfInfoDictionariesFetchedThe number of info dictionaries that have already been fetched.
property -
numberOfInfoDictionariesThatFailedToFetchThe number of info dictionaries that failed to fetch because of an error.
property -
numberOfLastSynchronizationDatesToFetchThe total number of last synchronization dates that need to be fetched.
property -
numberOfLastSynchronizationDatesFetchedThe number of last synchronization dates that have already been fetched.
property -
numberOfLastSynchronizationDatesThatFailedToFetchThe 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, retain) NSArray *availableDocumentSyncIDsDeclared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.havailableDocuments
An array of documents, built as information comes in.
@property (retain) NSMutableArray *availableDocumentsDeclared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hnumberOfInfoDictionariesFetched
The number of info dictionaries that have already been fetched.
@property (nonatomic, assign) NSUInteger numberOfInfoDictionariesFetchedDeclared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hnumberOfInfoDictionariesThatFailedToFetch
The number of info dictionaries that failed to fetch because of an error.
@property (nonatomic, assign) NSUInteger numberOfInfoDictionariesThatFailedToFetchDeclared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hnumberOfInfoDictionariesToFetch
The total number of info dictionaries that need to be fetched.
@property (nonatomic, assign) NSUInteger numberOfInfoDictionariesToFetchDeclared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hnumberOfLastSynchronizationDatesFetched
The number of last synchronization dates that have already been fetched.
@property (nonatomic, assign) NSUInteger numberOfLastSynchronizationDatesFetchedDeclared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hInstance Methods
buildArrayOfDocumentIdentifiers
Build an array of NSString document identifiers for all available, previously-synchronized documents.
- (void)buildArrayOfDocumentIdentifiersDiscussion
Call builtArrayOfDocumentIdentifiers: when the array is built.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hbuiltArrayOfDocumentIdentifiers:
Pass back the assembled NSArray of NSString document identifiers.
- (void)builtArrayOfDocumentIdentifiers:(NSArray *)anArrayParameters
- anArray
The array of identifiers. Pass
nilif an error occurred.
Discussion
If an error occurred, call setError: first, then specify nil for anArray.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hfetchInfoDictionaryForDocumentWithSyncID:
Fetch the documentInfo dictionary for the document with the specified ID.
- (void)fetchInfoDictionaryForDocumentWithSyncID:(NSString *)aSyncIDParameters
- aSyncID
The synchronization identifier for the document.
Call
fetchedInfoDictionary:forDocumentWithSyncID:for each document as it is fetched.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hfetchLastSynchronizationDateForDocumentWithSyncID:
Fetch the last synchronization date for a document with the given synchronization ID.
- (void)fetchLastSynchronizationDateForDocumentWithSyncID:(NSString *)aSyncIDParameters
- aSyncID
The synchronization identifier for the document.
Call
fetchedLastSynchronizationDate:forDocumentWithSyncID:when the date is fetched.
Declared In
TICDSListOfPreviouslySynchronizedDocumentsOperation.hfetchedInfoDictionary:forDocumentWithSyncID:
Pass back the documentInfo dictionary for a given document sync identifier.
- (void)fetchedInfoDictionary:(NSDictionary *)anInfoDictionary forDocumentWithSyncID:(NSString *)aSyncIDParameters
- anInfoDictionary
The
documentInfodictionary, ornilif 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.hfetchedLastSynchronizationDate:forDocumentWithSyncID:
Pass back the last synchronization date for a given document sync identifier.
- (void)fetchedLastSynchronizationDate:(NSDate *)aDate forDocumentWithSyncID:(NSString *)aSyncIDParameters
- aDate
The last synchronization date, or
nilif 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