Interface EnvironmentReservationApi

All Superinterfaces:
ApiService

@Path("/api/v1/environments/reservations") @Consumes("application/json") @Produces("application/json") public interface EnvironmentReservationApi extends ApiService
  • Method Details

    • serviceName

      default String serviceName()
      Specified by:
      serviceName in interface ApiService
    • createReservation

      @POST EnvironmentReservationView createReservation(EnvironmentReservationForm environmentReservationForm)
    • getReservation

      @GET @Path("/{environmentReservationId:.*/EnvironmentReservation[^/]*}") EnvironmentReservationView getReservation(@PathParam("environmentReservationId") String environmentReservationId)
    • updateReservation

      @PUT @Path("/{environmentReservationId:.*/EnvironmentReservation[^/]*}") EnvironmentReservationView updateReservation(@PathParam("environmentReservationId") String environmentReservationId, EnvironmentReservationForm environmentReservationForm)
    • searchReservations

      @POST @Path("/search") List<EnvironmentReservationSearchView> searchReservations(ReservationFilters filters)
    • delete

      @DELETE @Path("/{environmentReservationId:.*/EnvironmentReservation[^/]*}") void delete(@PathParam("environmentReservationId") String environmentReservationId)
      Deletes an environment reservation.
      Parameters:
      environmentReservationId - the environment reservation identifier
    • addApplication

      @POST @Path("/{environmentReservationId:.*/EnvironmentReservation[^/]*}") void addApplication(@PathParam("environmentReservationId") String environmentReservationId, @QueryParam("applicationId") String applicationId)
      Adds an application to an environment reservation.
      Parameters:
      environmentReservationId - the environment reservation identifier
      applicationId - the application identifier
    • create

      EnvironmentReservation create(EnvironmentReservation environmentReservation)
      Creates a new environment reservation.
      Parameters:
      environmentReservation - an EnvironmentReservation object describing the new environment reservation
      Returns:
      created EnvironmentReservation object
    • getById

      EnvironmentReservation getById(String environmentReservationId)
      Gets an environment reservation by id.
      Parameters:
      environmentReservationId - the environment reservation identifier
      Returns:
      found EnvironmentReservation object
    • update

      EnvironmentReservation update(EnvironmentReservation environmentReservation)
      Updates an existing environment reservation.
      Parameters:
      environmentReservation - an EnvironmentReservation object describing the new properties of the environment reservation
      Returns:
      updated EnvironmentReservation object
    • search

      Searches environment reservations by filters.
      Parameters:
      filters - an EnvironmentReservationFilters object describing the search criteria
      Returns:
      map of matching EnvironmentReservation lists grouped by environment IDs
    • hasReservation

      boolean hasReservation(String environmentId, String applicationId)
      Checks if given application has a reservation on a given environment at the current time.
      Parameters:
      environmentId - the environment identifier
      applicationId - the application identifier
      Returns:
      true if a reservation exists
    • nearestComingReservation

      Date nearestComingReservation(String environmentId, String applicationId)
      Checks if given application has a reservation on a given environment at the current time or in the future.
      Parameters:
      environmentId - the environment identifier
      applicationId - the application identifier
      Returns:
      Date of reservation start time. If reservation exists at the current time, then returned date will be less than or equal to now. If future reservation is found, then returned date will be start date of nearest future reservation If neither current nor future reservation found, return value is null