AlfrescoVersionService Class Reference
Inherits from | NSObject |
Declared in | AlfrescoVersionService.h |
Overview
The AlfrescoVersionService provides ways to get all versions of a specific document.
Author: Gavin Cornwell (Alfresco), Tijs Rademakers (Alfresco), Peter Schmidt (Alfresco)
Tasks
Initialisation
-
– initWithSession:
Initialises with a standard Cloud or OnPremise session
Retrieval methods.
-
– retrieveAllVersionsOfDocument:completionBlock:
Retrieves all versions of the given document.
-
– retrieveAllVersionsOfDocument:listingContext:completionBlock:
Retrieves all versions of the given document with a listing context.
-
– retrieveLatestVersionOfDocument:completionBlock:
Retrieves the latest version of the given document.
-
– checkoutDocument:completionBlock:
Checks out the given document and returns the private working copy (pwc) document. The original document is locked in the repository.
-
– cancelCheckoutOfDocument:completionBlock:
Cancels a previous checkout operation.
-
– checkinDocument:asMajorVersion:contentFile:properties:comment:completionBlock:progressBlock:
Checks in the given private working copy document.
-
– checkinDocument:asMajorVersion:contentStream:properties:comment:completionBlock:progressBlock:
Checks in the given private working copy document.
Instance Methods
cancelCheckoutOfDocument:completionBlock:
Cancels a previous checkout operation.
- (AlfrescoRequest *)cancelCheckoutOfDocument:(AlfrescoDocument *)document completionBlock:(AlfrescoBOOLCompletionBlock)completionBlock
Parameters
- document
The private working copy document to cancel the checkout for.
- completionBlock
The block that’s called following the cancel checkout operation.
Discussion
Cancels a previous checkout operation.
Declared In
AlfrescoVersionService.h
checkinDocument:asMajorVersion:contentFile:properties:comment:completionBlock:progressBlock:
Checks in the given private working copy document.
- (AlfrescoRequest *)checkinDocument:(AlfrescoDocument *)document asMajorVersion:(BOOL)majorVersion contentFile:(AlfrescoContentFile *)file properties:(NSDictionary *)properties comment:(NSString *)comment completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock progressBlock:(AlfrescoProgressBlock)progressBlock
Parameters
- document
The private working copy document to checkin.
- properties
An optional set of properties to update as part of the checkin operation.
- comment
An optional comment describing the reason for the update.
- completionBlock
The block that’s called when the checkin operation completes.
- progressBlock
The block that’s called as the new content is uploaded to the server.
- asMajorVersion
Indicates whether the new version should be created as the next major version i.e. 2.0.
- contentFile
A file that represents the content for the new version.
Discussion
Checks in the given private working copy document.
Declared In
AlfrescoVersionService.h
checkinDocument:asMajorVersion:contentStream:properties:comment:completionBlock:progressBlock:
Checks in the given private working copy document.
- (AlfrescoRequest *)checkinDocument:(AlfrescoDocument *)document asMajorVersion:(BOOL)majorVersion contentStream:(AlfrescoContentStream *)contentStream properties:(NSDictionary *)properties comment:(NSString *)comment completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock progressBlock:(AlfrescoProgressBlock)progressBlock
Parameters
- document
The private working copy document to checkin.
- contentStream
A stream that represents the content for the new version.
- properties
An optional set of properties to update as part of the checkin operation.
- comment
An optional comment describing the reason for the update.
- completionBlock
The block that’s called when the checkin operation completes.
- progressBlock
The block that’s called as the new content is uploaded to the server.
- asMajorVersion
Indicates whether the new version should be created as the next major version i.e. 2.0.
Discussion
Checks in the given private working copy document.
Declared In
AlfrescoVersionService.h
checkoutDocument:completionBlock:
Checks out the given document and returns the private working copy (pwc) document. The original document is locked in the repository.
- (AlfrescoRequest *)checkoutDocument:(AlfrescoDocument *)document completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock
Parameters
- document
The document to check out.
- completionBlock
The block that’s called following the checkout operation, if the checkout was successful the pwc is provided.
Discussion
Checks out the given document and returns the private working copy (pwc) document. The original document is locked in the repository.
Declared In
AlfrescoVersionService.h
initWithSession:
Initialises with a standard Cloud or OnPremise session
- (id)initWithSession:(id<AlfrescoSession>)session
Parameters
- session
the AlfrescoSession to initialise the site service with.
Discussion
Initialises with a standard Cloud or OnPremise session
Declared In
AlfrescoVersionService.h
retrieveAllVersionsOfDocument:completionBlock:
Retrieves all versions of the given document.
- (AlfrescoRequest *)retrieveAllVersionsOfDocument:(AlfrescoDocument *)document completionBlock:(AlfrescoArrayCompletionBlock)completionBlock
Parameters
- document
The document for which all versions should be retrieved.
- completionBlock
The block that’s called with the retrieved versions in case the operation succeeds.
Discussion
Retrieves all versions of the given document.
Declared In
AlfrescoVersionService.h
retrieveAllVersionsOfDocument:listingContext:completionBlock:
Retrieves all versions of the given document with a listing context.
- (AlfrescoRequest *)retrieveAllVersionsOfDocument:(AlfrescoDocument *)document listingContext:(AlfrescoListingContext *)listingContext completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock
Parameters
- document
The document for which all versions should be retrieved.
- listingContext
The listing context with a paging definition that’s used to retrieve the versions.
- completionBlock
The block that’s called with the retrieved versions in case the operation succeeds.
Discussion
Retrieves all versions of the given document with a listing context.
Declared In
AlfrescoVersionService.h
retrieveLatestVersionOfDocument:completionBlock:
Retrieves the latest version of the given document.
- (AlfrescoRequest *)retrieveLatestVersionOfDocument:(AlfrescoDocument *)document completionBlock:(AlfrescoDocumentCompletionBlock)completionBlock
Parameters
- document
The document to get the latest of.
- completionBlock
The block that’s called with the retrieved document.
Discussion
Retrieves the latest version of the given document.
Declared In
AlfrescoVersionService.h