Class TemplateResource
java.lang.Object
com.atlassian.confluence.plugins.restapi.experimental.resources.TemplateResource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateContentTemplate
(ContentTemplate contentTemplate, String expand) Create a contentTemplate, this means creating a new page template or a customised blueprint template.createInstance
(ContentBlueprintInstance contentBlueprintInstance, ContentTemplateId contentTemplateId, String expand) getBlueprintTemplates
(String spaceKey, int start, int limit, String expand, javax.ws.rs.core.UriInfo uriInfo) Returns all blueprint templates of the space specified.getContentTemplate
(ContentTemplateId id, String expand) Return the template identified by id.getContentTemplates
(String spaceKey, int start, int limit, String expand, javax.ws.rs.core.UriInfo uriInfo) Returns all content templates of the space specified.javax.ws.rs.core.Response
removeTemplate
(ContentTemplateId contentTemplateId) Delete an existing customised contentTemplate, for blueprint template this means revert to default template from plugin and remove the customised version of template.updateContentTemplate
(ContentTemplate contentTemplate, String expand) Update/Edit an existing contentTemplate.
-
Constructor Details
-
TemplateResource
-
-
Method Details
-
getBlueprintTemplates
public PageResponse<ContentTemplate> getBlueprintTemplates(String spaceKey, int start, int limit, String expand, @Context javax.ws.rs.core.UriInfo uriInfo) Returns all blueprint templates of the space specified.
Example request URI:
http://example.com/confluence/rest/experimental/template/blueprint?expand=body&limit=10
- Parameters:
spaceKey
- space key, global if not specified.start
- the start point of the paged response to return.limit
- the limit of response pageexpand
- a comma-separated list of properties to expand in the response. Default to empty string.uriInfo
- (injected) information about the request URI- Returns:
ContentTemplate
PageResponse of ContentTemplate
-
getContentTemplates
public PageResponse<ContentTemplate> getContentTemplates(String spaceKey, int start, int limit, String expand, @Context javax.ws.rs.core.UriInfo uriInfo) Returns all content templates of the space specified.
Example request URI:
http://example.com/confluence/rest/experimental/template/page?expand=body&limit=10
- Parameters:
spaceKey
- space key, global if not specified.start
- the start point of the paged response to return.limit
- the limit of response pageexpand
- a comma-separated list of properties to expand in the response.uriInfo
- injected by Jersey- Returns:
ContentTemplate
PageResponse of ContentTemplate
-
getContentTemplate
Return the template identified by id.- Parameters:
id
-ContentTemplateId
Id could contains a long, or uuid or ModuleCompletekeysexpand
- a comma-separated list of properties to expand in the response.- Returns:
ContentTemplate
ContentTemplate
-
createContentTemplate
Create a contentTemplate, this means creating a new page template or a customised blueprint template.- Parameters:
contentTemplate
- ContentTemplate to create.expand
- a comma-separated list of properties to expand in the response.- Returns:
ContentTemplate
ContentTemplate created.
-
updateContentTemplate
Update/Edit an existing contentTemplate. contentTemplateIdWithId is used to find the template to update. As the original template already saved in database, it already has a long entity id.- Parameters:
contentTemplate
- update the existing contentTemplate with this oneexpand
- a comma-separated list of properties to expand in the response.- Returns:
ContentTemplate
ContentTemplate updated.
-
removeTemplate
Delete an existing customised contentTemplate, for blueprint template this means revert to default template from plugin and remove the customised version of template. Revert a space level template, then global template will become used if there is a customised version.- Parameters:
contentTemplateId
-ContentTemplateId.ContentTemplateIdWithId
This has to be a long entity id, as template is already existed before you can delete or revoke.- Returns:
- noContent
-
createInstance
public ContentBlueprintInstance createInstance(ContentBlueprintInstance contentBlueprintInstance, ContentTemplateId contentTemplateId, String expand)
-