Interface ConstructResource


@Produces("application/json") @Consumes("application/json") @Path("/construct") public interface ConstructResource
Resource for handling constructs
  • Method Details

    • list

      @GET PagedConstructListResponse list(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam ConstructParameterBean constructFilter, @BeanParam PermsParameterBean perms, @BeanParam EmbedParameterBean embed) throws Exception
      Get the list of constructs.
      The result can be filtered by
      • keyword
      • name
      • description
      and sorted by
      • id
      • globalId
      • keyword
      • name
      • description
      Parameters:
      filter - filter parameters
      sorting - sorting parameters
      paging - paging parameters
      constructFilter - construct filter parameters
      perms - permissions parameters
      embed - optionally embed the referenced objects (category)
      Returns:
      response containing a list of constructs
      Throws:
      Exception
    • load

      @GET @Path("/load/{constructId}") ConstructLoadResponse load(@PathParam("constructId") Integer id, @BeanParam EmbedParameterBean embed) throws Exception
      Load the insertable construct and it's categories for a given constructId
      Parameters:
      id - construct ID
      embed - optionally embed the referenced objects (category)
      Returns:
      response containing the construct
      Throws:
      Exception
    • list

      @GET @Path("/list") ConstructListResponse list(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("search") String search, @QueryParam("changeable") Boolean changeable, @QueryParam("pageId") Integer pageId, @QueryParam("nodeId") Integer nodeId, @QueryParam("category") Integer categoryId, @QueryParam("partTypeId") List<Integer> partTypeId, @QueryParam("sortby") ConstructSortAttribute sortBy, @QueryParam("sortorder") @DefaultValue("asc") SortOrder sortOrder) throws Exception
      Deprecated.
      Get the list of constructs that are used by the tags in the given page. This includes any constructs that exist in other nodes but are nevertheless used by tags in this page.
      Parameters:
      skipCount - number of items to be skipped (paging)
      maxItems - maximum number of items to be returned (paging). -1 for getting all items.
      search - search string for filtering items
      changeable - true to only get changeable constructs, false for only getting not changeable items. Leave empty to get all
      pageId - ID of the page form which to get constructs.
      nodeId - ID of the node for getting constructs linked to a node
      categoryId - ID of the category for filtering
      partTypeId - IDs of part types for filtering
      sortBy - attribute for sorting
      sortOrder - sort order
      Returns:
      list of constructs
      Throws:
      Exception
      See Also:
      • ConstructResource#list()
    • deletePart

      @POST @Path("/delete/{constructId}/{idOrKeyname}") GenericResponse deletePart(@PathParam("constructId") String constructId, @PathParam("idOrKeyname") String idOrKeyname) throws Exception
      Delete a part of a construct. Since the passed part ID is unique across all constructs, the construct doesn't have to be specified. This will not delete the datasource entries for an overview part, they are deleted when the construct is deleted.
      Parameters:
      constructId - The ID of the construct where the part is in
      idOrKeyname - The ID or the keyword of the part to delete. It will first try to delete by ID, if the value is numeric.
      Returns:
      Response object
      Throws:
      Exception
    • create

      @POST ConstructLoadResponse create(Construct construct, @QueryParam("nodeId") List<Integer> nodeIds) throws Exception
      Create new construct
      Parameters:
      construct - construct
      nodeIds - IDs of node assignments, mandatory
      Returns:
      response containing created construct
      Throws:
      Exception
    • get

      @GET @Path("/{id}") ConstructLoadResponse get(@PathParam("id") String id, @BeanParam EmbedParameterBean embed) throws Exception
      Get existing construct
      Parameters:
      id - construct ID
      embed - optionally embed the referenced objects (category)
      Returns:
      response containing the construct
      Throws:
      Exception
    • update

      @PUT @Path("/{id}") ConstructLoadResponse update(@PathParam("id") String id, Construct construct, @QueryParam("nodeId") List<Integer> nodeIds) throws Exception
      Update a construct
      Parameters:
      id - construct ID
      construct - updated construct data
      nodeIds - IDs of new node assignments
      Returns:
      response containing the updated construct
      Throws:
      Exception
    • delete

      @DELETE @Path("/{id}") GenericResponse delete(@PathParam("id") String id) throws Exception
      Delete a construct
      Parameters:
      id - construct ID
      Returns:
      empty response
      Throws:
      Exception
    • createCategory

      @POST @Path("/category") ConstructCategoryLoadResponse createCategory(ConstructCategory category) throws Exception
      Create a new construct category
      Parameters:
      category - new category REST model
      Returns:
      response containing the construct category
      Throws:
      Exception
    • getCategory

      @GET @Path("/category/{id}") ConstructCategoryLoadResponse getCategory(@PathParam("id") String categoryId) throws Exception
      Load the construct category by its ID
      Parameters:
      categoryId - construct category ID
      Returns:
      response containing the construct category
      Throws:
      Exception
    • updateCategory

      @PUT @Path("/category/{id}") ConstructCategoryLoadResponse updateCategory(@PathParam("id") String constructCategoryId, ConstructCategory category) throws Exception
      Edit the construct category by its ID
      Parameters:
      constructCategoryId - construct category ID
      Returns:
      response containing the updated category
      Throws:
      Exception
    • deleteCategory

      @DELETE @Path("/category/{id}") GenericResponse deleteCategory(@PathParam("id") String constructCategoryId) throws Exception
      Delete the construct category by its ID
      Parameters:
      constructCategoryId - construct category ID
      Returns:
      general success response
      Throws:
      Exception
    • listCategories

      @GET @Path("/category") ConstructCategoryListResponse listCategories(@BeanParam SortParameterBean sorting, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging, @BeanParam EmbedParameterBean embed) throws Exception
      List all construct categories.
      The result can be filtered by
      • id
      • globalId
      • name
      and sorted by
      • id
      • globalId
      • name
      • sortOrder
      Returns:
      response with categories list
      Throws:
      Exception
    • sortCategories

      @POST @Path("/category/sortorder") ConstructCategoryListResponse sortCategories(IdSetRequest categoryOrder) throws Exception
      Throws:
      Exception
    • link

      @POST @Path("/link/nodes") GenericResponse link(BulkLinkUpdateRequest request) throws Exception
      Link a set of constructs to the selected nodes
      Parameters:
      request - POST body with source + target IDs
      Returns:
      general success response
      Throws:
      Exception
    • unlink

      @POST @Path("/unlink/nodes") GenericResponse unlink(BulkLinkUpdateRequest request) throws Exception
      Unlink a set of constructs from the selected nodes
      Parameters:
      request - POST body with source + target IDs
      Returns:
      general success response
      Throws:
      Exception
    • listConstructNodes

      @GET @Path("/{id}/nodes") NodeList listConstructNodes(@PathParam("id") String constructId) throws Exception
      Return a list of nodes, linked to the the given Construct
      Parameters:
      constructId -
      Returns:
      Throws:
      Exception