• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading from multiple input sources and storing into multiple data sources

 
Amitav Anand
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

The program is totaly based on OOPS concepts.


Please let me know how to go about it.


Your help is highly appreciated.

Thanking you in advance.

Amitav Anand
 
Satish Chilukuri
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!