|
||||||||||
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<T>
@ExperimentalSpi public abstract class BaseContentTypeApiSupport<T extends ContentConvertible>
A subclass for extensible content type support in the api
Constructor Summary | |
---|---|
protected |
BaseContentTypeApiSupport(ApiSupportProvider provider)
|
Method Summary | |
---|---|
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)
Retrieve the children of an item of Content. |
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)
This method includes an additional parameter "location", it will call the default one if not overridden |
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)
This method includes an additional parameter "location", it will call the default one if not overridden |
com.atlassian.fugue.Option<Object> |
getContainer(T contentEntity,
Expansions expansions)
The return type of this method is intentionly broad. |
Map<ContentId,Map<String,Object>> |
getExtensions(Iterable<T> contentEntities,
Expansions expansions)
Get the set of extension properties for the collection of contentEntity Ids. |
List<Link> |
getLinks(T contentEntity)
Get additional link properties for the _links map Implementors should override and provide links for the given contentEntity |
abstract boolean |
supportsChildrenForParentType(ContentType parentType)
|
abstract boolean |
supportsChildrenOfType(ContentType otherType)
A check that to allow other ContentTypeApiSupports to provide children for this type |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.confluence.content.apisupport.ContentTypeApiSupport |
---|
getEntityClass, getHandledType |
Constructor Detail |
---|
protected BaseContentTypeApiSupport(ApiSupportProvider provider)
Method Detail |
---|
public final PageResponse<Content> getChildren(ContentConvertible content, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super ContentEntityObject> predicate)
getChildren
in interface ContentTypeApiSupport<T extends ContentConvertible>
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)
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)
public abstract boolean supportsChildrenOfType(ContentType otherType)
supportsChildrenOfType
in interface ContentTypeApiSupport<T extends ContentConvertible>
otherType
- - the other Content type that wants to offer children of our type
public abstract boolean supportsChildrenForParentType(ContentType parentType)
supportsChildrenForParentType
in interface ContentTypeApiSupport<T extends ContentConvertible>
Content
of this binding's ContentType
can be a child of contentEntity of the given typepublic Map<ContentId,Map<String,Object>> getExtensions(Iterable<T> contentEntities, Expansions expansions)
getExtensions
in interface ContentTypeApiSupport<T extends ContentConvertible>
public List<Link> getLinks(T contentEntity)
getLinks
in interface ContentTypeApiSupport<T extends ContentConvertible>
public com.atlassian.fugue.Option<Object> getContainer(T contentEntity, Expansions expansions)
getContainer
in interface ContentTypeApiSupport<T extends ContentConvertible>
contentEntity
- - the content entity to get the container object for
public T create(Content content)
ContentTypeApiSupport
create
in interface ContentTypeApiSupport<T extends ContentConvertible>
content
- the model object to create a persistent entity for
public ValidationResult validateCreate(Content newContent)
ContentTypeApiSupport
validateCreate
in interface ContentTypeApiSupport<T extends ContentConvertible>
newContent
- the content that will be used to create an entity
public T update(Content content, T entity)
ContentTypeApiSupport
update
in interface ContentTypeApiSupport<T extends ContentConvertible>
content
- the updated contententity
- the existing entity
public 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 updated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |