public interface BatchInputFileService
Modifier and Type | Method and Description |
---|---|
boolean |
isBatchInputTypeActive(BatchInputFileType batchInputFileType)
Checks if the batch input type is active (can be used for upload).
|
boolean |
isFileUserIdentifierProperlyFormatted(String fileUserIdentifier)
Returns whether a file user identifier is properly formatted.
|
List<String> |
listBatchTypeFilesForUser(BatchInputFileType batchInputFileType,
org.kuali.rice.kim.api.identity.Person user)
Returns a list of batch type file names (without path) that the given user has permissions to manage.
|
List<String> |
listInputFileNamesWithDoneFile(BatchInputFileType batchInputFileType)
Returns a list of existing input files for the batch type that have an associated .done file
|
Object |
parse(BatchInputFileType batchInputFileType,
byte[] fileByteContent)
Unmarshalls the file contents to an Object using the digestor and digestor rules file specified in the batch input type.
|
String |
save(org.kuali.rice.kim.api.identity.Person user,
BatchInputFileType inputType,
String fileUserIdentifier,
InputStream fileContents,
Object parsedObject)
Stores the inputstream as a file on the server, identified by the given user file name.
|
String |
save(org.kuali.rice.kim.api.identity.Person user,
BatchInputFileType inputType,
String fileUserIdentifier,
InputStream fileContents,
Object parsedObject,
String destinationFilePath,
String extension)
Stores the inputstream as a file on the server, identified by the given user file name.
|
boolean |
validate(BatchInputFileType inputType,
Object parsedObject)
Using the input type object parses and validates the file contents by calling validate on the batch input type.
|
Object parse(BatchInputFileType batchInputFileType, byte[] fileByteContent)
batchInputFileType
- - batch input file type for the file to parsefileByteContent
- - byte contents of file to parseboolean validate(BatchInputFileType inputType, Object parsedObject)
inputType
- - instance of a BatchInputFileTypeparsedObject
- - the Object built from parsing xml contentsString save(org.kuali.rice.kim.api.identity.Person user, BatchInputFileType inputType, String fileUserIdentifier, InputStream fileContents, Object parsedObject) throws org.kuali.rice.krad.exception.AuthorizationException, FileStorageException
user
- - user who is requesting the saveinputType
- - instance of a BatchInputFileTypefileUserIdentifier
- - file identifier specified by userfileContents
- - contents of the uploaded fileparsedObject
- - object parsed from the input fileFileStorageException
- - if errors were encountered while attempting to write the fileorg.kuali.rice.krad.exception.AuthorizationException
String save(org.kuali.rice.kim.api.identity.Person user, BatchInputFileType inputType, String fileUserIdentifier, InputStream fileContents, Object parsedObject, String destinationFilePath, String extension) throws org.kuali.rice.krad.exception.AuthorizationException, FileStorageException
user
- - user who is requesting the saveinputType
- - instance of a BatchInputFileTypefileUserIdentifier
- - file identifier specified by userfileContents
- - contents of the uploaded fileparsedObject
- - object parsed from the input filedestinationFilePath
- - destination path selected by user for storing the ole format xml.extension
- - extension of the file selected through marc file upload screenFileStorageException
- - if errors were encountered while attempting to write the fileorg.kuali.rice.krad.exception.AuthorizationException
boolean isBatchInputTypeActive(BatchInputFileType batchInputFileType)
batchInputFileType
- - input type to check is activeList<String> listBatchTypeFilesForUser(BatchInputFileType batchInputFileType, org.kuali.rice.kim.api.identity.Person user) throws org.kuali.rice.krad.exception.AuthorizationException
user
- - user for checking permissionsorg.kuali.rice.krad.exception.AuthorizationException
List<String> listInputFileNamesWithDoneFile(BatchInputFileType batchInputFileType)
batchInputFileType
- - batch type to retieve files forboolean isFileUserIdentifierProperlyFormatted(String fileUserIdentifier)
fileUserIdentifier
- Copyright © 2004–2015 The Kuali Foundation. All rights reserved.