Interface MCTemplateResource


@Produces("application/json") @Consumes("application/json") @Path("/template") public interface MCTemplateResource
Resource for handling multichannelling aspects of templates.
  • 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 in 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.
      Parameters:
      templateIds - The IDs of the templates to get linked objects for
      srcNodeId - The channel ID of the source channel
      dstNodeId - 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 template
      request - 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 template
      request - 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 unlocalize
      request - 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 ids
      nodeId - 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