Package org.ctan.site.resources.admin
Class CrudUpload3Resource
java.lang.Object
org.ctan.site.resources.admin.CrudUpload3Resource
The class
CrudUpload3Resource contains the CRUD controller for
the upload resource.-
Constructor Summary
ConstructorsConstructorDescriptionCrudUpload3Resource(@NonNull UploadService uploadService) This is the constructor for the classCrudUpload3Resource. -
Method Summary
Modifier and TypeMethodDescriptionincomingData(@NonNull String name) The methodincomingDataprovides means to retrieve the data for an incoming package.incomingList(String q, int page, int size, String orderBy, boolean asc) The methodincomingListprovides means to retrieve a page of incomings.uploadCreate(@NonNull Upload upload) The methoduploadCreateprovides an end-point to create an upload.uploadList(String q, int page, int size, String orderBy, boolean asc) The methoduploadListprovides means to retrieve a page of uploads.booleanuploadRemove(@NonNull Long id) The methodremoveprovides an end-point to remove a user.uploadRetrieve(@NonNull Long id) The methoduploadRetrieveprovides means to retrieve a upload.
-
Constructor Details
-
CrudUpload3Resource
This is the constructor for the classCrudUpload3Resource.- Parameters:
uploadService- the underlying service
-
-
Method Details
-
incomingData
@GET @Path("/incoming/{name}") public Map<String,String> incomingData(@NonNull @PathParam("name") @NonNull String name) The methodincomingDataprovides 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 methodincomingListprovides means to retrieve a page of incomings.- Parameters:
q- the name patternpage- the pagesize- the page sizeorderBy- the orderasc- 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 methoduploadCreateprovides 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 methoduploadListprovides means to retrieve a page of uploads.- Parameters:
q- the name patternpage- the pagesize- the page sizeorderBy- the orderasc- 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 methodremoveprovides an end-point to remove a user.- Parameters:
id- the id- Returns:
trueiff the user has existed
-
uploadRetrieve
@GET @Path("/upload/{id}") @UnitOfWork("siteDb") public Upload uploadRetrieve(@NonNull @PathParam("id") @NonNull Long id) The methoduploadRetrieveprovides means to retrieve a upload.- Parameters:
id- the id- Returns:
trueiff the upload exists
-