@Produces(value={"application/json","application/xml"})
@Consumes(value={"application/json","application/xml"})
@Path(value="/construct")
public interface ConstructResource
Modifier and Type | Method and Description |
---|---|
ConstructLoadResponse |
create(Construct construct,
List<Integer> nodeIds)
Create new construct
|
ConstructCategoryLoadResponse |
createCategory(ConstructCategory category)
Create a new construct category
|
GenericResponse |
delete(String id)
Delete a construct
|
GenericResponse |
deleteCategory(String constructCategoryId)
Delete the construct category by its ID
|
GenericResponse |
deletePart(String constructId,
String idOrKeyname)
Delete a part of a construct.
|
ConstructLoadResponse |
get(String id)
Get existing construct
|
ConstructCategoryLoadResponse |
getCategory(String categoryId)
Load the construct category by its ID
|
ImplementationHashResponse |
implementationHash(String id)
Get the implementation hash for a construct
|
GenericResponse |
link(BulkLinkUpdateRequest request)
Link a set of constructs to the selected nodes
|
PagedConstructListResponse |
list(FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
ConstructParameterBean constructFilter,
PermsParameterBean perms)
Get the list of constructs.
The result can be filtered by keyword
name
description
and sorted by
id
globalId
keyword
name
description
|
ConstructListResponse |
list(Integer skipCount,
Integer maxItems,
String search,
Boolean changeable,
Integer pageId,
Integer nodeId,
Integer categoryId,
List<Integer> partTypeId,
ConstructSortAttribute sortBy,
SortOrder sortOrder)
Deprecated.
|
ConstructCategoryListResponse |
listCategories(SortParameterBean sorting,
FilterParameterBean filter,
PagingParameterBean paging,
EmbedParameterBean embed)
List all construct categories.
The result can be filtered by id
globalId
name
and sorted by
id
globalId
name
|
NodeList |
listConstructNodes(String constructId)
Return a list of nodes, linked to the the given Construct
|
ConstructLoadResponse |
load(Integer id)
Load the insertable construct and it's categories for a given constructId
|
GenericResponse |
unlink(BulkLinkUpdateRequest request)
Unlink a set of constructs from the selected nodes
|
ConstructLoadResponse |
update(String id,
Construct construct,
List<Integer> nodeIds)
Update a construct
|
ConstructCategoryLoadResponse |
updateCategory(String constructCategoryId,
ConstructCategory category)
Edit the construct category by its ID
|
@GET PagedConstructListResponse list(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam ConstructParameterBean constructFilter, @BeanParam PermsParameterBean perms) throws Exception
keyword
name
description
id
globalId
keyword
name
description
filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersconstructFilter
- construct filter parametersperms
- permissions parametersException
@GET @Path(value="/load/{constructId}") ConstructLoadResponse load(@PathParam(value="constructId") Integer id) throws Exception
id
- construct IDException
@GET @Path(value="/list") ConstructListResponse list(@QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="search") String search, @QueryParam(value="changeable") Boolean changeable, @QueryParam(value="pageId") Integer pageId, @QueryParam(value="nodeId") Integer nodeId, @QueryParam(value="category") Integer categoryId, @QueryParam(value="partTypeId") List<Integer> partTypeId, @QueryParam(value="sortby") ConstructSortAttribute sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") SortOrder sortOrder) throws Exception
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 orderException
ConstructResource#list()
@POST @Path(value="/delete/{constructId}/{idOrKeyname}") GenericResponse deletePart(@PathParam(value="constructId") String constructId, @PathParam(value="idOrKeyname") String idOrKeyname) throws Exception
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.Exception
@POST ConstructLoadResponse create(Construct construct, @QueryParam(value="nodeId") List<Integer> nodeIds) throws Exception
construct
- constructnodeIds
- IDs of node assignments, mandatoryException
@GET @Path(value="/{id}") ConstructLoadResponse get(@PathParam(value="id") String id) throws Exception
id
- construct IDException
@GET @Path(value="/{id}/hash") ImplementationHashResponse implementationHash(@PathParam(value="id") String id) throws Exception
id
- construct IDException
@PUT @Path(value="/{id}") ConstructLoadResponse update(@PathParam(value="id") String id, Construct construct, @QueryParam(value="nodeId") List<Integer> nodeIds) throws Exception
id
- construct IDconstruct
- updated construct datanodeIds
- IDs of new node assignmentsException
@DELETE @Path(value="/{id}") GenericResponse delete(@PathParam(value="id") String id) throws Exception
id
- construct IDException
@POST @Path(value="/category") ConstructCategoryLoadResponse createCategory(ConstructCategory category) throws Exception
category
- new category REST modelException
@GET @Path(value="/category/{id}") ConstructCategoryLoadResponse getCategory(@PathParam(value="id") String categoryId) throws Exception
categoryId
- construct category IDException
@PUT @Path(value="/category/{id}") ConstructCategoryLoadResponse updateCategory(@PathParam(value="id") String constructCategoryId, ConstructCategory category) throws Exception
constructCategoryId
- construct category IDException
@DELETE @Path(value="/category/{id}") GenericResponse deleteCategory(@PathParam(value="id") String constructCategoryId) throws Exception
constructCategoryId
- construct category IDException
@GET @Path(value="/category") ConstructCategoryListResponse listCategories(@BeanParam SortParameterBean sorting, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging, @BeanParam EmbedParameterBean embed) throws Exception
id
globalId
name
id
globalId
name
Exception
@POST @Path(value="/link/nodes") GenericResponse link(BulkLinkUpdateRequest request) throws Exception
request
- POST body with source + target IDsException
@POST @Path(value="/unlink/nodes") GenericResponse unlink(BulkLinkUpdateRequest request) throws Exception
request
- POST body with source + target IDsException
Copyright © 2024 Gentics Software. All rights reserved.