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:

  1. Check whether the specified document exists.
  2. Copy the documentInfo.plist file to an identifier.plist file inside the DeletedDocuments directory.
  3. Delete the document’s directory.

Operations are typically created automatically by the relevant sync manager.

%warning%
Warning: You must use one of the subclasses of TICDSDocumentDeletionOperation.

Tasks

Designated Initializer

Overridden Methods

Callbacks

Properties

Properties

documentIdentifier

The identifier of the document to delete.

@property (copy) NSString *documentIdentifier

Declared In

TICDSDocumentDeletionOperation.h

documentWasFoundAndDeleted

Used to indicate (once the operation completes) whether the document was found and deleted successfully.

@property (assign) BOOL documentWasFoundAndDeleted

Declared In

TICDSDocumentDeletionOperation.h

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, or NO 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, or NO 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, or NO 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