public class PageContentTypeApiSupport extends BaseContentTypeApiSupport<Page>
Page
s for the API.Constructor and Description |
---|
PageContentTypeApiSupport(ContentFactory contentFactory,
PageManagerInternal pageManager,
SpaceManager spaceManager,
PaginationService paginationService,
ApiSupportProvider apiSupportProvider,
ContentCreator contentCreator) |
Modifier and Type | Method and Description |
---|---|
Page |
create(Content newContent)
Create a new persistent entity for the given api content
|
protected PageResponse<Content> |
getChildrenForThisType(Page content,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
protected PageResponse<Content> |
getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent,
LimitedRequest limitedRequest,
Expansions expansions,
Depth depth) |
Class<Page> |
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<Page> pages,
Expansions expansions)
Get the set of extension properties for the collection of contentEntity Ids.
|
ContentType |
getHandledType() |
boolean |
supportsChildrenForParentType(ContentType parentType)
Determines whether this ContentTypeApiSupport will provide children for other types.
|
boolean |
supportsChildrenOfType(ContentType parentType)
Determines whether other ContentTypeApiSupports can provide children for this type.
|
Page |
update(Content updatedContent,
Page page)
Updates an existing persistent entity from the given api content
|
ValidationResult |
validateCreate(Content newContent)
Validate the create operation
|
ValidationResult |
validateUpdate(Content updatedContent,
Page sceo)
Validate the update operation
|
getChildren, getChildrenForThisType, getChildrenOfThisTypeForOtherType, getContainer, getLinks
public PageContentTypeApiSupport(ContentFactory contentFactory, PageManagerInternal pageManager, SpaceManager spaceManager, PaginationService paginationService, ApiSupportProvider apiSupportProvider, ContentCreator contentCreator)
public ContentType getHandledType()
ContentType
of the Content
that this service provides.protected PageResponse<Content> getChildrenForThisType(Page content, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenForThisType
in class BaseContentTypeApiSupport<Page>
public boolean supportsChildrenOfType(ContentType parentType)
ContentTypeApiSupport
For children of type childType
to be allowed as children of this type,
this type needs to return true
for
supportsChildrenOfType(childType)
,
and childType
needs to return true
for
supportsChildrenForParentType(thisType)
.
parentType
- the other Content type that wants to offer children below an instance of our typeContent
of otherType
's ContentType
should be allowed
as children of this type (as far as this type is concerned:
childType
also gets a say via ContentTypeApiSupport.supportsChildrenForParentType(ContentType)
)ContentTypeApiSupport.supportsChildrenForParentType(ContentType)
protected PageResponse<Content> getChildrenOfThisTypeForOtherType(ContentConvertible otherTypeParent, LimitedRequest limitedRequest, Expansions expansions, Depth depth)
getChildrenOfThisTypeForOtherType
in class BaseContentTypeApiSupport<Page>
public boolean supportsChildrenForParentType(ContentType parentType)
ContentTypeApiSupport
For children of this type to be allowed as children of parentType
,
this type needs to return true
for
supportsChildrenForParentType(parentType)
,
and parentType
needs to return true
for
supportsChildrenOfType(thisType)
.
parentType
- the other Content type that our type is offering children toContent
of this type's ContentType
should be allowed to be a child of
parentType
(as far as this type is concerned:
parentType
also gets a say via ContentTypeApiSupport.supportsChildrenOfType(ContentType)
)ContentTypeApiSupport.supportsChildrenOfType(ContentType)
public Class<Page> getEntityClass()
ContentTypeApiSupport
public Map<ContentId,Map<String,Object>> getExtensions(Iterable<Page> pages, Expansions expansions)
BaseContentTypeApiSupport
getExtensions
in interface ContentTypeApiSupport<Page>
getExtensions
in class BaseContentTypeApiSupport<Page>
public ValidationResult validateCreate(Content newContent)
ContentTypeApiSupport
validateCreate
in interface ContentTypeApiSupport<Page>
validateCreate
in class BaseContentTypeApiSupport<Page>
newContent
- the content that will be used to create an entitypublic ValidationResult validateUpdate(Content updatedContent, Page sceo)
ContentTypeApiSupport
validateUpdate
in interface ContentTypeApiSupport<Page>
validateUpdate
in class BaseContentTypeApiSupport<Page>
updatedContent
- the content that will be used to update the entitysceo
- the existing entity to be updatedpublic Page create(Content newContent)
ContentTypeApiSupport
create
in interface ContentTypeApiSupport<Page>
create
in class BaseContentTypeApiSupport<Page>
newContent
- the model object to create a persistent entity forpublic Page update(Content updatedContent, Page page)
ContentTypeApiSupport
update
in interface ContentTypeApiSupport<Page>
update
in class BaseContentTypeApiSupport<Page>
updatedContent
- the updated contentpage
- the existing entityCopyright © 2003–2015 Atlassian. All rights reserved.