public class CommentContentTypeApiSupport extends BaseContentTypeApiSupport<Comment>
Comment
s.Constructor and Description |
---|
CommentContentTypeApiSupport(CommentManagerInternal commentManager,
PaginationService paginationService,
ContentFactory contentFactory,
PermissionManager permissionManager,
ContentEntityManager contentEntityManager,
ApiSupportProvider apiSupportProvider,
CommentService commentService,
ContentBodyConversionService contentBodyConversionService,
com.atlassian.plugin.PluginAccessor pluginAccessor) |
Modifier and Type | Method and Description |
---|---|
Comment |
create(Content newContent)
Create a new persistent entity for the given api content
|
protected void |
execute(ServiceCommand command) |
protected PageResponse<Content> |
getChildrenForThisType(Comment content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
protected PageResponse<Content> |
getChildrenForThisType(Comment content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth,
com.google.common.base.Predicate<? super ContentEntityObject> predicate)
This method includes an additional parameter "location", it will call the default one if not overridden
|
protected PageResponse<Content> |
getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
protected PageResponse<Content> |
getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth,
com.google.common.base.Predicate<? super ContentEntityObject> predicate)
This method includes an additional parameter "location", it will call the default one if not overridden
|
Class<Comment> |
getEntityClass()
Get the class of the hibernate object used to persist the content type handled by this api support
|
Map<ContentId,Map<String,Object>> |
getExtensions(Iterable<Comment> contentEntities,
Expansions expansions)
Get the set of extension properties for the collection of contentEntity Ids.
|
ContentType |
getHandledType() |
boolean |
supportsChildrenForParentType(ContentType parentType) |
boolean |
supportsChildrenOfType(ContentType otherType)
A check that to allow other ContentTypeApiSupports to provide children for this type
|
Comment |
update(Content contentToUpdate,
Comment entity)
Updates an existing persistent entity from the given api content
|
ValidationResult |
validateCreate(Content newContent)
Validate the create operation
|
ValidationResult |
validateUpdate(Content updatedContent,
Comment existingEntity)
Validate the update operation
|
getChildren, getContainer, getLinks
public CommentContentTypeApiSupport(CommentManagerInternal commentManager, PaginationService paginationService, ContentFactory contentFactory, PermissionManager permissionManager, ContentEntityManager contentEntityManager, ApiSupportProvider apiSupportProvider, CommentService commentService, ContentBodyConversionService contentBodyConversionService, com.atlassian.plugin.PluginAccessor pluginAccessor)
public ContentType getHandledType()
ContentType
of the Content
that this service provides.protected PageResponse<Content> getChildrenForThisType(Comment content, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenForThisType
in class BaseContentTypeApiSupport<Comment>
protected PageResponse<Content> getChildrenForThisType(Comment content, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super ContentEntityObject> predicate)
BaseContentTypeApiSupport
getChildrenForThisType
in class BaseContentTypeApiSupport<Comment>
public boolean supportsChildrenOfType(ContentType otherType)
BaseContentTypeApiSupport
supportsChildrenOfType
in interface ContentTypeApiSupport<Comment>
supportsChildrenOfType
in class BaseContentTypeApiSupport<Comment>
otherType
- - the other Content type that wants to offer children of our typeprotected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenOfThisTypeForOtherType
in class BaseContentTypeApiSupport<Comment>
protected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super ContentEntityObject> predicate)
BaseContentTypeApiSupport
getChildrenOfThisTypeForOtherType
in class BaseContentTypeApiSupport<Comment>
public boolean supportsChildrenForParentType(ContentType parentType)
supportsChildrenForParentType
in interface ContentTypeApiSupport<Comment>
supportsChildrenForParentType
in class BaseContentTypeApiSupport<Comment>
Content
of this binding's ContentType
can be a child of contentEntity of the given typepublic Map<ContentId,Map<String,Object>> getExtensions(Iterable<Comment> contentEntities, Expansions expansions)
BaseContentTypeApiSupport
getExtensions
in interface ContentTypeApiSupport<Comment>
getExtensions
in class BaseContentTypeApiSupport<Comment>
public Class<Comment> getEntityClass()
ContentTypeApiSupport
public Comment create(Content newContent)
ContentTypeApiSupport
create
in interface ContentTypeApiSupport<Comment>
create
in class BaseContentTypeApiSupport<Comment>
newContent
- the model object to create a persistent entity forpublic ValidationResult validateCreate(Content newContent)
ContentTypeApiSupport
validateCreate
in interface ContentTypeApiSupport<Comment>
validateCreate
in class BaseContentTypeApiSupport<Comment>
newContent
- the content that will be used to create an entitypublic ValidationResult validateUpdate(Content updatedContent, Comment existingEntity)
ContentTypeApiSupport
validateUpdate
in interface ContentTypeApiSupport<Comment>
validateUpdate
in class BaseContentTypeApiSupport<Comment>
updatedContent
- the content that will be used to update the entityexistingEntity
- the existing entity to be updatedpublic Comment update(Content contentToUpdate, Comment entity)
ContentTypeApiSupport
update
in interface ContentTypeApiSupport<Comment>
update
in class BaseContentTypeApiSupport<Comment>
contentToUpdate
- the updated contententity
- the existing entityprotected void execute(ServiceCommand command) throws PermissionException, BadRequestException
Copyright © 2003–2015 Atlassian. All rights reserved.