TICDSWholeStoreUploadOperation Class Reference
Inherits from | TICDSOperation : NSOperation |
Declared in | TICDSWholeStoreUploadOperation.h |
Overview
The TICDSWholeStoreUploadOperation
class describes a generic operation used by the TICoreDataSync
framework to upload the whole store for a document.
The operation carries out the following tasks:
- Check whether every object in the store to upload has the
ticdsSyncID
attribute set. - If not, set any missing
ticdsSyncID
attributes. - Check whether a directory exists for this client inside the
WholeStore
directory inside the document’sTemporaryFiles
directory. - If so, delete it.
- Create a directory for this client inside the
WholeStore
directory inside the document’sTemporaryFiles
directory. - Upload the whole store file to this temporary directory.
- Upload the applied sync change sets file that goes with this whole store to this temporary directory.
- Check whether a directory exists for this client inside the document’s
WholeStore
directory. - If so, delete it.
- Copy the temporary directory the non-temporary location.
Operations are typically created automatically by the relevant sync manager.
You must use one of the subclasses of TICDSWholeStoreUploadOperation
.
Tasks
Methods Overridden by Subclasses
-
– checkWhetherThisClientTemporaryWholeStoreDirectoryExists
Check whether a directory exists for this client inside the
WholeStore
directory inside the document’sTemporaryFiles
directory. -
– deleteThisClientTemporaryWholeStoreDirectory
Delete the directory for this client inside the
WholeStore
directory inside the document’sTemporaryFiles
directory. -
– createThisClientTemporaryWholeStoreDirectory
Create this client’s directory inside the
WholeStore
directory inside this document’sTemporaryFiles
directory. -
– uploadLocalWholeStoreFileToThisClientTemporaryWholeStoreDirectory
Upload the store at
localWholeStoreFileLocation
to the remote path/Documents/documentIdentifier/TemporaryFiles/WholeStore/clientIdentifier/WholeStore.ticdsync
. -
– uploadLocalAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectory
Upload the file at
localAppliedSyncChangeSetsFileLocation
to the remote path/Documents/documentIdentifier/TemporaryFiles/WholeStore/clientIdentifier/AppliedSyncChangeSets.ticdsync
. -
– checkWhetherThisClientWholeStoreDirectoryExists
Check whether a directory exists for this client inside the document’s
WholeStore
directory. -
– deleteThisClientWholeStoreDirectory
Delete the directory for this client inside this document’s
WholeStore
directory. -
– copyThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectory
Copy the entire directory at
/Documents/documentIdentifier/TemporaryFiles/WholeStore/
to/Documents/documentIdentifier/WholeStore/
. -
– deletedThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the deletion of this client’s directory inside the
WholeStore
directory inside the document’sTemporaryFiles
directory was successful. -
– createdThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the creation of this client’s directory inside the
WholeStore
directory inside the document’sTemporaryFiles
directory was successful. -
– uploadedWholeStoreFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the upload of the whole store file was successful.
-
– uploadedAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the upload of the applied sync change sets file was successful.
-
– discoveredStatusOfThisClientWholeStoreDirectory:
Indicate the status of this client’s directory inside the
WholeStore
directory for this document. -
– deletedThisClientWholeStoreDirectoryWithSuccess:
Indicate whether the deletion of this client’s directory inside the document’s
WholeStore
directory was successful. -
– copiedThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryWithSuccess:
Indicate whether the temporary WholeStore directory was copied to the non-temporary directory location successfully.
-
– configureBackgroundApplicationContextForPersistentStoreCoordinator:
Configure a background context (for applying sync changes) using the same persistent store coordinator as the main application context.
Properties
-
localWholeStoreFileLocation
The location of the whole store file to upload.
property -
localAppliedSyncChangeSetsFileLocation
The location of the applied sync change sets file to upload.
property -
primaryPersistentStoreCoordinator
The persistent store coordinator to use when creating the background context.
property -
backgroundApplicationContext
The managed object context to use when checking for missing ticdsSyncIDs prior to upload.
property
Properties
backgroundApplicationContext
The managed object context to use when checking for missing ticdsSyncIDs prior to upload.
@property (nonatomic, retain) NSManagedObjectContext *backgroundApplicationContext
Declared In
TICDSWholeStoreUploadOperation.h
localAppliedSyncChangeSetsFileLocation
The location of the applied sync change sets file to upload.
@property (retain) NSURL *localAppliedSyncChangeSetsFileLocation
Declared In
TICDSWholeStoreUploadOperation.h
Instance Methods
checkWhetherThisClientTemporaryWholeStoreDirectoryExists
Check whether a directory exists for this client inside the WholeStore
directory inside the document’s TemporaryFiles
directory.
- (void)checkWhetherThisClientTemporaryWholeStoreDirectoryExists
Discussion
This method must call discoveredStatusOfTemporaryWholeStoreDirectory:
to indicate the status.
Declared In
TICDSWholeStoreUploadOperation.h
checkWhetherThisClientWholeStoreDirectoryExists
Check whether a directory exists for this client inside the document’s WholeStore
directory.
- (void)checkWhetherThisClientWholeStoreDirectoryExists
Discussion
This method must call discoveredStatusOfThisClientWholeStoreDirectory:
to indicate the status.
Declared In
TICDSWholeStoreUploadOperation.h
configureBackgroundApplicationContextForPersistentStoreCoordinator:
Configure a background context (for applying sync changes) using the same persistent store coordinator as the main application context.
- (void)configureBackgroundApplicationContextForPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)aPersistentStoreCoordinator
Parameters
- aPersistentStoreCoordinator
The persistent store coordinator to use for the background context.
Declared In
TICDSWholeStoreUploadOperation.h
copiedThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryWithSuccess:
Indicate whether the temporary WholeStore directory was copied to the non-temporary directory location successfully.
- (void)copiedThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the directory was copied, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSWholeStoreUploadOperation.h
copyThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectory
Copy the entire directory at /Documents/documentIdentifier/TemporaryFiles/WholeStore/
to /Documents/documentIdentifier/WholeStore/
.
- (void)copyThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectory
Discussion
This method must call copiedThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryWithSuccess:
when finished.
Declared In
TICDSWholeStoreUploadOperation.h
createThisClientTemporaryWholeStoreDirectory
Create this client’s directory inside the WholeStore
directory inside this document’s TemporaryFiles
directory.
- (void)createThisClientTemporaryWholeStoreDirectory
Discussion
This method must call createdThisClientTemporaryWholeStoreDirectoryWithSuccess:
to indicate whether the creation was successful.
Declared In
TICDSWholeStoreUploadOperation.h
createdThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the creation of this client’s directory inside the WholeStore
directory inside the document’s TemporaryFiles
directory was successful.
- (void)createdThisClientTemporaryWholeStoreDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the directory was created, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSWholeStoreUploadOperation.h
deleteThisClientTemporaryWholeStoreDirectory
Delete the directory for this client inside the WholeStore
directory inside the document’s TemporaryFiles
directory.
- (void)deleteThisClientTemporaryWholeStoreDirectory
Discussion
This method must call deletedThisClientTemporaryWholeStoreDirectoryWithSuccess:
to indicate whether the deletion was successful.
Declared In
TICDSWholeStoreUploadOperation.h
deleteThisClientWholeStoreDirectory
Delete the directory for this client inside this document’s WholeStore
directory.
- (void)deleteThisClientWholeStoreDirectory
Discussion
This method must call deletedThisClientWholeStoreDirectoryWithSuccess:
to indicate whether the deletion was successful.
Declared In
TICDSWholeStoreUploadOperation.h
deletedThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the deletion of this client’s directory inside the WholeStore
directory inside the document’s TemporaryFiles
directory was successful.
- (void)deletedThisClientTemporaryWholeStoreDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the directory was deleted, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSWholeStoreUploadOperation.h
deletedThisClientWholeStoreDirectoryWithSuccess:
Indicate whether the deletion of this client’s directory inside the document’s WholeStore
directory was successful.
- (void)deletedThisClientWholeStoreDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the directory was deleted, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSWholeStoreUploadOperation.h
discoveredStatusOfThisClientWholeStoreDirectory:
Indicate the status of this client’s directory inside the WholeStore
directory for this document.
- (void)discoveredStatusOfThisClientWholeStoreDirectory:(TICDSRemoteFileStructureExistsResponseType)status
Parameters
- status
The status of the directory: does exist, does not exist, or error (see
TICDSTypesAndEnums.h
for possible values).
Discussion
If an error occurred, call setError:
first, then specify TICDSRemoteFileStructureExistsResponseTypeError
for status
.
Declared In
TICDSWholeStoreUploadOperation.h
uploadLocalAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectory
Upload the file at localAppliedSyncChangeSetsFileLocation
to the remote path /Documents/documentIdentifier/TemporaryFiles/WholeStore/clientIdentifier/AppliedSyncChangeSets.ticdsync
.
- (void)uploadLocalAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectory
Discussion
This method must call uploadedAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:
when finished.
Declared In
TICDSWholeStoreUploadOperation.h
uploadLocalWholeStoreFileToThisClientTemporaryWholeStoreDirectory
Upload the store at localWholeStoreFileLocation
to the remote path /Documents/documentIdentifier/TemporaryFiles/WholeStore/clientIdentifier/WholeStore.ticdsync
.
- (void)uploadLocalWholeStoreFileToThisClientTemporaryWholeStoreDirectory
Discussion
This method must call uploadedWholeStoreFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:
when finished.
Declared In
TICDSWholeStoreUploadOperation.h
uploadedAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the upload of the applied sync change sets file was successful.
- (void)uploadedAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the file was uploaded, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSWholeStoreUploadOperation.h
uploadedWholeStoreFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the upload of the whole store file was successful.
- (void)uploadedWholeStoreFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the file was uploaded, otherwiseNO
.
Discussion
If not, call setError:
first, then specify NO
for success
.
Declared In
TICDSWholeStoreUploadOperation.h