Interface DatasourceResource
@Path("/datasource")
public interface DatasourceResource
Resource for management of datasources
-
Method Summary
Modifier and TypeMethodDescriptionaddEntry
(String id, DatasourceEntryModel item) Create a datasource entry in the datasourceconstructs
(String id, SortParameterBean sorting, FilterParameterBean filter, PagingParameterBean paging, EmbedParameterBean embed) Get the constructs using the datasource.
The result can be filtered byid
globalId
keyword
name
description
category
and sorted byid
globalId
keyword
name
description
category
create
(Datasource datasource) Create new datasourcejavax.ws.rs.core.Response
Delete a datasourcejavax.ws.rs.core.Response
deleteEntry
(String id, String entryId) Delete a datasource entryGet existing datasourceGet existing datasource entrylist
(SortParameterBean sorting, FilterParameterBean filter, PagingParameterBean paging) List datasources.
The result can be filtered byid
globalId
name
type
and sorted byid
globalId
name
type
listEntries
(String id) List entries of a datasourceupdate
(String id, Datasource datasource) Update a datasourceupdateEntry
(String id, String entryId, DatasourceEntryModel item) Update a datasource entryupdateEntryList
(String id, List<DatasourceEntryModel> items) Update the entries in the given order
-
Method Details
-
list
@GET PagedDatasourceListResponse list(@BeanParam SortParameterBean sorting, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging) throws Exception List datasources.
The result can be filtered byid
globalId
name
type
id
globalId
name
type
- Parameters:
sorting
- sort parametersfilter
- filter parameterpaging
- paging parameters- Returns:
- response containing a list of datasources
- Throws:
Exception
-
create
Create new datasource- Parameters:
datasource
- datasource- Returns:
- response containing created datasource
- Throws:
Exception
-
get
Get existing datasource- Parameters:
id
- datasource ID- Returns:
- response containing the datasource
- Throws:
Exception
-
update
@PUT @Path("/{id}") DatasourceLoadResponse update(@PathParam("id") String id, Datasource datasource) throws Exception Update a datasource- Parameters:
id
- datasource IDdatasource
- updated datasource data- Returns:
- response containing the updated datasource
- Throws:
Exception
-
delete
@DELETE @Path("/{id}") javax.ws.rs.core.Response delete(@PathParam("id") String id) throws Exception Delete a datasource- Parameters:
id
- datasource ID- Returns:
- empty response
- Throws:
Exception
-
constructs
@GET @Path("/{id}/constructs") ConstructList constructs(@PathParam("id") String id, @BeanParam SortParameterBean sorting, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging, @BeanParam EmbedParameterBean embed) throws Exception Get the constructs using the datasource.
The result can be filtered byid
globalId
keyword
name
description
category
id
globalId
keyword
name
description
category
- Parameters:
id
- datasource idsorting
- sort parametersfilter
- filter parameterpaging
- paging parametersembed
- optionally embed the referenced objects (category)- Returns:
- response containing a list of constructs using the datasource
- Throws:
Exception
-
listEntries
@GET @Path("/{id}/entries") DatasourceEntryListResponse listEntries(@PathParam("id") String id) throws Exception List entries of a datasource- Parameters:
id
- datasource id- Returns:
- response containing a list of entries
- Throws:
Exception
-
addEntry
@POST @Path("/{id}/entries") DatasourceEntryResponse addEntry(@PathParam("id") String id, DatasourceEntryModel item) throws Exception Create a datasource entry in the datasource- Parameters:
id
- datasource iditem
- datasource entry- Returns:
- response containing the created entry
- Throws:
Exception
-
getEntry
@GET @Path("/{id}/entries/{entryId}") DatasourceEntryResponse getEntry(@PathParam("id") String id, @PathParam("entryId") String entryId) throws Exception Get existing datasource entry- Parameters:
id
- datasource identryId
- datasource entry id- Returns:
- response containing the entry
- Throws:
Exception
-
updateEntry
@PUT @Path("/{id}/entries/{entryId}") DatasourceEntryResponse updateEntry(@PathParam("id") String id, @PathParam("entryId") String entryId, DatasourceEntryModel item) throws Exception Update a datasource entry- Parameters:
id
- datasource identryId
- datasource entry iditem
- updated entry- Returns:
- response containing the updated entry
- Throws:
Exception
-
deleteEntry
@DELETE @Path("/{id}/entries/{entryId}") javax.ws.rs.core.Response deleteEntry(@PathParam("id") String id, @PathParam("entryId") String entryId) throws Exception Delete a datasource entry- Parameters:
id
- datasource identryId
- datasource entry id- Returns:
- empty response
- Throws:
Exception
-
updateEntryList
@PUT @Path("/{id}/entries") DatasourceEntryListResponse updateEntryList(@PathParam("id") String id, List<DatasourceEntryModel> items) throws Exception Update the entries in the given order- Parameters:
id
- datasource iditems
- list of entries- Returns:
- response containing the list of updated entries
- Throws:
Exception
-