| org.kuali.kfs.service.BatchInputFileSetService
All known Subclasses: org.kuali.kfs.service.impl.BatchInputFileSetServiceImpl,
BatchInputFileSetService | public interface BatchInputFileSetService (Code) | | This interface defines the methods needed to save/download/delete file sets in the batch upload system
|
Method Summary | |
public boolean | delete(UniversalUser user, BatchInputFileSetType inputType, String fileUserIdentifier) Deletes a batch input file contained on the server if the user has permissions for the files batch input type. | public File | download(UniversalUser user, BatchInputFileSetType inputType, String fileType, String fileUserIdentifier) Returns the contents of a batch input file contained on the server if the user has permissions for the files batch input
type.
Parameters: user - - user who is requesting the download Parameters: inputType - - instance of a BatchInputFileSetType Parameters: fileType - - the type of the file to retrieve Parameters: fileUserIdentifier - file identifier specified by user File - File representation of the batch input, or null if errors occured. | public boolean | hasBeenProcessed(UniversalUser user, BatchInputFileSetType inputType, String fileUserIdentifier) | public boolean | isBatchInputTypeActive(BatchInputFileSetType batchInputFileSetType) Checks if the batch input type is active (can be used for upload). | public boolean | isFileUserIdentifierProperlyFormatted(String fileUserIdentifier) Returns whether a file set identifier is properly formatted. | public boolean | isUserAuthorizedForBatchType(BatchInputFileSetType batchInputFileSetType, UniversalUser user) Checks if the user has permissions to manage the batch input type. | public Set<String> | listBatchTypeFileUserIdentifiersForUser(BatchInputFileSetType batchInputFileSetType, UniversalUser user) Returns a list of batch type file names (including path) that the given user has permissions to manage. | public Map<String, String> | save(UniversalUser user, BatchInputFileSetType inputType, String fileUserIdentifer, Map<String, InputStream> typeToStreamMap, boolean suppressDoneFileCreation) |
delete | public boolean delete(UniversalUser user, BatchInputFileSetType inputType, String fileUserIdentifier) throws AuthorizationException, FileNotFoundException(Code) | | Deletes a batch input file contained on the server if the user has permissions for the files batch input type. Also deletes
the associated .done file if one exists. If the file set may not be deleted, then the GlobalVariable's error map will be
populated with the reason why.
Parameters: user - - user who is requesting the delete Parameters: inputType - - instance of a BatchInputFileSetType Parameters: fileUserIdentifier - file identifier specified by user whether the file was successfully downloaded throws: AuthorizationException - - if user does not have permission to delete batch files of this type FileNotFoundException -if given file does not exist on the file system |
download | public File download(UniversalUser user, BatchInputFileSetType inputType, String fileType, String fileUserIdentifier) throws AuthorizationException, FileNotFoundException(Code) | | Returns the contents of a batch input file contained on the server if the user has permissions for the files batch input
type.
Parameters: user - - user who is requesting the download Parameters: inputType - - instance of a BatchInputFileSetType Parameters: fileType - - the type of the file to retrieve Parameters: fileUserIdentifier - file identifier specified by user File - File representation of the batch input, or null if errors occured. Check GlobalVariables.errorMap for errormessages. throws: AuthorizationException - - if user does not have permission to view batch files of this type FileNotFoundException - ifgiven file does not exist on the file system |
hasBeenProcessed | public boolean hasBeenProcessed(UniversalUser user, BatchInputFileSetType inputType, String fileUserIdentifier)(Code) | | Returns whether a file set for a given user has already been processed
Parameters: user - Parameters: inputType - Parameters: fileUserIdentifier - |
isBatchInputTypeActive | public boolean isBatchInputTypeActive(BatchInputFileSetType batchInputFileSetType)(Code) | | Checks if the batch input type is active (can be used for upload).
Parameters: BatchInputFileSetType - - input type to check is active boolean - true if type is active, false if not active |
isFileUserIdentifierProperlyFormatted | public boolean isFileUserIdentifierProperlyFormatted(String fileUserIdentifier)(Code) | | Returns whether a file set identifier is properly formatted.
Parameters: fileUserIdentifier - |
isUserAuthorizedForBatchType | public boolean isUserAuthorizedForBatchType(BatchInputFileSetType batchInputFileSetType, UniversalUser user)(Code) | | Checks if the user has permissions to manage the batch input type.
Parameters: batchInputFileSetType - - input type to check user permissions on Parameters: user - - user to check boolean - true if user has permissions for the type, false if the user does not have permission |
listBatchTypeFileUserIdentifiersForUser | public Set<String> listBatchTypeFileUserIdentifiersForUser(BatchInputFileSetType batchInputFileSetType, UniversalUser user) throws AuthorizationException(Code) | | Returns a list of batch type file names (including path) that the given user has permissions to manage.
Parameters: user - - user for checking permissions List - List of filenames |
save | public Map<String, String> save(UniversalUser user, BatchInputFileSetType inputType, String fileUserIdentifer, Map<String, InputStream> typeToStreamMap, boolean suppressDoneFileCreation) throws AuthorizationException, FileStorageException(Code) | | Stores the input streams (the values in the Map parameter) as files on the server, identified by the given user file name and
file user identifier
Parameters: user - - user who is requesting the save Parameters: inputType - - instance of a BatchInputFileSetType Parameters: fileUserIdentifer - - file identifier specified by user Parameters: typeToStreamMap - - contents of the uploaded files, keyed by the input file type a Map of type to file name mappings of the saved files throws: FileStorageException - - if errors were encountered while attempting to write the file |
|
|