Class BlogPostContentTypeApiSupport
java.lang.Object
com.atlassian.confluence.content.apisupport.BaseContentTypeApiSupport<BlogPost>
com.atlassian.confluence.api.impl.service.content.typebinding.BlogPostContentTypeApiSupport
- All Implemented Interfaces:
ContentTypeApiSupport<BlogPost>
-
Constructor Summary
ConstructorsConstructorDescriptionBlogPostContentTypeApiSupport(ApiSupportProvider provider, ContentCreator contentCreator) -
Method Summary
Modifier and TypeMethodDescriptionCreate a new persistent entity for the given api contentprotected PageResponse<Content> getChildrenForThisType(BlogPost content, LimitedRequest limitedRequest, Expansions expansions, Depth depth) protected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth) Get the class of the hibernate object used to persist the content type handled by this api supportbooleansupportsChildrenForParentType(ContentType parentType) Determines whether this ContentTypeApiSupport will provide children for other types.booleansupportsChildrenOfType(ContentType otherType) Determines whether other ContentTypeApiSupports can provide children for this type.Updates an existing persistent entity from the given api contentvalidateCreate(Content newContent) Validate the create operationvalidateUpdate(Content updatedContent, BlogPost existingEntity) Validate the update operationMethods inherited from class com.atlassian.confluence.content.apisupport.BaseContentTypeApiSupport
container, getExtensions, getFilteredChildren, getFilteredChildrenForThisType, getFilteredChildrenOfThisTypeForOtherType, getLinks
-
Constructor Details
-
BlogPostContentTypeApiSupport
-
-
Method Details
-
getHandledType
- Returns:
- the
ContentTypeof theContentthat this service provides.
-
getChildrenForThisType
protected PageResponse<Content> getChildrenForThisType(BlogPost content, LimitedRequest limitedRequest, Expansions expansions, Depth depth) - Specified by:
getChildrenForThisTypein classBaseContentTypeApiSupport<BlogPost>
-
supportsChildrenOfType
Description copied from interface:ContentTypeApiSupportDetermines whether other ContentTypeApiSupports can provide children for this type.For children of type
childTypeto be allowed as children of this type, this type needs to returntrueforsupportsChildrenOfType(childType), andchildTypeneeds to returntrueforsupportsChildrenForParentType(thisType).- Parameters:
otherType- the other Content type that wants to offer children below an instance of our type- Returns:
- true if
ContentofotherType'sContentTypeshould be allowed as children of this type (as far as this type is concerned:childTypealso gets a say viaContentTypeApiSupport.supportsChildrenForParentType(ContentType)) - See Also:
-
getChildrenOfThisTypeForOtherType
protected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth) - Specified by:
getChildrenOfThisTypeForOtherTypein classBaseContentTypeApiSupport<BlogPost>
-
supportsChildrenForParentType
Description copied from interface:ContentTypeApiSupportDetermines whether this ContentTypeApiSupport will provide children for other types.For children of this type to be allowed as children of
parentType, this type needs to returntrueforsupportsChildrenForParentType(parentType), andparentTypeneeds to returntrueforsupportsChildrenOfType(thisType).- Parameters:
parentType- the other Content type that our type is offering children to- Returns:
- true if
Contentof this type'sContentTypeshould be allowed to be a child ofparentType(as far as this type is concerned:parentTypealso gets a say viaContentTypeApiSupport.supportsChildrenOfType(ContentType)) - See Also:
-
getEntityClass
Description copied from interface:ContentTypeApiSupportGet the class of the hibernate object used to persist the content type handled by this api support- Returns:
- the class of the entity used to persist changes
-
validateCreate
Description copied from interface:ContentTypeApiSupportValidate the create operation- Specified by:
validateCreatein interfaceContentTypeApiSupport<BlogPost>- Overrides:
validateCreatein classBaseContentTypeApiSupport<BlogPost>- Parameters:
newContent- the content that will be used to create an entity- Returns:
- a validation result wrapping any validation errors that were encountered
-
validateUpdate
Description copied from interface:ContentTypeApiSupportValidate the update operation- Specified by:
validateUpdatein interfaceContentTypeApiSupport<BlogPost>- Overrides:
validateUpdatein classBaseContentTypeApiSupport<BlogPost>- Parameters:
updatedContent- the content that will be used to update the entityexistingEntity- the existing entity to be updated- Returns:
- a validation result wrapping any validation errors that were encountered
-
create
Description copied from interface:ContentTypeApiSupportCreate a new persistent entity for the given api content- Specified by:
createin interfaceContentTypeApiSupport<BlogPost>- Overrides:
createin classBaseContentTypeApiSupport<BlogPost>- Parameters:
newContent- the model object to create a persistent entity for- Returns:
- the newly created persistent entity
-
update
Description copied from interface:ContentTypeApiSupportUpdates an existing persistent entity from the given api content- Specified by:
updatein interfaceContentTypeApiSupport<BlogPost>- Overrides:
updatein classBaseContentTypeApiSupport<BlogPost>- Parameters:
updatedContent- the updated contentblog- the existing entity- Returns:
- the updated entity
-