I have got to write a standalone Java Program and the specifications are as follows:
The program takes inputs from Various files and Writes into different data sources . The intial inputs and the data sources are
The Inputs are
a)XML b)Comma Separated Text File
The Data Sources are
1.Oracle Data Source 2.An Active Directory
At a given point of time Only One input and One Output is valid and might change for each execution of the program.
There is a possibility of more input formats and Output data Sources. The other requirement is we can not change the already existing / tested code when we need to support new input formats and new output data sources. OfCourse we can write additional code.
Have a class for processing each file type. Each class accepts the file, processes the data and returns a result. Also have a class for each datasource which will accept the result and write it to the datasource.
Now have some "Controller" sort of class which takes in an input, determines the file type and based on the file type, instantiates the corresponding class, gets the processed result and feeds it to a corresponding datasource class.
The configuration information can be maintained outside the code say in a properties file. [ January 09, 2006: Message edited by: Satish Chilukuri ]