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 methodfieldsprovides means to retrieve the supported fields.The methodgetVersionsprovides means to retrieve the supported versions number of the API.jakarta.ws.rs.core.Responseupload(String api, InputStream stream, org.glassfish.jersey.media.multipart.FormDataContentDisposition formData, 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) The methoduploadprovides means to upload a package to CTAN.jakarta.ws.rs.core.Responsevalidate(String api, InputStream stream, org.glassfish.jersey.media.multipart.FormDataContentDisposition contentDispo, 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) The methodvalidateprovides means to upload a package to CTAN for validation.version()The methodversionprovides 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 methodfieldsprovides means to retrieve the supported fields.- Parameters:
api- the API version- Returns:
- a Map with the fields and their attributes
-
getVersions
The methodgetVersionsprovides 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(@QueryParam("api") String api, InputStream stream, org.glassfish.jersey.media.multipart.FormDataContentDisposition formData, 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) The methoduploadprovides means to upload a package to CTAN.- Parameters:
api- the API version ornullstream- the uploaded fileformData- 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 number- 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(String api, InputStream stream, org.glassfish.jersey.media.multipart.FormDataContentDisposition contentDispo, 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) The methodvalidateprovides means to upload a package to CTAN for validation.- Parameters:
api- the API versionstream- the uploaded filecontentDispo- 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 number- Returns:
- the response
-
version
The methodversionprovides means to retrieve the version number of the API.- Returns:
- a Map with a single attribute
versioncontaining the version number as String.
-