Klasse DUUIComponentRequestHandler

java.lang.Object
org.texttechnologylab.duui.api.routes.components.DUUIComponentRequestHandler

public class DUUIComponentRequestHandler extends Object
A class that is responsible for handling incoming requests to the /components path group.
Autor:
Cedric Borkowksi
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final Set<String>
    A set of all available drivers.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static 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.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • DRIVERS

      public static final Set<String> DRIVERS
      A set of all available drivers.
  • Konstruktordetails

    • DUUIComponentRequestHandler

      public DUUIComponentRequestHandler()
  • Methodendetails

    • insertOne

      public static String insertOne(spark.Request request, spark.Response response)
      Inserts a new Component into the Database. If no user_id or no pipeline_id is specified, the component is inserted as a template. See DUUIComponentController.insertOne(Document)
      Parameter:
      request - Request object
      response - Response object
      Gibt zurück:
      Response message
    • findOne

      public static String findOne(spark.Request request, spark.Response response)
      Finds one component by its id extracted from the request url. See DUUIComponentController.findOneById(String)
      Gibt zurück:
      A Json String containing the component or a not found message.
    • findMany

      public 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. See DUUIComponentController.findMany(MongoDBFilters)
      Gibt zurück:
      A Json String containing the components or a not found message.
    • updateOne

      public static String updateOne(spark.Request request, spark.Response response)
      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. See DUUIComponentController.updateOne(String, Document)
      Gibt zurück:
      A Json String containing the updated component or a not found message.
    • deleteOne

      public static String deleteOne(spark.Request request, spark.Response response)
      Attemps to delete a component given its id. See DUUIComponentController.deleteOne(String)
      Gibt zurück:
      Confirmation of deletion or a not found message.