Inherits from NSObject
Declared in AlfrescoCommentService.h

Overview

The AlfrescoCommentService manages comments on nodes in an Alfresco repository. The service provides CRUD methods to work with comments.

Author: Gavin Cornwell (Alfresco), Tijs Rademakers (Alfresco), Peter Schmidt (Alfresco)

Tasks

Initialisation methods

Comment retrieval methods.

Editing comment methods.

Instance Methods

addCommentToNode:content:title:completionBlock:

Adds a comment to a node.

- (AlfrescoRequest *)addCommentToNode:(AlfrescoNode *)node content:(NSString *)content title:(NSString *)title completionBlock:(AlfrescoCommentCompletionBlock)completionBlock

Parameters

node

The node to which a comments will be added.

content

The comment content.

title

The comment title.

completionBlock

The block that’s called with the new comment in case the operation succeeds.

Discussion

Adds a comment to a node.

Declared In

AlfrescoCommentService.h

deleteCommentFromNode:comment:completionBlock:

Deletes a comment.

- (AlfrescoRequest *)deleteCommentFromNode:(AlfrescoNode *)node comment:(AlfrescoComment *)comment completionBlock:(AlfrescoBOOLCompletionBlock)completionBlock

Parameters

node

the node of the comment to be deleted

comment

The comment that needs to be deleted.

completionBlock

The block that’s called in case the operation succeeds.

Discussion

Deletes a comment.

Declared In

AlfrescoCommentService.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

AlfrescoCommentService.h

retrieveCommentsForNode:completionBlock:

Retrieves the comments for the given node.

- (AlfrescoRequest *)retrieveCommentsForNode:(AlfrescoNode *)node completionBlock:(AlfrescoArrayCompletionBlock)completionBlock

Parameters

node

The node for which the comments are retrieved.

completionBlock

The block that’s called with the retrieved comments in case the operation succeeds.

Discussion

Retrieves the comments for the given node.

Declared In

AlfrescoCommentService.h

retrieveCommentsForNode:latestFirst:completionBlock:

Retrieves the comments for the given node. If the latest first flag is set to YES, comments are returned with the latest first. Setting this flag to NO is equivalent to retrieveCommentsForNode:completionBlock:

- (AlfrescoRequest *)retrieveCommentsForNode:(AlfrescoNode *)node latestFirst:(BOOL)latestFirst completionBlock:(AlfrescoArrayCompletionBlock)completionBlock

Parameters

node

The node for which the comments are retrieved.

latestFirst

Flag indicating whether the latest comments should be returned first (reverse order).

completionBlock

The block that’s called with the retrieved comments in case the operation succeeds.

Discussion

Retrieves the comments for the given node. If the latest first flag is set to YES, comments are returned with the latest first. Setting this flag to NO is equivalent to retrieveCommentsForNode:completionBlock:

Declared In

AlfrescoCommentService.h

retrieveCommentsForNode:listingContext:completionBlock:

Retrieves the comments for the given node with a listing context.

- (AlfrescoRequest *)retrieveCommentsForNode:(AlfrescoNode *)node listingContext:(AlfrescoListingContext *)listingContext completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock

Parameters

node

The node for which the comments are retrieved.

listingContext

The listing context with a paging definition that’s used to retrieve the comments.

completionBlock

The block that’s called with the retrieved comments in case the operation succeeds.

Discussion

Retrieves the comments for the given node with a listing context.

Declared In

AlfrescoCommentService.h

retrieveCommentsForNode:listingContext:latestFirst:completionBlock:

Retrieves the comments for the given node with a listing context. If the latest first flag is set to YES, comments are returned with the latest first. Setting this flag to NO is equivalent to retrieveCommentsForNode:listingContext:completionBlock:

- (AlfrescoRequest *)retrieveCommentsForNode:(AlfrescoNode *)node listingContext:(AlfrescoListingContext *)listingContext latestFirst:(BOOL)latestFirst completionBlock:(AlfrescoPagingResultCompletionBlock)completionBlock

Parameters

node

The node for which the comments are retrieved.

listingContext

The listing context with a paging definition that’s used to retrieve the comments.

latestFirst

Flag indicating whether the latest comments should be returned first (reverse order).

completionBlock

The block that’s called with the retrieved comments in case the operation succeeds.

Discussion

Retrieves the comments for the given node with a listing context. If the latest first flag is set to YES, comments are returned with the latest first. Setting this flag to NO is equivalent to retrieveCommentsForNode:listingContext:completionBlock:

Declared In

AlfrescoCommentService.h

updateCommentOnNode:comment:content:completionBlock:

Updates a comment.

- (AlfrescoRequest *)updateCommentOnNode:(AlfrescoNode *)node comment:(AlfrescoComment *)comment content:(NSString *)content completionBlock:(AlfrescoCommentCompletionBlock)completionBlock

Parameters

node

The node of the comment to be updated.

comment

The Comment of the node to be updated

content

The new comment content.

completionBlock

The block that’s called with the updated comment in case the operation succeeds.

Discussion

Updates a comment.

Declared In

AlfrescoCommentService.h