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.plist
file to anidentifier.plist
file inside theDeletedDocuments
directory. - 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
TICDSDocumentDeletionOperationDelegate
protocol.
Overridden Methods
-
– checkWhetherIdentifiedDocumentDirectoryExists
Check whether the document directory with specified identifier exists.
This method must call
discoveredStatusOfTemporaryWholeStoreDirectory:
to indicate the status. -
– checkForExistingIdentifierPlistInDeletedDocumentsDirectory
Check whether the
identifier.plist
file for the specified document identifier exists. -
– deleteDocumentInfoPlistFromDeletedDocumentsDirectory
Delete the identified document’s
identifier.plist
file from theDeletedDocuments
directory. -
– copyDocumentInfoPlistToDeletedDocumentsDirectory
Copy the identified document’s
documentInfo.plist
file to theDeletedDocuments
directory. -
– deleteDocumentDirectory
Delete the identified document’s directory.
Callbacks
-
– discoveredStatusOfIdentifiedDocumentDirectory:
Indicate the status of the document’s directory.
-
– discoveredStatusOfIdentifierPlistInDeletedDocumentsDirectory:
Indicate the status of an existing
identifier.plist
file in theDeletedDocuments
directory. -
– deletedDocumentInfoPlistFromDeletedDocumentsDirectoryWithSuccess:
Indicate whether the
identifier.plist
file was deleted successfully from theDeletedDocuments
directory. -
– copiedDocumentInfoPlistToDeletedDocumentsDirectoryWithSuccess:
Indicate whether the
documentInfo.plist
file was copied successfully to theDeletedDocuments
directory. -
– deletedDocumentDirectoryWithSuccess:
Indicate whether the document directory was deleted successfully.
Properties
-
documentIdentifier
The identifier of the document to delete.
property -
documentWasFoundAndDeleted
Used 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)checkForExistingIdentifierPlistInDeletedDocumentsDirectory
Discussion
This method must call discoveredStatusOfIdentifierPlistInDeletedDocumentsDirectory:
to indicate the status.
Declared In
TICDSDocumentDeletionOperation.h
checkWhetherIdentifiedDocumentDirectoryExists
Check whether the document directory with specified identifier exists.
This method must call discoveredStatusOfTemporaryWholeStoreDirectory:
to indicate the status.
- (void)checkWhetherIdentifiedDocumentDirectoryExists
Declared In
TICDSDocumentDeletionOperation.h
copiedDocumentInfoPlistToDeletedDocumentsDirectoryWithSuccess:
Indicate whether the documentInfo.plist
file was copied successfully to the DeletedDocuments
directory.
- (void)copiedDocumentInfoPlistToDeletedDocumentsDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the file was copied successfully, orNO
if an error occurred.
Discussion
If an error occurred, call setError:
first, then specify NO
for success
.
Declared In
TICDSDocumentDeletionOperation.h
copyDocumentInfoPlistToDeletedDocumentsDirectory
Copy the identified document’s documentInfo.plist
file to the DeletedDocuments
directory.
- (void)copyDocumentInfoPlistToDeletedDocumentsDirectory
Discussion
This method must call copiedDocumentInfoPlistToDeletedDocumentsDirectoryWithSuccess:
when finished.
Declared In
TICDSDocumentDeletionOperation.h
deleteDocumentDirectory
Delete the identified document’s directory.
- (void)deleteDocumentDirectory
Discussion
This method must call deletedDocumentDirectoryWithSuccess:
when finished.
Declared In
TICDSDocumentDeletionOperation.h
deleteDocumentInfoPlistFromDeletedDocumentsDirectory
Delete the identified document’s identifier.plist
file from the DeletedDocuments
directory.
- (void)deleteDocumentInfoPlistFromDeletedDocumentsDirectory
Discussion
This method must call deletedDocumentInfoPlistFromDeletedDocumentsDirectoryWithSuccess:
when finished.
Declared In
TICDSDocumentDeletionOperation.h
deletedDocumentDirectoryWithSuccess:
Indicate whether the document directory was deleted successfully.
- (void)deletedDocumentDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the directory was deleted successfully, orNO
if an error occurred.
Discussion
If an error occurred, call setError:
first, then specify NO
for success
.
Declared In
TICDSDocumentDeletionOperation.h
deletedDocumentInfoPlistFromDeletedDocumentsDirectoryWithSuccess:
Indicate whether the identifier.plist
file was deleted successfully from the DeletedDocuments
directory.
- (void)deletedDocumentInfoPlistFromDeletedDocumentsDirectoryWithSuccess:(BOOL)success
Parameters
- success
YES
if the file was deleted successfully, orNO
if an error occurred.
Discussion
If an error occurred, call setError:
first, then specify NO
for success
.
Declared In
TICDSDocumentDeletionOperation.h
discoveredStatusOfIdentifiedDocumentDirectory:
Indicate the status of the document’s directory.
- (void)discoveredStatusOfIdentifiedDocumentDirectory:(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
TICDSDocumentDeletionOperation.h
discoveredStatusOfIdentifierPlistInDeletedDocumentsDirectory:
Indicate the status of an existing identifier.plist
file in the DeletedDocuments
directory.
- (void)discoveredStatusOfIdentifierPlistInDeletedDocumentsDirectory:(TICDSRemoteFileStructureExistsResponseType)status
Parameters
- status
The status of the file: 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
TICDSDocumentDeletionOperation.h
initWithDelegate:
Initialize a document deletion operation using a delegate that supports the TICDSDocumentDeletionOperationDelegate
protocol.
- (id)initWithDelegate:(NSObject<TICDSDocumentDeletionOperationDelegate> *)aDelegate
Parameters
- aDelegate
The delegate to use for this operation.
Return Value
An initialized document registration operation.
Declared In
TICDSDocumentDeletionOperation.h