public class DummyCommentExtensionSupport extends Object implements CommentExtensionsSupport
Modifier and Type | Field and Description |
---|---|
static String |
EXTENSION_KEY_1 |
NULL_OBJECT
Constructor and Description |
---|
DummyCommentExtensionSupport() |
Modifier and Type | Method and Description |
---|---|
Iterable<ContentType> |
getCommentContainerType()
Get the comment container ContentType that we provide support for.
|
Map<String,com.atlassian.fugue.Option<String>> |
getExpansions()
Get the map of expandable extension properties provided by this CommentExtensionSupport
|
Map<ContentId,Map<String,Object>> |
getExtensions(Iterable<Comment> comments,
Expansions expansions)
Get the map of extension properties for each of the comment entities
|
void |
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.
|
public static final String EXTENSION_KEY_1
public Iterable<ContentType> getCommentContainerType()
CommentExtensionsSupport
This is needed so that we can provide different handling for inline comments when they are on Files compared to Pages and Blogs
getCommentContainerType
in interface CommentExtensionsSupport
public Map<ContentId,Map<String,Object>> getExtensions(Iterable<Comment> comments, Expansions expansions)
CommentExtensionsSupport
getExtensions
in interface CommentExtensionsSupport
comments
- the comments to get the additional extension properties forexpansions
- the expansions that have been requestedpublic Map<String,com.atlassian.fugue.Option<String>> getExpansions()
CommentExtensionsSupport
getExpansions
in interface CommentExtensionsSupport
public ValidationResult validateExtensionsForCreate(Map<String,Object> extensions, SimpleValidationResult.Builder validationResultBuilder)
CommentExtensionsSupport
validateExtensionsForCreate
in interface CommentExtensionsSupport
public ValidationResult validateExtensionsForUpdate(Comment comment, Map<String,Object> extensions, SimpleValidationResult.Builder validationResultBuilder)
CommentExtensionsSupport
validateExtensionsForUpdate
in interface CommentExtensionsSupport
public void updateExtensionsOnEntity(Comment comment, Map<String,Object> extensions)
CommentExtensionsSupport
updateExtensionsOnEntity
in interface CommentExtensionsSupport
comment
- - the newly created comment that needs properties set on itextensions
- - the extension properties to setCopyright © 2003–2017 Atlassian. All rights reserved.