TICDSWholeStoreDownloadOperation Class Reference
Inherits from | TICDSOperation : NSOperation |
Declared in | TICDSWholeStoreDownloadOperation.h |
Overview
The TICDSWholeStoreDownloadOperation
class describes a generic operation used by the TICoreDataSync
framework to download the whole store for a document.
The operation carries out the following tasks:
- If
requestedWholeStoreClientIdentifier
is not set, determine which client uploaded a store most recently, and setrequestedWholeStoreClientIdentifier
. - Download the whole store file from the
requestedWholeStoreClientIdentifier
’s directory. - Download the applied sync change sets file that goes with this whole store.
Operations are typically created automatically by the relevant sync manager.
You must use one of the subclasses of TICDSWholeStoreDownloadOperation
.
Tasks
Methods Overridden by Subclasses
-
– checkForMostRecentClientWholeStore
Determine which client uploaded a WholeStore most recently.
-
– downloadWholeStoreFile
Download the store at the remote document store path to the
localWholeStoreFileLocation
. -
– downloadAppliedSyncChangeSetsFile
Download the applied sync change sets file at the remote document store path to the
localAppliedSyncChangeSetsFileLocation
. -
– fetchRemoteIntegrityKey
Fetch the integrity key for this document.
Callbacks
-
– determinedMostRecentWholeStoreWasUploadedByClientWithIdentifier:
Indicate which client uploaded the most recent WholeStore.
-
– downloadedWholeStoreFileWithSuccess:
Indicate whether the download of the whole store file was successful.
-
– downloadedAppliedSyncChangeSetsFileWithSuccess:
Indicate whether the download of the applied sync change sets file was successful.
-
– fetchedRemoteIntegrityKey:
Pass back the remote integrity key for this document.
Properties
-
requestedWholeStoreClientIdentifier
The client identifier for the WholeStore to download. If this is not specified before the operation executes, the operation will determine which client uploaded a store most recently.
property -
localWholeStoreFileLocation
The destination for the whole store file.
property -
localAppliedSyncChangeSetsFileLocation
The destination for the applied sync change sets file.
property -
integrityKey
The integrity key of the newly-downloaded store.
property
Properties
integrityKey
The integrity key of the newly-downloaded store.
@property (retain) NSString *integrityKey
Declared In
TICDSWholeStoreDownloadOperation.h
localAppliedSyncChangeSetsFileLocation
The destination for the applied sync change sets file.
@property (retain) NSURL *localAppliedSyncChangeSetsFileLocation
Declared In
TICDSWholeStoreDownloadOperation.h
localWholeStoreFileLocation
The destination for the whole store file.
@property (retain) NSURL *localWholeStoreFileLocation
Declared In
TICDSWholeStoreDownloadOperation.h
requestedWholeStoreClientIdentifier
The client identifier for the WholeStore to download. If this is not specified before the operation executes, the operation will determine which client uploaded a store most recently.
@property (retain) NSString *requestedWholeStoreClientIdentifier
Declared In
TICDSWholeStoreDownloadOperation.h
Instance Methods
checkForMostRecentClientWholeStore
Determine which client uploaded a WholeStore most recently.
- (void)checkForMostRecentClientWholeStore
Discussion
This method must call determinedMostRecentWholeStoreWasUploadedByClientWithIdentifier:
when finished.
Declared In
TICDSWholeStoreDownloadOperation.h
determinedMostRecentWholeStoreWasUploadedByClientWithIdentifier:
Indicate which client uploaded the most recent WholeStore.
- (void)determinedMostRecentWholeStoreWasUploadedByClientWithIdentifier:(NSString *)anIdentifier
Parameters
- anIdentifier
The identifier of the client.
Discussion
If an error occurs, call setError:
first, then specify nil
for anIdentifier
Declared In
TICDSWholeStoreDownloadOperation.h
downloadAppliedSyncChangeSetsFile
Download the applied sync change sets file at the remote document store path to the localAppliedSyncChangeSetsFileLocation
.
- (void)downloadAppliedSyncChangeSetsFile
Discussion
This method must call downloadedAppliedSyncChangeSetsFileWithSuccess:
when finished.
Declared In
TICDSWholeStoreDownloadOperation.h
downloadWholeStoreFile
Download the store at the remote document store path to the localWholeStoreFileLocation
.
- (void)downloadWholeStoreFile
Discussion
This method must call downloadedWholeStoreFileWithSuccess:
when finished.
Declared In
TICDSWholeStoreDownloadOperation.h
downloadedAppliedSyncChangeSetsFileWithSuccess:
Indicate whether the download of the applied sync change sets file was successful.
- (void)downloadedAppliedSyncChangeSetsFileWithSuccess:(BOOL)success
Parameters
- success
YES
if the applied sync change sets file was downloaded, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSWholeStoreDownloadOperation.h
downloadedWholeStoreFileWithSuccess:
Indicate whether the download of the whole store file was successful.
- (void)downloadedWholeStoreFileWithSuccess:(BOOL)success
Parameters
- success
YES
if the whole store file was downloaded, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSWholeStoreDownloadOperation.h
fetchRemoteIntegrityKey
Fetch the integrity key for this document.
- (void)fetchRemoteIntegrityKey
Discussion
This method must call fetchedRemoteIntegrityKey:
to provide the key.
Declared In
TICDSWholeStoreDownloadOperation.h
fetchedRemoteIntegrityKey:
Pass back the remote integrity key for this document.
- (void)fetchedRemoteIntegrityKey:(NSString *)aKey
Parameters
- aKey
The remote integrity key, or
nil
if an error occurred.
Discussion
If an error occurred, call setError:
first, then specify nil
for aKey
.
Declared In
TICDSWholeStoreDownloadOperation.h