|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.content.apisupport.BaseContentTypeApiSupport<Comment> com.atlassian.confluence.api.impl.service.content.typebinding.CommentContentTypeApiSupport
public class CommentContentTypeApiSupport
ΓΈ
Performs API operations for Comment
s.
Constructor Summary | |
---|---|
CommentContentTypeApiSupport(CommentManagerInternal commentManager,
PaginationService paginationService,
ContentFactory contentFactory,
PermissionManager permissionManager,
ContentEntityManager contentEntityManager,
ApiSupportProvider apiSupportProvider,
CommentService commentService,
ContentBodyConversionService contentBodyConversionService,
com.atlassian.plugin.PluginAccessor pluginAccessor)
|
Method Summary | |
---|---|
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 |
Methods inherited from class com.atlassian.confluence.content.apisupport.BaseContentTypeApiSupport |
---|
getChildren, getContainer, getLinks |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommentContentTypeApiSupport(CommentManagerInternal commentManager, PaginationService paginationService, ContentFactory contentFactory, PermissionManager permissionManager, ContentEntityManager contentEntityManager, ApiSupportProvider apiSupportProvider, CommentService commentService, ContentBodyConversionService contentBodyConversionService, com.atlassian.plugin.PluginAccessor pluginAccessor)
Method Detail |
---|
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 type
protected 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 for
public 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 entity
public 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 updated
public Comment update(Content contentToUpdate, Comment entity)
ContentTypeApiSupport
update
in interface ContentTypeApiSupport<Comment>
update
in class BaseContentTypeApiSupport<Comment>
contentToUpdate
- the updated contententity
- the existing entity
protected void execute(ServiceCommand command) throws PermissionException, BadRequestException
PermissionException
BadRequestException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |