Package org.ctan.site.services.upload
Interface SubmitService
- All Known Implementing Classes:
Submit11Service
public interface SubmitService
This class contains the submit service interface.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe classFieldOptionscontains the transport object for field descriptions.static classThe classFieldscontains the transport object for field specifications.static classThe classUploadDatacontains the transport object for the upload meta data. -
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.
-
Method Details
-
getFields
The methodgetFieldsprovides means to retrieve the supported fields and their attributes.- Parameters:
api- the number of the requested API- Returns:
- the fields
- Throws:
UnsupportedOperationException- if a wrong API version is given
-
getVersion
String getVersion()This is the getter for the version number.- Returns:
- the version number
-
upload
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.- 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
-
validate
This service method performs a validation and tries to store the data as upload.- Parameters:
api- the version of the APIdata- the parametersfilename- the file namestream- the input stream for the file- Returns:
- the messages
-