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 methodgetFieldsprovides means to retrieve the supported fields and their attributes.This is the getter for the version number.upload(String api, SubmitService.UploadData data, String fileName, InputStream stream, User user) This method performs a validation and a following upload if the validation has succeeded.validate(String api, SubmitService.UploadData data, String filename, InputStream stream) 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 methodgetFieldsprovides means to retrieve the supported fields and their attributes.- Specified by:
getFieldsin 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:
getVersionin interfaceSubmitService- Returns:
- the version number
-
upload
public Messages upload(String api, SubmitService.UploadData data, String fileName, InputStream stream, User user) This method performs a validation and a following upload if the validation has succeeded.- Specified by:
uploadin interfaceSubmitService- Parameters:
api- the version of the APIdata- the parametersfileName- the name of the filestream- the file input streamuser- the authenticated user ornull- Returns:
- the list of messages
- See Also:
-
validate
public Messages validate(String api, SubmitService.UploadData data, String filename, InputStream stream) This service method performs a validation and tries to store the data as upload.- Specified by:
validatein interfaceSubmitService- Parameters:
api- the version of the APIdata- the parametersfilename- the file namestream- the input stream for the file- Returns:
- the messages
- See Also:
-