Class Upload3Resource

java.lang.Object
org.ctan.site.resources.upload.Upload3Resource

@Path("/3.0/upload") @Produces("application/json") public class Upload3Resource extends Object
The class Upload3Resource contains the controller for the upload resource.
  • Constructor Details

    • Upload3Resource

      public Upload3Resource(@NonNull @NonNull UploadService service)
      This is the constructor for the class TexArchive3Resource.
      Parameters:
      service - the underlying service
  • Method Details

    • getAddendum

      @GET @Path("/addendum") public Map<String,String> getAddendum()
      The method getAddendum provides means to retrieve the upload addendum file.
      Returns:
      the addendum
    • getIncoming

      @GET @Path("/incoming") @UnitOfWork("siteDb") public UploadService.IncomingTo getIncoming(@QueryParam("q") String query, @QueryParam("page") Long page, @QueryParam("size") Long pageSize, @QueryParam("order") String orderBy, @QueryParam("asc") Boolean asc)
      The method getList provides means to retrieve the list of unprocessed uploads.
      Parameters:
      query - the query pattern
      page - the current page
      pageSize - the page size
      orderBy - the attribute to order by
      asc - sort ascending
      Returns:
      the list of upload items
    • getStatistics

      @GET @Path("/statistics") @PermitAll @UnitOfWork("siteDb") public Map<String,Integer> getStatistics()
      The method getStatistics provides means to retrieve the cached upload statistics. The upload statistics contains the number of uploads per month.

      The statistics are cached and updated every 30 minutes.

      Returns:
      the statistics
    • getVersion

      @GET @Path("/version") public Map<String,String> getVersion()
      The method getVersion provides means to retrieve the version number of the API.
      Returns:
      a Map with a single attribute version containing the version number as String.