TICDSDocumentDeletionOperation Class Reference
| Inherits from | TICDSOperation : NSOperation |
| Declared in | TICDSDocumentDeletionOperation.h |
Overview
The TICDSDocumentDeletionOperation class describes a generic operation used by the TICoreDataSync framework to delete the remote synchronization data used to synchronize a document.
The operation carries out the following tasks:
- Check whether the specified document exists.
- Copy the
documentInfo.plistfile to anidentifier.plistfile inside theDeletedDocumentsdirectory. - Delete the document’s directory.
Operations are typically created automatically by the relevant sync manager.
You must use one of the subclasses of TICDSDocumentDeletionOperation.
Tasks
Designated Initializer
-
– initWithDelegate:Initialize a document deletion operation using a delegate that supports the
TICDSDocumentDeletionOperationDelegateprotocol.
Overridden Methods
-
– checkWhetherIdentifiedDocumentDirectoryExistsCheck whether the document directory with specified identifier exists.
This method must call
discoveredStatusOfTemporaryWholeStoreDirectory:to indicate the status. -
– checkForExistingIdentifierPlistInDeletedDocumentsDirectoryCheck whether the
identifier.plistfile for the specified document identifier exists. -
– deleteDocumentInfoPlistFromDeletedDocumentsDirectoryDelete the identified document’s
identifier.plistfile from theDeletedDocumentsdirectory. -
– copyDocumentInfoPlistToDeletedDocumentsDirectoryCopy the identified document’s
documentInfo.plistfile to theDeletedDocumentsdirectory. -
– deleteDocumentDirectoryDelete the identified document’s directory.
Callbacks
-
– discoveredStatusOfIdentifiedDocumentDirectory:Indicate the status of the document’s directory.
-
– discoveredStatusOfIdentifierPlistInDeletedDocumentsDirectory:Indicate the status of an existing
identifier.plistfile in theDeletedDocumentsdirectory. -
– deletedDocumentInfoPlistFromDeletedDocumentsDirectoryWithSuccess:Indicate whether the
identifier.plistfile was deleted successfully from theDeletedDocumentsdirectory. -
– copiedDocumentInfoPlistToDeletedDocumentsDirectoryWithSuccess:Indicate whether the
documentInfo.plistfile was copied successfully to theDeletedDocumentsdirectory. -
– deletedDocumentDirectoryWithSuccess:Indicate whether the document directory was deleted successfully.
Properties
-
documentIdentifierThe identifier of the document to delete.
property -
documentWasFoundAndDeletedUsed to indicate (once the operation completes) whether the document was found and deleted successfully.
property
Properties
Instance Methods
checkForExistingIdentifierPlistInDeletedDocumentsDirectory
Check whether the identifier.plist file for the specified document identifier exists.
- (void)checkForExistingIdentifierPlistInDeletedDocumentsDirectoryDiscussion
This method must call discoveredStatusOfIdentifierPlistInDeletedDocumentsDirectory: to indicate the status.
Declared In
TICDSDocumentDeletionOperation.hcheckWhetherIdentifiedDocumentDirectoryExists
Check whether the document directory with specified identifier exists.
This method must call discoveredStatusOfTemporaryWholeStoreDirectory: to indicate the status.
- (void)checkWhetherIdentifiedDocumentDirectoryExistsDeclared In
TICDSDocumentDeletionOperation.hcopiedDocumentInfoPlistToDeletedDocumentsDirectoryWithSuccess:
Indicate whether the documentInfo.plist file was copied successfully to the DeletedDocuments directory.
- (void)copiedDocumentInfoPlistToDeletedDocumentsDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the file was copied successfully, orNOif an error occurred.
Discussion
If an error occurred, call setError: first, then specify NO for success.
Declared In
TICDSDocumentDeletionOperation.hcopyDocumentInfoPlistToDeletedDocumentsDirectory
Copy the identified document’s documentInfo.plist file to the DeletedDocuments directory.
- (void)copyDocumentInfoPlistToDeletedDocumentsDirectoryDiscussion
This method must call copiedDocumentInfoPlistToDeletedDocumentsDirectoryWithSuccess: when finished.
Declared In
TICDSDocumentDeletionOperation.hdeleteDocumentDirectory
Delete the identified document’s directory.
- (void)deleteDocumentDirectoryDiscussion
This method must call deletedDocumentDirectoryWithSuccess: when finished.
Declared In
TICDSDocumentDeletionOperation.hdeleteDocumentInfoPlistFromDeletedDocumentsDirectory
Delete the identified document’s identifier.plist file from the DeletedDocuments directory.
- (void)deleteDocumentInfoPlistFromDeletedDocumentsDirectoryDiscussion
This method must call deletedDocumentInfoPlistFromDeletedDocumentsDirectoryWithSuccess: when finished.
Declared In
TICDSDocumentDeletionOperation.hdeletedDocumentDirectoryWithSuccess:
Indicate whether the document directory was deleted successfully.
- (void)deletedDocumentDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the directory was deleted successfully, orNOif an error occurred.
Discussion
If an error occurred, call setError: first, then specify NO for success.
Declared In
TICDSDocumentDeletionOperation.hdeletedDocumentInfoPlistFromDeletedDocumentsDirectoryWithSuccess:
Indicate whether the identifier.plist file was deleted successfully from the DeletedDocuments directory.
- (void)deletedDocumentInfoPlistFromDeletedDocumentsDirectoryWithSuccess:(BOOL)successParameters
- success
YESif the file was deleted successfully, orNOif an error occurred.
Discussion
If an error occurred, call setError: first, then specify NO for success.
Declared In
TICDSDocumentDeletionOperation.hdiscoveredStatusOfIdentifiedDocumentDirectory:
Indicate the status of the document’s directory.
- (void)discoveredStatusOfIdentifiedDocumentDirectory:(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
TICDSDocumentDeletionOperation.hdiscoveredStatusOfIdentifierPlistInDeletedDocumentsDirectory:
Indicate the status of an existing identifier.plist file in the DeletedDocuments directory.
- (void)discoveredStatusOfIdentifierPlistInDeletedDocumentsDirectory:(TICDSRemoteFileStructureExistsResponseType)statusParameters
- status
The status of the file: 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
TICDSDocumentDeletionOperation.hinitWithDelegate:
Initialize a document deletion operation using a delegate that supports the TICDSDocumentDeletionOperationDelegate protocol.
- (id)initWithDelegate:(NSObject<TICDSDocumentDeletionOperationDelegate> *)aDelegateParameters
- aDelegate
The delegate to use for this operation.
Return Value
An initialized document registration operation.
Declared In
TICDSDocumentDeletionOperation.h