Interface MCTemplateResource
@Produces("application/json")
@Consumes("application/json")
@Path("/template")
public interface MCTemplateResource
Resource for handling multichannelling aspects of templates.
-
Method Summary
Modifier and TypeMethodDescriptiongetLocalizationInfo(String id, Integer nodeId) Get localization info for a template for a given channel and all master channelsgetLocalizationInfo(List<Integer> ids, Integer nodeId) Get localization info for a list of templates for a given channel and all master channelsgetSyncableObjects(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.localizations(Integer id) Get the IDs an their respective node IDs of localized copies of the specified template.com.gentics.contentnode.rest.model.response.GenericResponselocalize(String id, LocalizeRequest request) Localize the given templatecom.gentics.contentnode.rest.model.response.GenericResponsepushToMaster(MultiPushToMasterRequest request) Push a list of templates from a channel into a mastercom.gentics.contentnode.rest.model.response.GenericResponsepushToMaster(Integer id, PushToMasterRequest request) Push a template from a channel into a mastercom.gentics.contentnode.rest.model.response.GenericResponseunlocalize(MultiUnlocalizeRequest request) Unlocalize templates in a channelcom.gentics.contentnode.rest.model.response.GenericResponseunlocalize(Integer id, UnlocalizeRequest request) Unlocalize the given template
-
Method Details
-
getSyncableObjects
@GET @Path("/usage/syncableObjects") ReferencedSyncableObjectsListResponse getSyncableObjects(@QueryParam("ids") List<Integer> templateIds, @QueryParam("srcNodeId") Integer srcNodeId, @QueryParam("dstNodeId") Integer dstNodeId) throws Exception 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. Linked objects are pages, files and images specified inUrlPartTypesof content or object tags. Direct dependencies are in thepages,filesandimagesfiles of the response. Indirect dependencies are mapped independencies.- Parameters:
templateIds- The IDs of the templates to get linked objects forsrcNodeId- The channel ID of the source channeldstNodeId- The channel ID of the target channel- Throws:
Exception
-
pushToMaster
@POST @Path("/push2master/{id}") com.gentics.contentnode.rest.model.response.GenericResponse pushToMaster(@PathParam("id") Integer id, PushToMasterRequest request) throws Exception Push a template from a channel into a master- Parameters:
id- id of the templaterequest- request- Returns:
- generic response
- Throws:
Exception
-
pushToMaster
@POST @Path("/push2master") com.gentics.contentnode.rest.model.response.GenericResponse pushToMaster(MultiPushToMasterRequest request) throws Exception Push a list of templates from a channel into a master- Parameters:
request- request- Returns:
- generic response
- Throws:
Exception
-
localize
@POST @Path("/localize/{id}") com.gentics.contentnode.rest.model.response.GenericResponse localize(@PathParam("id") String id, LocalizeRequest request) throws Exception Localize the given template- Parameters:
id- ID of the templaterequest- request- Returns:
- generic response
- Throws:
Exception
-
unlocalize
@POST @Path("/unlocalize/{id}") com.gentics.contentnode.rest.model.response.GenericResponse unlocalize(@PathParam("id") Integer id, UnlocalizeRequest request) throws Exception Unlocalize the given template- Parameters:
id- id of the template to unlocalizerequest- request- Returns:
- generic response
- Throws:
Exception
-
unlocalize
@POST @Path("/unlocalize") com.gentics.contentnode.rest.model.response.GenericResponse unlocalize(MultiUnlocalizeRequest request) throws Exception Unlocalize templates in a channel- Parameters:
request- request- Returns:
- generic response
- Throws:
Exception
-
getLocalizationInfo
@GET @Path("/localizationinfo") LocalizationInfo getLocalizationInfo(@QueryParam("id") List<Integer> ids, @QueryParam("nodeId") Integer nodeId) throws Exception Get localization info for a list of templates for a given channel and all master channels- Parameters:
ids- list of template idsnodeId- id of the node to start with- Returns:
- localization info
- Throws:
Exception
-
getLocalizationInfo
@GET @Path("/localizationinfo/{id}") LocalizationInfo getLocalizationInfo(@PathParam("id") String id, @QueryParam("nodeId") Integer nodeId) throws Exception Get localization info for a template for a given channel and all master channels- Parameters:
id- id of the template. This can either be the local or global id of the template.nodeId- id of the node to start with- Returns:
- localization info
- Throws:
Exception
-
localizations
@GET @Path("/localizations/{id}") LocalizationsResponse localizations(@PathParam("id") Integer id) throws Exception Get the IDs an their respective node IDs of localized copies of the specified template.- Parameters:
id- The ID of the master template.- Returns:
- A map of template IDs to node IDs of localized copies.
- Throws:
Exception
-