use composite design pattern ..
create datasource base class(abstract) and inehrit diff concrete data source with all having own logic to getdata method with diff params.
now in main class will keep reference of base object and initialize this at runtime and which intern will invoke appropriate concrete method