Interface ConstructResource
@Produces("application/json")
@Consumes("application/json")
@Path("/construct")
public interface ConstructResource
Resource for handling constructs
-
Method Summary
Modifier and TypeMethodDescriptionCreate new constructcreateCategory
(ConstructCategory category) Create a new construct categoryDelete a constructdeleteCategory
(String constructCategoryId) Delete the construct category by its IDdeletePart
(String constructId, String idOrKeyname) Delete a part of a construct.get
(String id, EmbedParameterBean embed) Get existing constructgetCategory
(String categoryId) Load the construct category by its IDlink
(BulkLinkUpdateRequest request) Link a set of constructs to the selected nodeslist
(FilterParameterBean filter, SortParameterBean sorting, PagingParameterBean paging, ConstructParameterBean constructFilter, PermsParameterBean perms, EmbedParameterBean embed) Get the list of constructs.
The result can be filtered bykeyword
name
description
and sorted byid
globalId
keyword
name
description
list
(Integer skipCount, Integer maxItems, String search, Boolean changeable, Integer pageId, Integer nodeId, Integer categoryId, List<Integer> partTypeId, ConstructSortAttribute sortBy, SortOrder sortOrder) Deprecated.listCategories
(SortParameterBean sorting, FilterParameterBean filter, PagingParameterBean paging, EmbedParameterBean embed) List all construct categories.
The result can be filtered byid
globalId
name
and sorted byid
globalId
name
sortOrder
listConstructNodes
(String constructId) Return a list of nodes, linked to the the given Constructload
(Integer id, EmbedParameterBean embed) Load the insertable construct and it's categories for a given constructIdsortCategories
(IdSetRequest categoryOrder) unlink
(BulkLinkUpdateRequest request) Unlink a set of constructs from the selected nodesUpdate a constructupdateCategory
(String constructCategoryId, ConstructCategory category) Edit the construct category by its ID
-
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 bykeyword
name
description
id
globalId
keyword
name
description
- Parameters:
filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersconstructFilter
- construct filter parametersperms
- permissions parametersembed
- 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 IDembed
- 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 itemschangeable
- true to only get changeable constructs, false for only getting not changeable items. Leave empty to get allpageId
- ID of the page form which to get constructs.nodeId
- ID of the node for getting constructs linked to a nodecategoryId
- ID of the category for filteringpartTypeId
- IDs of part types for filteringsortBy
- attribute for sortingsortOrder
- 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 inidOrKeyname
- 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
- constructnodeIds
- 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 IDembed
- 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 IDconstruct
- updated construct datanodeIds
- IDs of new node assignments- Returns:
- response containing the updated construct
- Throws:
Exception
-
delete
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 byid
globalId
name
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
Link a set of constructs to the selected nodes- Parameters:
request
- POST body with source + target IDs- Returns:
- general success response
- Throws:
Exception
-
unlink
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
-