Interface ConstructResource


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

      • 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
      • 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
      • 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
      • 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
      • 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