Class SubmitResource
java.lang.Object
org.ctan.site.resources.catalogue.api.SubmitResource
@Path("/submit")
@Produces("application/json")
@PermitAll
public class SubmitResource
extends Object
The class
SubmitResource
contains the controller for the submit
resource.-
Constructor Summary
ConstructorsConstructorDescriptionSubmitResource
(@NonNull SubmitService service) This is the constructor for the classSubmitResource
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodfields
provides means to retrieve the supported fields.The methodgetVersions
provides means to retrieve the supported versions number of the API.jakarta.ws.rs.core.Response
upload
(org.glassfish.jersey.media.multipart.FormDataBodyPart content, org.glassfish.jersey.media.multipart.FormDataContentDisposition metaData, String announce, String announcement, String authors, String bugs, String caption, String confirm, String ctanPath, String description, String development, String email, String home, String licenses, String mailinglist, String name, String notes, String pkg, String repository, String support, String topics, String uploader, String update, String vers, String api) The methodupload
provides means to upload a package to CTAN.jakarta.ws.rs.core.Response
validate
(org.glassfish.jersey.media.multipart.FormDataBodyPart content, org.glassfish.jersey.media.multipart.FormDataContentDisposition metaData, String announce, String announcement, String authors, String bugs, String caption, String confirm, String ctanPath, String description, String development, String email, String home, String licenses, String mailinglist, String name, String notes, String pkg, String repository, String support, String topics, String uploader, String update, String vers, String api) The methodvalidate
provides means to upload a package to CTAN for validation.version()
The methodversion
provides means to retrieve the version number of the API.
-
Constructor Details
-
SubmitResource
This is the constructor for the classSubmitResource
.- Parameters:
service
- the underlying service
-
-
Method Details
-
fields
The methodfields
provides means to retrieve the supported fields.- Parameters:
api
- the API version- Returns:
- a Map with the fields and their attributes
-
getVersions
The methodgetVersions
provides means to retrieve the supported versions number of the API.- Returns:
- a Map with version number mapped to a list of supported end- points.
-
upload
@POST @Path("/upload") @Consumes({"application/x-www-form-urlencoded","multipart/form-data","application/json"}) @Produces("application/json") @UnitOfWork("siteDb") public jakarta.ws.rs.core.Response upload(org.glassfish.jersey.media.multipart.FormDataBodyPart content, org.glassfish.jersey.media.multipart.FormDataContentDisposition metaData, String announce, String announcement, String authors, String bugs, String caption, String confirm, String ctanPath, String description, String development, String email, String home, String licenses, String mailinglist, String name, String notes, String pkg, String repository, String support, String topics, String uploader, String update, String vers, @QueryParam("api") String api) The methodupload
provides means to upload a package to CTAN.- Parameters:
content
- the uploaded filemetaData
- the meta data for the fileannounce
- the announce parameterannouncement
- the announcement parameterauthors
- the authors parameterbugs
- the bugs parametercaption
- the caption parameterconfirm
- the confirm parameterctanPath
- the CTAN path parameterdescription
- the description parameterdevelopment
- the development channel parameteremail
- the uploader's emailhome
- the home pagelicenses
- the licenses parametermailinglist
- the mailing listname
- the printable name of the packagenotes
- the note for the upload managerspkg
- the package name in lower-caserepository
- the repositorysupport
- the support channeltopics
- the topics parameteruploader
- the name of the uploaderupdate
- the indicator for update vs. newvers
- the version numberapi
- the API version ornull
- Returns:
- the list of messages
-
validate
@POST @Path("/validate") @Consumes({"application/x-www-form-urlencoded","multipart/form-data","application/json"}) @Produces("application/json") @UnitOfWork("siteDb") public jakarta.ws.rs.core.Response validate(org.glassfish.jersey.media.multipart.FormDataBodyPart content, org.glassfish.jersey.media.multipart.FormDataContentDisposition metaData, String announce, String announcement, String authors, String bugs, String caption, String confirm, String ctanPath, String description, String development, String email, String home, String licenses, String mailinglist, String name, String notes, String pkg, String repository, String support, String topics, String uploader, String update, String vers, String api) The methodvalidate
provides means to upload a package to CTAN for validation.- Parameters:
content
- the uploaded filemetaData
- the meta data for the fileannounce
- the announce parameterannouncement
- the announcement parameterauthors
- the authors parameterbugs
- the bugs parametercaption
- the caption parameterconfirm
- the confirm parameterctanPath
- the CTAN path parameterdescription
- the description parameterdevelopment
- the development channel parameteremail
- the uploader's emailhome
- the home pagelicenses
- the licenses parametermailinglist
- the mailing listname
- the printable name of the packagenotes
- the note for the upload managerspkg
- the package name in lower-caserepository
- the repositorysupport
- the support channeltopics
- the topics parameteruploader
- the name of the uploaderupdate
- the indicator for update vs. newvers
- the version numberapi
- the API version- Returns:
- the response
-
version
The methodversion
provides means to retrieve the version number of the API.- Returns:
- a Map with a single attribute
version
containing the version number as String.
-