|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.sys.batch.service.impl.BatchInputFileSetServiceImpl
public class BatchInputFileSetServiceImpl
Base implementation to manipulate batch input file sets from the batch upload screen
Constructor Summary | |
---|---|
BatchInputFileSetServiceImpl()
|
Method Summary | |
---|---|
protected void |
copyInputStreamToFile(InputStream source,
File outputFile,
byte[] buf)
|
protected Map<String,File> |
copyStreamsToTemporaryDirectory(org.kuali.rice.kim.bo.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.bo.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.bo.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.bo.Person user,
BatchInputFileSetType inputType,
String fileUserIdentifier,
String fileType,
Date creationDate)
Generates the file name of a file (not the done file) |
protected org.kuali.rice.kns.service.KualiConfigurationService |
getKualiConfigurationService()
|
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.bo.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 |
setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BatchInputFileSetServiceImpl()
Method Detail |
---|
protected String generateFileName(org.kuali.rice.kim.bo.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 type
protected String generateTempFileName(org.kuali.rice.kim.bo.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 type
protected String generateDoneFileName(org.kuali.rice.kim.bo.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 type
public boolean isBatchInputTypeActive(BatchInputFileSetType batchInputFileSetType)
BatchInputFileSetService
isBatchInputTypeActive
in interface BatchInputFileSetService
BatchInputFileSetService.isBatchInputTypeActive(org.kuali.kfs.sys.batch.BatchInputFileSetType)
public Map<String,String> save(org.kuali.rice.kim.bo.Person user, BatchInputFileSetType inputType, String fileUserIdentifier, Map<String,InputStream> typeToStreamMap) throws org.kuali.rice.kns.exception.AuthorizationException, FileStorageException
BatchInputFileSetService
save
in interface BatchInputFileSetService
user
- - 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 type
FileStorageException
- - if errors were encountered while attempting to write the file
org.kuali.rice.kns.exception.AuthorizationException
BatchInputFileSetService.save(org.kuali.rice.kim.bo.Person,
org.kuali.kfs.sys.batch.BatchInputFileSetType, java.lang.String, java.util.Map)
protected Map<String,File> copyStreamsToTemporaryDirectory(org.kuali.rice.kim.bo.Person user, BatchInputFileSetType inputType, String fileUserIdentifier, Map<String,InputStream> typeToStreamMap, Date creationDate) throws FileStorageException
FileStorageException
protected void copyInputStreamToFile(InputStream source, File outputFile, byte[] buf) throws IOException
IOException
protected String getTempDirectoryName()
public boolean isFileUserIdentifierProperlyFormatted(String fileUserIdentifier)
BatchInputFileSetService
isFileUserIdentifierProperlyFormatted
in interface BatchInputFileSetService
BatchInputFileSetService.isFileUserIdentifierProperlyFormatted(java.lang.String)
protected org.kuali.rice.kns.service.KualiConfigurationService getKualiConfigurationService()
public void setKualiConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService kualiConfigurationService)
protected void deleteTempFiles(Map<String,File> typeToTempFiles)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |