Package step.plugins.datatable
Class TableService
- java.lang.Object
-
- step.core.deployment.AbstractServices
-
- step.core.deployment.ApplicationServices
-
- step.plugins.datatable.TableService
-
@Singleton @Path("table") public class TableService extends ApplicationServices
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TableService.ExportTask
-
Field Summary
Fields Modifier and Type Field Description protected CollectionRegistry
collectionRegistry
protected com.mongodb.client.MongoDatabase
database
protected ExportTaskManager
exportTaskManager
protected int
maxTime
-
Fields inherited from class step.core.deployment.AbstractServices
configuration, controller
-
-
Constructor Summary
Constructors Constructor Description TableService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createExport(String collectionID, javax.ws.rs.core.UriInfo uriInfo)
void
destroy()
ExportTaskManager.ExportStatus
getExport(String reportID)
List<String>
getTableColumnDistinct(String collectionID, String column, javax.ws.rs.core.UriInfo uriInfo)
DataTableResponse
getTableData_Get(String collectionID, javax.ws.rs.core.UriInfo uriInfo)
DataTableResponse
getTableData_Post(String collectionID, javax.ws.rs.core.MultivaluedMap<String,String> form, javax.ws.rs.core.UriInfo uriInfo)
void
init()
List<String>
searchIdsBy(String collectionID, String columnName, String searchValue)
-
Methods inherited from class step.core.deployment.ApplicationServices
getWebPlugins
-
Methods inherited from class step.core.deployment.AbstractServices
getContext, getExecutionRunnable, getObjectDrainer, getObjectEnricher, getScheduler, getSession, setSession
-
-
-
-
Field Detail
-
collectionRegistry
protected CollectionRegistry collectionRegistry
-
database
protected com.mongodb.client.MongoDatabase database
-
maxTime
protected int maxTime
-
exportTaskManager
protected ExportTaskManager exportTaskManager
-
-
Method Detail
-
init
@PostConstruct public void init() throws Exception
- Overrides:
init
in classAbstractServices
- Throws:
Exception
-
destroy
@PreDestroy public void destroy()
-
getTableData_Post
@POST @Path("/{id}/data") @Consumes("application/x-www-form-urlencoded") @Produces("application/json") public DataTableResponse getTableData_Post(@PathParam("id") String collectionID, javax.ws.rs.core.MultivaluedMap<String,String> form, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
- Throws:
Exception
-
getTableData_Get
@GET @Path("/{id}/data") @Produces("application/json") public DataTableResponse getTableData_Get(@PathParam("id") String collectionID, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
- Throws:
Exception
-
getTableColumnDistinct
@GET @Path("/{id}/column/{column}/distinct") @Produces("application/json") public List<String> getTableColumnDistinct(@PathParam("id") String collectionID, @PathParam("column") String column, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
- Throws:
Exception
-
searchIdsBy
@POST @Path("/{id}/searchIdsBy/{column}") @Produces("application/json") @Consumes("application/json") public List<String> searchIdsBy(@PathParam("id") String collectionID, @PathParam("column") String columnName, String searchValue) throws Exception
- Throws:
Exception
-
createExport
@GET @Path("/{id}/export") @Produces("application/json") public String createExport(@PathParam("id") String collectionID, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
- Throws:
Exception
-
getExport
@GET @Path("/exports/{id}") @Produces("application/json") public ExportTaskManager.ExportStatus getExport(@PathParam("id") String reportID) throws Exception
- Throws:
Exception
-
-