@Path(value="/template")
public interface TemplateResource
Modifier and Type | Method and Description |
---|---|
TemplateLoadResponse |
copy(String id,
TemplateCopyRequest request)
Create a copy of the template
|
TemplateLoadResponse |
create(TemplateCreateRequest request)
Create a new template
|
javax.ws.rs.core.Response |
delete(String id)
Delete the template with given id
|
PagedFolderListResponse |
folders(String id,
SortParameterBean sort,
FilterParameterBean filter,
PagingParameterBean paging)
Get the folders to which the template is assigned.
The result can be filtered by id
name
description
and sorted by
id
name
description
|
TemplateLoadResponse |
get(String id,
Integer nodeId,
boolean update,
boolean construct)
Load the template with the given id and return it.
|
LocalizationInfo |
getLocalizationInfo(List<Integer> ids,
Integer nodeId)
Get localization info for a list of templates for a given channel and all master channels
|
LocalizationInfo |
getLocalizationInfo(String id,
Integer nodeId)
Get localization info for a template for a given channel and all master channels
|
ReferencedSyncableObjectsListResponse |
getSyncableObjects(List<Integer> templateIds,
Integer srcNodeId,
Integer dstNodeId)
Get objects which are directly or indirectly linked by the specified templates,
which can be synchronised to a master channel along with the templates themselves.
|
TagListResponse |
getTags(String id,
Integer skipCount,
Integer maxItems,
TagSortAttribute sortBy,
SortOrder sortOrder,
String search)
Get the list of templatetags for this template
|
ImplementationHashResponse |
implementationHash(String id)
Get the implementation hash for a template
|
GenericResponse |
link(MultiLinkRequest request)
Link the given templates to the given folders.
|
GenericResponse |
link(String id,
LinkRequest request)
Link the given template to the given folders.
|
TemplateInNodeResponse |
list(List<String> nodeIds,
FilterParameterBean filterParams,
SortParameterBean sortingParams,
PagingParameterBean pagingParams,
PermsParameterBean perms)
List templates assigned to the given list of nodes.
The result can be filtered by id
name
description
and sorted by
id
name
description
cdate
edate
|
TemplateLoadResponse |
load(String id,
Integer nodeId)
Deprecated.
Use
GET /template/{id} instead |
LocalizationsResponse |
localizations(Integer id)
Get the IDs an their respective node IDs of localized copies of the
specified template.
|
GenericResponse |
localize(String id,
LocalizeRequest request)
Localize the given template
|
NodeList |
nodes(String id,
SortParameterBean sort,
FilterParameterBean filter,
PagingParameterBean paging)
Get the nodes to which the template is assigned.
The result can be filtered by id
name
and sorted by
id
name
|
GenericResponse |
pushToMaster(Integer id,
PushToMasterRequest request)
Push a template from a channel into a master
|
GenericResponse |
pushToMaster(MultiPushToMasterRequest request)
Push a list of templates from a channel into a master
|
TagStatusResponse |
tagStatus(String id,
SortParameterBean sort,
FilterParameterBean filter,
PagingParameterBean paging)
Get the tag status for a template.
|
GenericResponse |
unlink(MultiLinkRequest request)
Unlink the given templates from the given folders.
|
GenericResponse |
unlink(String id,
LinkRequest request)
Unlink the given template from the given folders.
|
GenericResponse |
unlocalize(Integer id,
UnlocalizeRequest request)
Unlocalize the given template
|
GenericResponse |
unlocalize(MultiUnlocalizeRequest request)
Unlocalize templates in a channel
|
TemplateLoadResponse |
unlock(String id)
Unlock a template
|
GenericResponse |
update(String id,
TemplateSaveRequest request)
Update the template with given id
|
@GET TemplateInNodeResponse list(@QueryParam(value="nodeId") List<String> nodeIds, @BeanParam FilterParameterBean filterParams, @BeanParam SortParameterBean sortingParams, @BeanParam PagingParameterBean pagingParams, @BeanParam PermsParameterBean perms) throws Exception
id
name
description
id
name
description
cdate
edate
nodeIds
- list of node IDsfilterParams
- filter parameterssortingParams
- sorting parameterspagingParams
- paging parametersperms
- permissions parametersException
@POST TemplateLoadResponse create(TemplateCreateRequest request) throws Exception
request
- create requestException
@GET @Path(value="/{id}") TemplateLoadResponse get(@PathParam(value="id") String id, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="update") @DefaultValue(value="false") boolean update, @QueryParam(value="construct") @DefaultValue(value="false") boolean construct) throws Exception
id
- The template id (either local or global)nodeId
- channel idupdate
- true when the template shall be locked, false if notconstruct
- if true, the construct info will be added to tagsException
@GET @Path(value="/{id}/hash") ImplementationHashResponse implementationHash(@PathParam(value="id") String id) throws Exception
id
- template IDException
@POST @Path(value="/{id}") GenericResponse update(@PathParam(value="id") String id, TemplateSaveRequest request) throws Exception
id
- The template id (either local or global)request
- template update requestException
@POST @Path(value="/{id}/unlock") TemplateLoadResponse unlock(@PathParam(value="id") String id) throws Exception
id
- template id (either local or global)Exception
@DELETE @Path(value="/{id}") javax.ws.rs.core.Response delete(@PathParam(value="id") String id) throws Exception
id
- The template id (either local or global)Exception
@GET @Path(value="/{id}/folders") PagedFolderListResponse folders(@PathParam(value="id") String id, @BeanParam SortParameterBean sort, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging) throws Exception
id
name
description
id
name
description
id
- template IDsort
- sort parametersfilter
- filter parameterspaging
- paging parametersException
@GET @Path(value="/{id}/nodes") NodeList nodes(@PathParam(value="id") String id, @BeanParam SortParameterBean sort, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging) throws Exception
id
name
id
name
id
- template IDsort
- sort parametersfilter
- filter parameterspaging
- paging parametersException
@GET @Path(value="/load/{id}") @Deprecated TemplateLoadResponse load(@PathParam(value="id") String id, @QueryParam(value="nodeId") Integer nodeId) throws Exception
GET /template/{id}
insteadid
- The template idnodeId
- channel idException
@GET @Path(value="/getTags/{id}") TagListResponse getTags(@PathParam(value="id") String id, @QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="sortby") @DefaultValue(value="name") TagSortAttribute sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") SortOrder sortOrder, @QueryParam(value="search") String search) throws Exception
id
- id of the template. The local or global idException
@GET @Path(value="/usage/syncableObjects") ReferencedSyncableObjectsListResponse getSyncableObjects(@QueryParam(value="ids") List<Integer> templateIds, @QueryParam(value="srcNodeId") Integer srcNodeId, @QueryParam(value="dstNodeId") Integer dstNodeId) throws Exception
UrlPartTypes
of
content or object tags.
Direct dependencies are in the pages
,
files
and
images
files of the response. Indirect
dependencies are mapped in dependencies
.templateIds
- The IDs of the templates to get linked objects forsrcNodeId
- The channel ID of the source channeldstNodeId
- The channel ID of the target channelException
@POST @Path(value="/push2master/{id}") GenericResponse pushToMaster(@PathParam(value="id") Integer id, PushToMasterRequest request) throws Exception
id
- id of the templaterequest
- requestException
@POST @Path(value="/push2master") GenericResponse pushToMaster(MultiPushToMasterRequest request) throws Exception
request
- requestException
@POST @Path(value="/localize/{id}") GenericResponse localize(@PathParam(value="id") String id, LocalizeRequest request) throws Exception
id
- ID of the templaterequest
- requestException
@POST @Path(value="/unlocalize/{id}") GenericResponse unlocalize(@PathParam(value="id") Integer id, UnlocalizeRequest request) throws Exception
id
- id of the template to unlocalizerequest
- requestException
@POST @Path(value="/unlocalize") GenericResponse unlocalize(MultiUnlocalizeRequest request) throws Exception
request
- requestException
@GET @Path(value="/localizationinfo") LocalizationInfo getLocalizationInfo(@QueryParam(value="id") List<Integer> ids, @QueryParam(value="nodeId") Integer nodeId) throws Exception
ids
- list of template idsnodeId
- id of the node to start withException
@GET @Path(value="/localizationinfo/{id}") LocalizationInfo getLocalizationInfo(@PathParam(value="id") String id, @QueryParam(value="nodeId") Integer nodeId) throws Exception
id
- id of the template. This can either be the local or global id of the template.nodeId
- id of the node to start withException
@GET @Path(value="/localizations/{id}") LocalizationsResponse localizations(@PathParam(value="id") Integer id) throws Exception
id
- The ID of the master template.Exception
@POST @Path(value="/link/{id}") GenericResponse link(@PathParam(value="id") String id, LinkRequest request) throws Exception
id
- id of the templaterequest
- request containing the list of folders and other dataException
@POST @Path(value="/link") GenericResponse link(MultiLinkRequest request) throws Exception
request
- request containing the list of folders and other dataException
@POST @Path(value="/unlink/{id}") GenericResponse unlink(@PathParam(value="id") String id, LinkRequest request) throws Exception
id
- id of the templaterequest
- request containing the list of folders and other dataException
@POST @Path(value="/unlink") GenericResponse unlink(MultiLinkRequest request) throws Exception
request
- request containing the list of folders and other dataException
@GET @Path(value="/{id}/tagstatus") TagStatusResponse tagStatus(@PathParam(value="id") String id, @BeanParam SortParameterBean sort, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging) throws Exception
name
name
id
- template IDsort
- sort parametersfilter
- filter parameterspaging
- paging parametersException
@POST @Path(value="/{id}/copy") TemplateLoadResponse copy(@PathParam(value="id") String id, TemplateCopyRequest request) throws Exception
id
- template idrequest
- copy requestException
Copyright © 2024 Gentics Software. All rights reserved.