• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

Reading from multiple input sources and storing into multiple data sources

Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

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
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic