@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.
|
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, getChildrenOfThisTypeForOtherType, getChildrenOfThisTypeForOtherType, getContainer, getExtensions, getLinks, validateCreate, validateUpdate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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 abstract boolean updateCustomContentEntity(Content content, CustomContentEntityObject newVersion, CustomContentEntityObject original)
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)
content
- the map of extension properties to set on the entitynewVersion
- the entity to updateServiceException
Copyright © 2003–2015 Atlassian. All rights reserved.