Interface DatasourceResource


@Path("/datasource") public interface DatasourceResource
Resource for management of datasources
  • Method Details

    • list

      @GET PagedDatasourceListResponse list(@BeanParam SortParameterBean sorting, @BeanParam FilterParameterBean filter, @BeanParam PagingParameterBean paging) throws Exception
      List datasources.
      The result can be filtered by
      • id
      • globalId
      • name
      • type
      and sorted by
      • id
      • globalId
      • name
      • type
      Parameters:
      sorting - sort parameters
      filter - filter parameter
      paging - paging parameters
      Returns:
      response containing a list of datasources
      Throws:
      Exception
    • create

      @POST DatasourceLoadResponse create(Datasource datasource) throws Exception
      Create new datasource
      Parameters:
      datasource - datasource
      Returns:
      response containing created datasource
      Throws:
      Exception
    • get

      @GET @Path("/{id}") DatasourceLoadResponse get(@PathParam("id") String id) throws Exception
      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 ID
      datasource - 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 by
      • id
      • globalId
      • keyword
      • name
      • description
      • category
      and sorted by
      • id
      • globalId
      • keyword
      • name
      • description
      • category
      Parameters:
      id - datasource id
      sorting - sort parameters
      filter - filter parameter
      paging - paging parameters
      embed - 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 id
      item - 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 id
      entryId - 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 id
      entryId - datasource entry id
      item - 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 id
      entryId - 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 id
      items - list of entries
      Returns:
      response containing the list of updated entries
      Throws:
      Exception