public class DummyAvailableContentTypeSupport extends CustomContentTypeApiSupport
Modifier and Type | Field and Description |
---|---|
static ContentType |
contentType |
static String |
moduleKey |
Constructor and Description |
---|
DummyAvailableContentTypeSupport(CustomContentApiSupportParams parentParams) |
Modifier and Type | Method and Description |
---|---|
protected void |
createCustomContentEntity(Content content,
CustomContentEntityObject newVersion)
Set the extension properties on the entity.
|
protected PageResponse<Content> |
getChildrenForThisType(CustomContentEntityObject content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
protected PageResponse<Content> |
getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
Class<CustomContentEntityObject> |
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<CustomContentEntityObject> 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
|
protected boolean |
updateCustomContentEntity(Content content,
CustomContentEntityObject newVersion,
CustomContentEntityObject original)
Set the extension properties on the entity.
|
ValidationResult |
validateCreate(Content newContent)
Validate the create operation
|
ValidationResult |
validateUpdate(Content updatedContent,
CustomContentEntityObject existingEntity)
Validate the update operation
|
create, update
getChildren, getChildrenForThisType, getChildrenOfThisTypeForOtherType, getContainer, getLinks
public static final String moduleKey
public static final ContentType contentType
public DummyAvailableContentTypeSupport(CustomContentApiSupportParams parentParams)
public ContentType getHandledType()
ContentType
of the Content
that this service provides.protected PageResponse<Content> getChildrenForThisType(CustomContentEntityObject content, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenForThisType
in class BaseContentTypeApiSupport<CustomContentEntityObject>
public boolean supportsChildrenOfType(ContentType otherType)
BaseContentTypeApiSupport
supportsChildrenOfType
in interface ContentTypeApiSupport<CustomContentEntityObject>
supportsChildrenOfType
in class BaseContentTypeApiSupport<CustomContentEntityObject>
otherType
- - the other Content type that wants to offer children of our typeprotected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenOfThisTypeForOtherType
in class BaseContentTypeApiSupport<CustomContentEntityObject>
public boolean supportsChildrenForParentType(ContentType parentType)
supportsChildrenForParentType
in interface ContentTypeApiSupport<CustomContentEntityObject>
supportsChildrenForParentType
in class BaseContentTypeApiSupport<CustomContentEntityObject>
Content
of this binding's ContentType
can be a child of contentEntity of the given typepublic Map<ContentId,Map<String,Object>> getExtensions(Iterable<CustomContentEntityObject> contentEntities, Expansions expansions)
BaseContentTypeApiSupport
getExtensions
in interface ContentTypeApiSupport<CustomContentEntityObject>
getExtensions
in class BaseContentTypeApiSupport<CustomContentEntityObject>
public Class<CustomContentEntityObject> getEntityClass()
ContentTypeApiSupport
getEntityClass
in interface ContentTypeApiSupport<CustomContentEntityObject>
getEntityClass
in class CustomContentTypeApiSupport
protected boolean updateCustomContentEntity(Content content, CustomContentEntityObject newVersion, CustomContentEntityObject original)
CustomContentTypeApiSupport
updateCustomContentEntity
in class CustomContentTypeApiSupport
content
- the map of extension properties to set on the entitynewVersion
- the entity to updateoriginal
- the original copy of the entityprotected void createCustomContentEntity(Content content, CustomContentEntityObject newVersion)
CustomContentTypeApiSupport
createCustomContentEntity
in class CustomContentTypeApiSupport
content
- the map of extension properties to set on the entitynewVersion
- the entity to updatepublic ValidationResult validateCreate(Content newContent)
ContentTypeApiSupport
validateCreate
in interface ContentTypeApiSupport<CustomContentEntityObject>
validateCreate
in class BaseContentTypeApiSupport<CustomContentEntityObject>
newContent
- the content that will be used to create an entitypublic ValidationResult validateUpdate(Content updatedContent, CustomContentEntityObject existingEntity)
ContentTypeApiSupport
validateUpdate
in interface ContentTypeApiSupport<CustomContentEntityObject>
validateUpdate
in class BaseContentTypeApiSupport<CustomContentEntityObject>
updatedContent
- the content that will be used to update the entityexistingEntity
- the existing entity to be updatedCopyright © 2003–2015 Atlassian. All rights reserved.