Class CrudDispatcher

    • Method Detail

      • handleCreate

        public MockResponse handleCreate​(String path,
                                         String body)
        Adds the specified object to the in-memory db.
        Parameters:
        path - for the request.
        body - Request body as String (UTF-8).
        Returns:
        a MockResponse to be dispatched.
      • handlePatch

        public MockResponse handlePatch​(String path,
                                        String body)
        Patches the specified object to the in-memory db.
        Parameters:
        path - for the request.
        body - Request body as String (UTF-8).
        Returns:
        a MockResponse to be dispatched.
      • handleUpdate

        public MockResponse handleUpdate​(String path,
                                         String body)
        Updates the specified object to the in-memory db.
        Parameters:
        path - for the request.
        body - Request body as String (UTF-8).
        Returns:
        a MockResponse to be dispatched.
      • handleGet

        public MockResponse handleGet​(String path)
        Performs a get for the corresponding object from the in-memory db.
        Parameters:
        path - for the request.
        Returns:
        a MockResponse to be dispatched.
      • handleDelete

        public MockResponse handleDelete​(String path)
        Performs a delete for the corresponding object from the in-memory db.
        Parameters:
        path - for the request.
        Returns:
        a MockResponse to be dispatched.