Package org.ctan.site.services.upload
Class Submit11Service
java.lang.Object
org.ctan.site.services.upload.util.AbstractSubmitValidator
org.ctan.site.services.upload.Submit11Service
- All Implemented Interfaces:
SubmitService
This class contains the submit service in version 1.1.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ctan.site.services.upload.SubmitService
SubmitService.FieldOptions, SubmitService.Fields, SubmitService.UploadData
-
Field Summary
Fields inherited from class org.ctan.site.services.upload.util.AbstractSubmitValidator
licenseStore
-
Constructor Summary
ConstructorsConstructorDescriptionSubmit11Service
(@NonNull CtanConfiguration config, @NonNull UploadService uploadService, @NonNull MailService mailService, @NonNull PkgStore pkgStore, @NonNull TopicStore topicStore, @NonNull LicenseStore licenseStore) This is the constructor forSubmit11Service
. -
Method Summary
Modifier and TypeMethodDescriptionThe methodgetFields
provides means to retrieve the supported fields and their attributes.This is the getter for the version number.upload
(String api, SubmitService.UploadData data, Archive archive, User user) This method performs a validation and a following upload if the validation has succeeded.validate
(String api, SubmitService.UploadData data, Archive archive) This service method performs a validation and tries to store the data as upload.Methods inherited from class org.ctan.site.services.upload.util.AbstractSubmitValidator
extractContent, hasField, hasField, hasField, hasField, hasListField, hasListField, hasListField, hasUrlListField, validateArchive, validateArchiveFiles, validateCtanPath, validateLicense, validateTopic, validateUrl
-
Constructor Details
-
Submit11Service
public Submit11Service(@NonNull @NonNull CtanConfiguration config, @NonNull @NonNull UploadService uploadService, @NonNull @NonNull MailService mailService, @NonNull @NonNull PkgStore pkgStore, @NonNull @NonNull TopicStore topicStore, @NonNull @NonNull LicenseStore licenseStore) This is the constructor forSubmit11Service
.- Parameters:
config
- the configurationuploadService
- the upload servicemailService
- the mail servicepkgStore
- the package storetopicStore
- the topic storelicenseStore
- the license store
-
-
Method Details
-
getFields
The methodgetFields
provides means to retrieve the supported fields and their attributes.- Specified by:
getFields
in interfaceSubmitService
- Parameters:
api
- the number of the requested API- Returns:
- the fields
- See Also:
-
getVersion
This is the getter for the version number.- Specified by:
getVersion
in interfaceSubmitService
- Returns:
- the version number
-
upload
This method performs a validation and a following upload if the validation has succeeded.- Specified by:
upload
in interfaceSubmitService
- Parameters:
api
- the version of the APIdata
- the parametersarchive
- the archiveuser
- the authenticated user ornull
- Returns:
- the list of messages
- See Also:
-
validate
This service method performs a validation and tries to store the data as upload.- Specified by:
validate
in interfaceSubmitService
- Parameters:
api
- the version of the APIdata
- the parametersarchive
- the archive- Returns:
- the messages
- See Also:
-