Class CrudUpload3Resource

java.lang.Object
org.ctan.site.resources.admin.CrudUpload3Resource

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

    • CrudUpload3Resource

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

    • incomingData

      @GET @Path("/incoming/{name}") public Map<String,String> incomingData(@NonNull @PathParam("name") @NonNull String name)
      The method incomingData provides means to retrieve the data for an incoming package.
      Parameters:
      name - the name of the directory
      Returns:
      the data null
    • incomingList

      @GET @Path("/incomings") public GeneralPage incomingList(@QueryParam("q") String q, @DefaultValue("1") @QueryParam("page") int page, @DefaultValue("64") @QueryParam("size") int size, @QueryParam("order") String orderBy, @QueryParam("asc") boolean asc) throws FileNotFoundException
      The method incomingList provides means to retrieve a page of incomings.
      Parameters:
      q - the name pattern
      page - the page
      size - the page size
      orderBy - the order
      asc - the indicator for ascending
      Returns:
      the page for the uploads or null
      Throws:
      FileNotFoundException - in case of a missing file
    • uploadCreate

      @POST @Path("/upload") @UnitOfWork("siteDb") public Upload uploadCreate(@NonNull @NonNull Upload upload)
      The method uploadCreate provides an end-point to create an upload.
      Parameters:
      upload - the upload object to store
      Returns:
      the updated entity
    • uploadList

      @GET @Path("/uploads") @UnitOfWork("siteDb") public GeneralPage uploadList(@QueryParam("q") String q, @DefaultValue("1") @QueryParam("page") int page, @DefaultValue("64") @QueryParam("size") int size, @QueryParam("order") String orderBy, @QueryParam("asc") boolean asc)
      The method uploadList provides means to retrieve a page of uploads.
      Parameters:
      q - the name pattern
      page - the page
      size - the page size
      orderBy - the order
      asc - the indicator for ascending
      Returns:
      the page for the uploads or null
    • uploadRemove

      @DELETE @Path("/upload/{id}") @UnitOfWork("siteDb") public boolean uploadRemove(@NonNull @PathParam("id") @NonNull Long id)
      The method remove provides an end-point to remove a user.
      Parameters:
      id - the id
      Returns:
      true iff the user has existed
    • uploadRetrieve

      @GET @Path("/upload/{id}") @UnitOfWork("siteDb") public Upload uploadRetrieve(@NonNull @PathParam("id") @NonNull Long id)
      The method uploadRetrieve provides means to retrieve a upload.
      Parameters:
      id - the id
      Returns:
      true iff the upload exists