Issue Details (XML | Word | Printable)

Key: BATCH-16
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Robert Kasanicky
Reporter: Lucas Ward
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Spring Batch

Factor out common file handling concerns of Xml and FlatFile output templates

Created: 13/Jun/07 09:09 AM   Updated: 07/Aug/08 10:06 AM
Component/s: Infrastructure
Affects Version/s: 1.0-m1
Fix Version/s: 1.1.0

Time Tracking:
Original Estimate: 0.5d
Original Estimate - 0.5d
Remaining Estimate: 0.5d
Remaining Estimate - 0.5d
Time Spent: Not Specified
Remaining Estimate - 0.5d

Issue Links:
Depends
Related
 


 Description  « Hide
Both the Xml and FlatFile output templates deal with creating a file, and in certain cases dealing with what to do with a file that already exists. Since both do the same thing, it seems logical that they could both extend an abstract class that deals with the files in a uniform way.

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Dave Syer added a comment - 28/Aug/07 05:56 AM
Can't fix this until the contents of Xml package are finalised (BATCH-113).

Lucas Ward added a comment - 04/Oct/07 10:01 AM
This is fixed in the StexEventWriterOutputSource, but not in the FlatFileOutputSource, once FileUtils is used in the later, this issue can be closed.

Peter Zozom added a comment - 26/Oct/07 07:44 AM
Refactored FlatFileOutputSources (single and splittable), which were attached to issue BATCH-34 now uses FileUtils.

Ben Hale added a comment - 20/Mar/08 05:50 AM
Has this been sorted?

Dave Syer added a comment - 20/Mar/08 06:43 AM
To a large extent. There is a FileUtils now that was created in response to this issue (it was never closed because you can always do more). I'm happy to resolve this against 1.0.

Lucas Ward added a comment - 20/Mar/08 10:25 AM
I hasn't really been resolved, not everything uses the FileUtils, and it's not really generic in the original intent of the issue. The problem is that if you wanted to do something like BATCH-34. If I wanted to work with an ItemReader or ItemWriter that required a file generically I can't. It's not a huge deal, it just means you would need ItemReader or writer specific abstractions to wrap it. It would mean a bit of code duplication and some weirdness but not the end of the world. No way to change this for release 1 though, it will have to be a 1.1 thing.

Ben Hale added a comment - 20/Mar/08 10:47 AM
Sounds good.

Lucas Ward added a comment - 03/Jun/08 06:06 PM
Robert, I think you've solved some of this issue with your work on the MultiResourceItemReader.

Robert Kasanicky added a comment - 05/Jun/08 07:01 AM
Both FlatFileItemWriter and StaxEventItemWriter now use FileUtils so consistency is achieved. If we want to do something more it will be better to track it in a fresh issue.

Dave Syer added a comment - 07/Aug/08 10:06 AM
Assume closed as resolved and released