Class NullCommentExtensionsSupport
java.lang.Object
com.atlassian.confluence.content.apisupport.NullCommentExtensionsSupport
- All Implemented Interfaces:
CommentExtensionsSupport
A null implementation for comment extension support, no additional extension sproperties
are provided or supported
-
Field Summary
Fields inherited from interface com.atlassian.confluence.content.apisupport.CommentExtensionsSupport
NULL_OBJECT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the map of expandable extension properties provided by this CommentExtensionSupportGet the comment container ContentType that we provide support for.getExtensions(Iterable<Comment> comments, Expansions expansions) Get the map of extension properties for each of the comment entitiesvoidupdateExtensionsOnEntity(Comment comment, Map<String, Object> extensions) A creation hook, extension properties should be set on the passed in comment object.validateExtensionsForCreate(Map<String, Object> extensions, SimpleValidationResult.Builder validationResultBuilder) Validation hook for create operations.validateExtensionsForUpdate(Comment comment, Map<String, Object> extensions, SimpleValidationResult.Builder validationResultBuilder) Validation hook for update operations.
-
Constructor Details
-
NullCommentExtensionsSupport
public NullCommentExtensionsSupport()
-
-
Method Details
-
getCommentContainerType
Description copied from interface:CommentExtensionsSupportGet the comment container ContentType that we provide support for.This is needed so that we can provide different handling for inline comments when they are on Files compared to Pages and Blogs
- Specified by:
getCommentContainerTypein interfaceCommentExtensionsSupport- Returns:
- a set of ContentTypes
-
getExtensions
public Map<ContentId,Map<String, getExtensionsObject>> (Iterable<Comment> comments, Expansions expansions) Description copied from interface:CommentExtensionsSupportGet the map of extension properties for each of the comment entities- Specified by:
getExtensionsin interfaceCommentExtensionsSupport- Parameters:
comments- the comments to get the additional extension properties forexpansions- the expansions that have been requested- Returns:
-
expansions
Description copied from interface:CommentExtensionsSupportGet the map of expandable extension properties provided by this CommentExtensionSupport- Specified by:
expansionsin interfaceCommentExtensionsSupport- Returns:
- an empty map
-
validateExtensionsForCreate
public ValidationResult validateExtensionsForCreate(Map<String, Object> extensions, SimpleValidationResult.Builder validationResultBuilder) Description copied from interface:CommentExtensionsSupportValidation hook for create operations.- Specified by:
validateExtensionsForCreatein interfaceCommentExtensionsSupport- Returns:
- A validation result containing any validation errors encountered
-
validateExtensionsForUpdate
public ValidationResult validateExtensionsForUpdate(Comment comment, Map<String, Object> extensions, SimpleValidationResult.Builder validationResultBuilder) Description copied from interface:CommentExtensionsSupportValidation hook for update operations.- Specified by:
validateExtensionsForUpdatein interfaceCommentExtensionsSupport- Returns:
- A validation result containing any validation errors encountered
-
updateExtensionsOnEntity
Description copied from interface:CommentExtensionsSupportA creation hook, extension properties should be set on the passed in comment object. This will be called during creation of the comment within a transaction- Specified by:
updateExtensionsOnEntityin interfaceCommentExtensionsSupport- Parameters:
comment- - the newly created comment that needs properties set on itextensions- - the extension properties to set
-