Interface CommentExtensionsSupport
-
- All Known Implementing Classes:
DummyCommentExtensionSupport
,NullCommentExtensionsSupport
@Internal public interface CommentExtensionsSupport
An internal SPI to allow core comments to be extended by Atlassian
-
-
Field Summary
Fields Modifier and Type Field Description static CommentExtensionsSupport
NULL_OBJECT
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default Map<String,Optional<String>>
expansions()
Get the map of expandable extension properties provided by this CommentExtensionSupportIterable<ContentType>
getCommentContainerType()
Get the comment container ContentType that we provide support for.Map<String,com.atlassian.fugue.Option<String>>
getExpansions()
Deprecated.since 7.0.1.Map<ContentId,Map<String,Object>>
getExtensions(Iterable<Comment> comments, Expansions expansions)
Get the map of extension properties for each of the comment entitiesvoid
updateExtensionsOnEntity(Comment comment, Map<String,Object> extensions)
A creation hook, extension properties should be set on the passed in comment object.ValidationResult
validateExtensionsForCreate(Map<String,Object> extensions, SimpleValidationResult.Builder validationResultBuilder)
Validation hook for create operations.ValidationResult
validateExtensionsForUpdate(Comment comment, Map<String,Object> extensions, SimpleValidationResult.Builder validationResultBuilder)
Validation hook for update operations.
-
-
-
Field Detail
-
NULL_OBJECT
static final CommentExtensionsSupport NULL_OBJECT
-
-
Method Detail
-
getCommentContainerType
Iterable<ContentType> getCommentContainerType()
Get 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
- Returns:
- a set of ContentTypes
-
getExtensions
Map<ContentId,Map<String,Object>> getExtensions(Iterable<Comment> comments, Expansions expansions)
Get the map of extension properties for each of the comment entities- Parameters:
comments
- the comments to get the additional extension properties forexpansions
- the expansions that have been requested- Returns:
-
getExpansions
@Deprecated Map<String,com.atlassian.fugue.Option<String>> getExpansions()
Deprecated.since 7.0.1. Useexpansions()
Get the map of expandable extension properties provided by this CommentExtensionSupport- Returns:
- a map of expandable extension properties to an optional url for that property
-
expansions
default Map<String,Optional<String>> expansions()
Get the map of expandable extension properties provided by this CommentExtensionSupport- Returns:
- a map of expandable extension properties to an optional url for that property
- Since:
- 7.0.1
-
validateExtensionsForCreate
ValidationResult validateExtensionsForCreate(Map<String,Object> extensions, SimpleValidationResult.Builder validationResultBuilder)
Validation hook for create operations.- Parameters:
extensions
-validationResultBuilder
-- Returns:
- A validation result containing any validation errors encountered
-
validateExtensionsForUpdate
ValidationResult validateExtensionsForUpdate(Comment comment, Map<String,Object> extensions, SimpleValidationResult.Builder validationResultBuilder)
Validation hook for update operations.- Parameters:
extensions
-validationResultBuilder
-- Returns:
- A validation result containing any validation errors encountered
-
updateExtensionsOnEntity
void updateExtensionsOnEntity(Comment comment, Map<String,Object> extensions)
A 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- Parameters:
comment
- - the newly created comment that needs properties set on itextensions
- - the extension properties to set
-
-