| java.lang.Object org.kuali.kfs.service.impl.BatchInputFileServiceImpl
BatchInputFileServiceImpl | public class BatchInputFileServiceImpl implements BatchInputFileService(Code) | | Provides batch input file management, including listing files, parsing, downloading, storing, and deleting.
|
Method Summary | |
protected boolean | canDelete(UniversalUser user, BatchInputFileType inputType, File fileToDelete) This method indicates whether a file can be deleted. | public boolean | delete(UniversalUser user, BatchInputFileType batchInputFileType, String deleteFileNameWithNoPath) | public File | download(UniversalUser user, BatchInputFileType batchInputFileType, String downloadFileNameWithNoPath) | protected File | generateDoneFileObject(File batchInputFile) This method is responsible for creating a File object that represents the done file. | public boolean | hasBeenProcessed(BatchInputFileType inputType, String fileName) | public boolean | isBatchInputTypeActive(BatchInputFileType batchInputFileType) | public boolean | isFileUserIdentifierProperlyFormatted(String fileUserIdentifier) | public boolean | isUserAuthorizedForBatchType(BatchInputFileType batchInputFileType, UniversalUser user) | public List<String> | listBatchTypeFilesForUser(BatchInputFileType batchInputFileType, UniversalUser user) Fetches workgroup for batch type from system parameter and verifies user is a member. | protected List<File> | listBatchTypeFilesForUserAsFiles(BatchInputFileType batchInputFileType, UniversalUser user) | public List<String> | listInputFileNamesWithDoneFile(BatchInputFileType batchInputFileType) | public Object | parse(BatchInputFileType batchInputFileType, byte[] fileByteContent) Uses the apache commons digestor to unmarshell the xml. | protected File | retrieveFileToDownloadOrDelete(BatchInputFileType batchInputFileType, UniversalUser user, String fileName) This method will attempt to find the File object representing the file to download or delete. | public String | save(UniversalUser user, BatchInputFileType batchInputFileType, String fileUserIdentifier, InputStream fileContents, Object parsedObject) | public boolean | validate(BatchInputFileType batchInputFileType, Object parsedObject) Defers to batch type to do any validation on the parsed contents. |
canDelete | protected boolean canDelete(UniversalUser user, BatchInputFileType inputType, File fileToDelete)(Code) | | This method indicates whether a file can be deleted. It will also place an error in the GlobalVariables error map to indicate
to the UI the reason that the file could not be deleted.
Parameters: user - Parameters: inputType - Parameters: deleteFileNameWithNoPath - throws: AuthorizationException - throws: FileNotFoundException - |
generateDoneFileObject | protected File generateDoneFileObject(File batchInputFile)(Code) | | This method is responsible for creating a File object that represents the done file. The real file represented on disk may
not exist
Parameters: batchInputFile - a File object representing the done file. The real file may not exist on disk, but the return value can be used tocreate that file. |
retrieveFileToDownloadOrDelete | protected File retrieveFileToDownloadOrDelete(BatchInputFileType batchInputFileType, UniversalUser user, String fileName)(Code) | | This method will attempt to find the File object representing the file to download or delete. USE EXTREME CAUTION when
overridding this method, as a badly implemented method may cause a security vulnerability.
Parameters: batchInputFileType - Parameters: user - Parameters: fileName - the file name, WITHOUT any path components the File object, if a file exists in the directory specified by the batchInputFileType. null if no file can be foundin the directory specified by batchInputFileType. |
|
|