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
ticdsSyncIDattribute set. - If not, set any missing
ticdsSyncIDattributes. - Check whether a directory exists for this client inside the
WholeStoredirectory inside the document’sTemporaryFilesdirectory. - If so, delete it.
- Create a directory for this client inside the
WholeStoredirectory inside the document’sTemporaryFilesdirectory. - 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
WholeStoredirectory. - 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
-
– checkWhetherThisClientTemporaryWholeStoreDirectoryExistsCheck whether a directory exists for this client inside the
WholeStoredirectory inside the document’sTemporaryFilesdirectory. -
– deleteThisClientTemporaryWholeStoreDirectoryDelete the directory for this client inside the
WholeStoredirectory inside the document’sTemporaryFilesdirectory. -
– createThisClientTemporaryWholeStoreDirectoryCreate this client’s directory inside the
WholeStoredirectory inside this document’sTemporaryFilesdirectory. -
– uploadLocalWholeStoreFileToThisClientTemporaryWholeStoreDirectoryUpload the store at
localWholeStoreFileLocationto the remote path/Documents/documentIdentifier/TemporaryFiles/WholeStore/clientIdentifier/WholeStore.ticdsync. -
– uploadLocalAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryUpload the file at
localAppliedSyncChangeSetsFileLocationto the remote path/Documents/documentIdentifier/TemporaryFiles/WholeStore/clientIdentifier/AppliedSyncChangeSets.ticdsync. -
– checkWhetherThisClientWholeStoreDirectoryExistsCheck whether a directory exists for this client inside the document’s
WholeStoredirectory. -
– deleteThisClientWholeStoreDirectoryDelete the directory for this client inside this document’s
WholeStoredirectory. -
– copyThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryCopy the entire directory at
/Documents/documentIdentifier/TemporaryFiles/WholeStore/to/Documents/documentIdentifier/WholeStore/. -
– deletedThisClientTemporaryWholeStoreDirectoryWithSuccess:Indicate whether the deletion of this client’s directory inside the
WholeStoredirectory inside the document’sTemporaryFilesdirectory was successful. -
– createdThisClientTemporaryWholeStoreDirectoryWithSuccess:Indicate whether the creation of this client’s directory inside the
WholeStoredirectory inside the document’sTemporaryFilesdirectory 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
WholeStoredirectory for this document. -
– deletedThisClientWholeStoreDirectoryWithSuccess:Indicate whether the deletion of this client’s directory inside the document’s
WholeStoredirectory 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
-
localWholeStoreFileLocationThe location of the whole store file to upload.
property -
localAppliedSyncChangeSetsFileLocationThe location of the applied sync change sets file to upload.
property -
primaryPersistentStoreCoordinatorThe persistent store coordinator to use when creating the background context.
property -
backgroundApplicationContextThe 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 *backgroundApplicationContextDeclared In
TICDSWholeStoreUploadOperation.hlocalAppliedSyncChangeSetsFileLocation
The location of the applied sync change sets file to upload.
@property (retain) NSURL *localAppliedSyncChangeSetsFileLocationDeclared In
TICDSWholeStoreUploadOperation.hInstance Methods
checkWhetherThisClientTemporaryWholeStoreDirectoryExists
Check whether a directory exists for this client inside the WholeStore directory inside the document’s TemporaryFiles directory.
- (void)checkWhetherThisClientTemporaryWholeStoreDirectoryExistsDiscussion
This method must call discoveredStatusOfTemporaryWholeStoreDirectory: to indicate the status.
Declared In
TICDSWholeStoreUploadOperation.hcheckWhetherThisClientWholeStoreDirectoryExists
Check whether a directory exists for this client inside the document’s WholeStore directory.
- (void)checkWhetherThisClientWholeStoreDirectoryExistsDiscussion
This method must call discoveredStatusOfThisClientWholeStoreDirectory: to indicate the status.
Declared In
TICDSWholeStoreUploadOperation.hconfigureBackgroundApplicationContextForPersistentStoreCoordinator:
Configure a background context (for applying sync changes) using the same persistent store coordinator as the main application context.
- (void)configureBackgroundApplicationContextForPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)aPersistentStoreCoordinatorParameters
- aPersistentStoreCoordinator
The persistent store coordinator to use for the background context.
Declared In
TICDSWholeStoreUploadOperation.hcopiedThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryWithSuccess:
Indicate whether the temporary WholeStore directory was copied to the non-temporary directory location successfully.
- (void)copiedThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the directory was copied, otherwiseNO.
Discussion
If not, call setError: first, then specify NO for success.
Declared In
TICDSWholeStoreUploadOperation.hcopyThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectory
Copy the entire directory at /Documents/documentIdentifier/TemporaryFiles/WholeStore/ to /Documents/documentIdentifier/WholeStore/.
- (void)copyThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryDiscussion
This method must call copiedThisClientTemporaryWholeStoreDirectoryToThisClientWholeStoreDirectoryWithSuccess: when finished.
Declared In
TICDSWholeStoreUploadOperation.hcreateThisClientTemporaryWholeStoreDirectory
Create this client’s directory inside the WholeStore directory inside this document’s TemporaryFiles directory.
- (void)createThisClientTemporaryWholeStoreDirectoryDiscussion
This method must call createdThisClientTemporaryWholeStoreDirectoryWithSuccess: to indicate whether the creation was successful.
Declared In
TICDSWholeStoreUploadOperation.hcreatedThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the creation of this client’s directory inside the WholeStore directory inside the document’s TemporaryFiles directory was successful.
- (void)createdThisClientTemporaryWholeStoreDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the directory was created, otherwiseNO.
Discussion
If not, call setError: first, then specify NO for success.
Declared In
TICDSWholeStoreUploadOperation.hdeleteThisClientTemporaryWholeStoreDirectory
Delete the directory for this client inside the WholeStore directory inside the document’s TemporaryFiles directory.
- (void)deleteThisClientTemporaryWholeStoreDirectoryDiscussion
This method must call deletedThisClientTemporaryWholeStoreDirectoryWithSuccess: to indicate whether the deletion was successful.
Declared In
TICDSWholeStoreUploadOperation.hdeleteThisClientWholeStoreDirectory
Delete the directory for this client inside this document’s WholeStore directory.
- (void)deleteThisClientWholeStoreDirectoryDiscussion
This method must call deletedThisClientWholeStoreDirectoryWithSuccess: to indicate whether the deletion was successful.
Declared In
TICDSWholeStoreUploadOperation.hdeletedThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the deletion of this client’s directory inside the WholeStore directory inside the document’s TemporaryFiles directory was successful.
- (void)deletedThisClientTemporaryWholeStoreDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the directory was deleted, otherwiseNO.
Discussion
If not, call setError: first, then specify NO for success.
Declared In
TICDSWholeStoreUploadOperation.hdeletedThisClientWholeStoreDirectoryWithSuccess:
Indicate whether the deletion of this client’s directory inside the document’s WholeStore directory was successful.
- (void)deletedThisClientWholeStoreDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the directory was deleted, otherwiseNO.
Discussion
If not, call setError: first, then specify NO for success.
Declared In
TICDSWholeStoreUploadOperation.hdiscoveredStatusOfThisClientWholeStoreDirectory:
Indicate the status of this client’s directory inside the WholeStore directory for this document.
- (void)discoveredStatusOfThisClientWholeStoreDirectory:(TICDSRemoteFileStructureExistsResponseType)statusParameters
- status
The status of the directory: does exist, does not exist, or error (see
TICDSTypesAndEnums.hfor possible values).
Discussion
If an error occurred, call setError: first, then specify TICDSRemoteFileStructureExistsResponseTypeError for status.
Declared In
TICDSWholeStoreUploadOperation.huploadLocalAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectory
Upload the file at localAppliedSyncChangeSetsFileLocation to the remote path /Documents/documentIdentifier/TemporaryFiles/WholeStore/clientIdentifier/AppliedSyncChangeSets.ticdsync.
- (void)uploadLocalAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryDiscussion
This method must call uploadedAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryWithSuccess: when finished.
Declared In
TICDSWholeStoreUploadOperation.huploadLocalWholeStoreFileToThisClientTemporaryWholeStoreDirectory
Upload the store at localWholeStoreFileLocation to the remote path /Documents/documentIdentifier/TemporaryFiles/WholeStore/clientIdentifier/WholeStore.ticdsync.
- (void)uploadLocalWholeStoreFileToThisClientTemporaryWholeStoreDirectoryDiscussion
This method must call uploadedWholeStoreFileToThisClientTemporaryWholeStoreDirectoryWithSuccess: when finished.
Declared In
TICDSWholeStoreUploadOperation.huploadedAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the upload of the applied sync change sets file was successful.
- (void)uploadedAppliedSyncChangeSetsFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the file was uploaded, otherwiseNO.
Discussion
If not, call setError: first, then specify NO for success.
Declared In
TICDSWholeStoreUploadOperation.huploadedWholeStoreFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:
Indicate whether the upload of the whole store file was successful.
- (void)uploadedWholeStoreFileToThisClientTemporaryWholeStoreDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the file was uploaded, otherwiseNO.
Discussion
If not, call setError: first, then specify NO for success.
Declared In
TICDSWholeStoreUploadOperation.h