@ExperimentalApi public class TemplateResource extends Object
Constructor and Description |
---|
TemplateResource(ContentTemplateService contentTemplateService) |
Modifier and Type | Method and Description |
---|---|
ContentTemplate |
createContentTemplate(ContentTemplate contentTemplate,
String expand)
Create a contentTemplate, this means creating a new page template or a customised blueprint template.
|
ContentBlueprintInstance |
createInstance(ContentBlueprintInstance contentBlueprintInstance,
ContentTemplateId contentTemplateId,
String expand) |
PageResponse<ContentTemplate> |
getBlueprintTemplates(String spaceKey,
int start,
int limit,
String expand,
javax.ws.rs.core.UriInfo uriInfo)
Returns all blueprint templates of the space specified.
|
ContentTemplate |
getContentTemplate(ContentTemplateId id,
String expand)
Return the template identified by id.
|
PageResponse<ContentTemplate> |
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.
|
ContentTemplate |
updateContentTemplate(ContentTemplate contentTemplate,
String expand)
Update/Edit an existing contentTemplate.
|
public TemplateResource(ContentTemplateService contentTemplateService)
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
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 URIContentTemplate
PageResponse of ContentTemplatepublic 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
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 JerseyContentTemplate
PageResponse of ContentTemplatepublic ContentTemplate getContentTemplate(ContentTemplateId id, String expand)
id
- ContentTemplateId
Id could contains a long, or uuid or ModuleCompletekeysexpand
- a comma-separated list of properties to expand in the response.ContentTemplate
ContentTemplatepublic ContentTemplate createContentTemplate(ContentTemplate contentTemplate, String expand)
contentTemplate
- ContentTemplate to create.expand
- a comma-separated list of properties to expand in the response.ContentTemplate
ContentTemplate created.public ContentTemplate updateContentTemplate(ContentTemplate contentTemplate, String expand)
contentTemplate
- update the existing contentTemplate with this oneexpand
- a comma-separated list of properties to expand in the response.ContentTemplate
ContentTemplate updated.public javax.ws.rs.core.Response removeTemplate(ContentTemplateId contentTemplateId)
contentTemplateId
- ContentTemplateId.ContentTemplateIdWithId
This has to be a long entity id, as template is already existed before you can delete or revoke.public ContentBlueprintInstance createInstance(ContentBlueprintInstance contentBlueprintInstance, ContentTemplateId contentTemplateId, String expand)
Copyright © 2003–2020 Atlassian. All rights reserved.