public class BatchInputFileSetServiceImpl extends InitiateDirectoryBase implements BatchInputFileSetService
| Modifier and Type | Field and Description |
|---|---|
protected org.kuali.rice.core.api.config.property.ConfigurationService |
kualiConfigurationService |
| Constructor and Description |
|---|
BatchInputFileSetServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyInputStreamToFile(InputStream source,
File outputFile,
byte[] buf) |
protected Map<String,File> |
copyStreamsToTemporaryDirectory(org.kuali.rice.kim.api.identity.Person user,
BatchInputFileSetType inputType,
String fileUserIdentifier,
Map<String,InputStream> typeToStreamMap,
Date creationDate) |
protected void |
deleteTempFiles(Map<String,File> typeToTempFiles) |
protected String |
generateDoneFileName(org.kuali.rice.kim.api.identity.Person user,
BatchInputFileSetType inputType,
String fileUserIdentifier,
Date creationDate)
Generates the file name of the done file, if supported by the underlying input type
|
protected String |
generateFileName(org.kuali.rice.kim.api.identity.Person user,
BatchInputFileSetType inputType,
String fileUserIdentifier,
String fileType,
Date creationDate)
Generates the file name of a file (not the done file)
|
protected String |
generateTempFileName(org.kuali.rice.kim.api.identity.Person user,
BatchInputFileSetType inputType,
String fileUserIdentifier,
String fileType,
Date creationDate)
Generates the file name of a file (not the done file)
|
List<String> |
getRequiredDirectoryNames()
Get the required list of directories name (full path)
|
protected String |
getTempDirectoryName() |
boolean |
isBatchInputTypeActive(BatchInputFileSetType batchInputFileSetType)
Checks if the batch input type is active (can be used for upload).
|
boolean |
isFileUserIdentifierProperlyFormatted(String fileUserIdentifier)
Returns whether a file set identifier is properly formatted.
|
Map<String,String> |
save(org.kuali.rice.kim.api.identity.Person user,
BatchInputFileSetType inputType,
String fileUserIdentifier,
Map<String,InputStream> typeToStreamMap)
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
|
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService) |
prepareDirectoriesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprepareDirectoriesprotected org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService
public BatchInputFileSetServiceImpl()
protected String generateFileName(org.kuali.rice.kim.api.identity.Person user, BatchInputFileSetType inputType, String fileUserIdentifier, String fileType, Date creationDate)
user - the user who uploaded or will upload the fileinputType - the file set typefileUserIdentifier - the file identifierfileType - the file typeprotected String generateTempFileName(org.kuali.rice.kim.api.identity.Person user, BatchInputFileSetType inputType, String fileUserIdentifier, String fileType, Date creationDate)
user - the user who uploaded or will upload the fileinputType - the file set typefileUserIdentifier - the file identifierfileType - the file typeprotected String generateDoneFileName(org.kuali.rice.kim.api.identity.Person user, BatchInputFileSetType inputType, String fileUserIdentifier, Date creationDate)
user - the user who uploaded or will upload the fileinputType - the file set typefileUserIdentifier - the file identifierfileType - the file typepublic boolean isBatchInputTypeActive(BatchInputFileSetType batchInputFileSetType)
BatchInputFileSetServiceisBatchInputTypeActive in interface BatchInputFileSetServiceBatchInputFileSetService.isBatchInputTypeActive(org.kuali.ole.sys.batch.BatchInputFileSetType)public Map<String,String> save(org.kuali.rice.kim.api.identity.Person user, BatchInputFileSetType inputType, String fileUserIdentifier, Map<String,InputStream> typeToStreamMap) throws org.kuali.rice.krad.exception.AuthorizationException, FileStorageException
BatchInputFileSetServicesave in interface BatchInputFileSetServiceuser - - user who is requesting the saveinputType - - instance of a BatchInputFileSetTypefileUserIdentifier - - file identifier specified by usertypeToStreamMap - - contents of the uploaded files, keyed by the input file typeFileStorageException - - if errors were encountered while attempting to write the fileorg.kuali.rice.krad.exception.AuthorizationExceptionBatchInputFileSetService.save(org.kuali.rice.kim.api.identity.Person,
org.kuali.ole.sys.batch.BatchInputFileSetType, java.lang.String, java.util.Map)protected Map<String,File> copyStreamsToTemporaryDirectory(org.kuali.rice.kim.api.identity.Person user, BatchInputFileSetType inputType, String fileUserIdentifier, Map<String,InputStream> typeToStreamMap, Date creationDate) throws FileStorageException
FileStorageExceptionprotected void copyInputStreamToFile(InputStream source, File outputFile, byte[] buf) throws IOException
IOExceptionprotected String getTempDirectoryName()
public boolean isFileUserIdentifierProperlyFormatted(String fileUserIdentifier)
BatchInputFileSetServiceisFileUserIdentifierProperlyFormatted in interface BatchInputFileSetServiceBatchInputFileSetService.isFileUserIdentifierProperlyFormatted(java.lang.String)public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService)
protected void deleteTempFiles(Map<String,File> typeToTempFiles)
public List<String> getRequiredDirectoryNames()
InitiateDirectorygetRequiredDirectoryNames in interface InitiateDirectorygetRequiredDirectoryNames in class InitiateDirectoryBaseorg.kuali.ole.sys.batch.service.impl.InitiateDirectoryImpl#getRequiredDirectoryNames()Copyright © 2004–2015 The Kuali Foundation. All rights reserved.