@ExperimentalSpi public abstract class CustomContentTypeApiSupport extends BaseContentTypeApiSupport<CustomContentEntityObject>
Constructor and Description |
---|
CustomContentTypeApiSupport(CustomContentApiSupportParams params) |
Modifier and Type | Method and Description |
---|---|
CustomContentEntityObject |
create(Content content)
Create a new persistent entity for the given api content
|
protected abstract void |
createCustomContentEntity(Content content,
CustomContentEntityObject newVersion)
Set the extension properties on the entity.
|
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)
|
Class<CustomContentEntityObject> |
getEntityClass()
Get the class of the hibernate object used to persist the content type handled by this api support
|
CustomContentEntityObject |
update(Content content,
CustomContentEntityObject entity)
Updates an existing persistent entity from the given api content
|
protected abstract boolean |
updateCustomContentEntity(Content content,
CustomContentEntityObject newVersion,
CustomContentEntityObject original)
Set the extension properties on the entity.
|
getChildren, getChildrenForThisType, getChildrenForThisType, getContainer, getExtensions, getFilteredChildrenForThisType, getFilteredChildrenOfThisTypeForOtherType, getLinks, validateCreate, validateUpdate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
container, getFilteredChildren, getHandledType, supportsChildrenForParentType, supportsChildrenOfType
public CustomContentTypeApiSupport(CustomContentApiSupportParams params)
public Class<CustomContentEntityObject> getEntityClass()
ContentTypeApiSupport
public CustomContentEntityObject create(Content content)
ContentTypeApiSupport
create
in interface ContentTypeApiSupport<CustomContentEntityObject>
create
in class BaseContentTypeApiSupport<CustomContentEntityObject>
content
- the model object to create a persistent entity forpublic CustomContentEntityObject update(Content content, CustomContentEntityObject entity)
ContentTypeApiSupport
update
in interface ContentTypeApiSupport<CustomContentEntityObject>
update
in class BaseContentTypeApiSupport<CustomContentEntityObject>
content
- the updated contententity
- the existing entityprotected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenOfThisTypeForOtherType
in class BaseContentTypeApiSupport<CustomContentEntityObject>
@Deprecated protected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth, com.google.common.base.Predicate<? super ContentEntityObject> predicate)
BaseContentTypeApiSupport.getFilteredChildrenOfThisTypeForOtherType(ContentConvertible, LimitedRequest, Expansions, Depth, java.util.function.Predicate)
BaseContentTypeApiSupport
getChildrenOfThisTypeForOtherType
in class BaseContentTypeApiSupport<CustomContentEntityObject>
protected abstract boolean updateCustomContentEntity(Content content, CustomContentEntityObject newVersion, CustomContentEntityObject original)
Implementors can also use this hook to fire relevant update events
This method will be called from the default update method in this class. Common properties, including body and title are populated before this methods is called.
Implementors that override create and update methods directly in this class should call this method for consistency.
content
- the map of extension properties to set on the entitynewVersion
- the entity to updateoriginal
- the original copy of the entityServiceException
protected abstract void createCustomContentEntity(Content content, CustomContentEntityObject newVersion)
Implementors can also use this hook to fire relevant create events
This method will be called from the default create method in this class. Common properties, including title, space and body are populated before this method is called.
Implementors that override create and update behaviour directly in this class should call this method for consistency.
content
- the map of extension properties to set on the entitynewVersion
- the entity to updateServiceException
Copyright © 2003–2021 Atlassian. All rights reserved.