Class UserWorkerQueryController

java.lang.Object
it.univr.passportease.controller.UserWorkerQueryController

@Controller public class UserWorkerQueryController extends Object
Controller for user and worker queries. It handles the following GraphQL queries:
See Also:
  • Field Details

    • userWorkerQueryService

      private final UserWorkerQueryService userWorkerQueryService
      Service for user and worker queries.
    • bucketLimiter

      private BucketLimiter bucketLimiter
      Bucket limiter for rate limiting.
  • Constructor Details

    • UserWorkerQueryController

      public UserWorkerQueryController()
  • Method Details

    • getAvailabilities

      @QueryMapping public List<Availability> getAvailabilities(@Argument("availabilityFilters") AvailabilityFilters availabilityFilters, @Argument("size") Integer size, @Argument("page") Integer page) throws RateLimitException
      This query returns the availabilities matching the given filters. It returns a paginated list of availabilities if the page and size arguments are provided.
      Parameters:
      availabilityFilters - filters to apply to the query, if any
      size - number of results to return per page, optional
      page - page number starting from 0, optional
      Returns:
      list of Availability matching the filters, paginated if requested
      Throws:
      RateLimitException - if the user or worker has exceeded the rate limit
    • getOffices

      @QueryMapping public List<Office> getOffices() throws RateLimitException
      This query returns all the offices in the database.
      Returns:
      list of Office
      Throws:
      RateLimitException - if the user or worker has exceeded the rate limit