Klasse DUUIComponentRequestHandler
java.lang.Object
org.texttechnologylab.duui.api.routes.components.DUUIComponentRequestHandler
A class that is responsible for handling incoming requests to the /components path group.
- Autor:
- Cedric Borkowksi
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic String
deleteOne
(spark.Request request, spark.Response response) Attemps to delete a component given its id.static String
findMany
(spark.Request request, spark.Response response) Finds many components by its userID extracted from the request and components that are marked as templates by not having a user_id field set.static String
findOne
(spark.Request request, spark.Response response) Finds one component by its id extracted from the request url.static String
insertOne
(spark.Request request, spark.Response response) Inserts a new Component into the Database.static String
updateOne
(spark.Request request, spark.Response response) Updates one component by its id extracted from the url.
-
Felddetails
-
DRIVERS
A set of all available drivers.
-
-
Konstruktordetails
-
DUUIComponentRequestHandler
public DUUIComponentRequestHandler()
-
-
Methodendetails
-
insertOne
Inserts a new Component into the Database. If no user_id or no pipeline_id is specified, the component is inserted as a template. SeeDUUIComponentController.insertOne(Document)
- Parameter:
request
- Request objectresponse
- Response object- Gibt zurück:
- Response message
-
findOne
Finds one component by its id extracted from the request url. SeeDUUIComponentController.findOneById(String)
- Gibt zurück:
- A Json String containing the component or a not found message.
-
findMany
Finds many components by its userID extracted from the request and components that are marked as templates by not having a user_id field set. SeeDUUIComponentController.findMany(MongoDBFilters)
- Gibt zurück:
- A Json String containing the components or a not found message.
-
updateOne
Updates one component by its id extracted from the url. The updates to be performed are provided in the request body in the Json format. SeeDUUIComponentController.updateOne(String, Document)
- Gibt zurück:
- A Json String containing the updated component or a not found message.
-
deleteOne
Attemps to delete a component given its id. SeeDUUIComponentController.deleteOne(String)
- Gibt zurück:
- Confirmation of deletion or a not found message.
-