@ExperimentalSpi public abstract class BaseContentTypeApiSupport<T extends ContentConvertible> extends Object implements ContentTypeApiSupport<T>
Modifier | Constructor and Description |
---|---|
protected |
BaseContentTypeApiSupport(ApiSupportProvider provider) |
Modifier and Type | Method and Description |
---|---|
T |
create(Content content)
Create a new persistent entity for the given api content
|
PageResponse<Content> |
getChildren(ContentConvertible content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth,
com.google.common.base.Predicate<? super ContentEntityObject> predicate)
|
protected abstract PageResponse<Content> |
getChildrenForThisType(T content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
protected PageResponse<Content> |
getChildrenForThisType(T content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth,
com.google.common.base.Predicate<? super ContentEntityObject> predicate)
Deprecated.
|
protected abstract 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)
|
com.atlassian.fugue.Option<Object> |
getContainer(T contentEntity,
Expansions expansions)
Deprecated.
since 7.0.1. Use
ContentTypeApiSupport.container(ContentConvertible, Expansions) |
Map<ContentId,Map<String,Object>> |
getExtensions(Iterable<T> contentEntities,
Expansions expansions)
Get the set of extension properties for the collection of contentEntity Ids.
|
protected PageResponse<Content> |
getFilteredChildrenForThisType(T content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth,
Predicate<? super ContentEntityObject> predicate)
This method includes an additional parameter "location", it will call the default one if not overridden
|
protected PageResponse<Content> |
getFilteredChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth,
Predicate<? super ContentEntityObject> predicate)
This method includes an additional parameter "location", it will call the default one if not overridden
|
List<Link> |
getLinks(T contentEntity)
Get additional link properties for the _links map
|
T |
update(Content content,
T entity)
Updates an existing persistent entity from the given api content
|
ValidationResult |
validateCreate(Content newContent)
Validate the create operation
|
ValidationResult |
validateUpdate(Content updatedContent,
T existingEntity)
Validate the update operation
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
container, getEntityClass, getFilteredChildren, getHandledType, supportsChildrenForParentType, supportsChildrenOfType
protected BaseContentTypeApiSupport(ApiSupportProvider provider)
@Deprecated public final PageResponse<Content> getChildren(ContentConvertible content, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super ContentEntityObject> predicate)
ContentTypeApiSupport.getFilteredChildren(ContentConvertible, LimitedRequest, Expansions, Depth, java.util.function.Predicate)
getChildren
in interface ContentTypeApiSupport<T extends ContentConvertible>
protected abstract PageResponse<Content> getChildrenForThisType(T content, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
@Deprecated protected PageResponse<Content> getChildrenForThisType(T content, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super ContentEntityObject> predicate)
getFilteredChildrenForThisType(ContentConvertible, LimitedRequest, Expansions, Depth, java.util.function.Predicate)
protected PageResponse<Content> getFilteredChildrenForThisType(T content, LimitedRequest limitedRequest, Expansions expansions, Depth depth, Predicate<? super ContentEntityObject> predicate)
protected abstract PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
@Deprecated protected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super ContentEntityObject> predicate)
getFilteredChildrenOfThisTypeForOtherType(ContentConvertible, LimitedRequest, Expansions, Depth, java.util.function.Predicate)
protected PageResponse<Content> getFilteredChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth, Predicate<? super ContentEntityObject> predicate)
public Map<ContentId,Map<String,Object>> getExtensions(Iterable<T> contentEntities, Expansions expansions)
Implementors should override to provide extensions for the given contentEntity.
getExtensions
in interface ContentTypeApiSupport<T extends ContentConvertible>
public List<Link> getLinks(T contentEntity)
Implementors should override and provide links for the given contentEntity
getLinks
in interface ContentTypeApiSupport<T extends ContentConvertible>
@Deprecated public com.atlassian.fugue.Option<Object> getContainer(T contentEntity, Expansions expansions)
ContentTypeApiSupport.container(ContentConvertible, Expansions)
getContainer
in interface ContentTypeApiSupport<T extends ContentConvertible>
contentEntity
- - the content entity to get the container object forpublic T create(Content content)
ContentTypeApiSupport
create
in interface ContentTypeApiSupport<T extends ContentConvertible>
content
- the model object to create a persistent entity forpublic ValidationResult validateCreate(Content newContent)
ContentTypeApiSupport
validateCreate
in interface ContentTypeApiSupport<T extends ContentConvertible>
newContent
- the content that will be used to create an entitypublic T update(Content content, T entity)
ContentTypeApiSupport
update
in interface ContentTypeApiSupport<T extends ContentConvertible>
content
- the updated contententity
- the existing entitypublic ValidationResult validateUpdate(Content updatedContent, T existingEntity)
ContentTypeApiSupport
validateUpdate
in interface ContentTypeApiSupport<T extends ContentConvertible>
updatedContent
- the content that will be used to update the entityexistingEntity
- the existing entity to be updatedCopyright © 2003–2020 Atlassian. All rights reserved.