package org.wso2.carbon.rssmanager.core.util;

import javax.sql.DataSource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.utils.dbcreator.DatabaseCreator;

public class RSSDbCreator extends DatabaseCreator {

    private static final Log log = LogFactory.getLog(RSSDbCreator.class);
    public String dbDir = "";
	public RSSDbCreator(DataSource dataSource) {
		super(dataSource);
		
		// TODO Auto-generated constructor stub
	}
	
    protected String getDbScriptLocation(String databaseType) {
	        String scriptName = "wso2_rss_" + databaseType + ".sql";
	        if (log.isDebugEnabled()) {
	            log.debug("Loading database script from :" + scriptName);
	        }
	        String carbonHome = System.getProperty("carbon.home");
	        return dbDir.replaceFirst("DBTYPE", databaseType)  + scriptName;
	    }

}

@@ -1,8 +1,665 @@
+/*%0A* Copyright (c) 2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.%0A*%0A* WSO2 Inc. licenses this file to you under the Apache License,%0A* Version 2.0 (the %22License%22); you may not use this file except%0A* in compliance with the License.%0A* You may obtain a copy of the License at%0A*%0A* http://www.apache.org/licenses/LICENSE-2.0%0A*%0A* Unless required by applicable law or agreed to in writing,%0A* software distributed under the License is distributed on an%0A* %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A* KIND, either express or implied. See the License for the%0A* specific language governing permissions and limitations%0A* under the License.%0A*%0A*/%0A%0A
 package 
@@ -1025,18 +1025,119 @@
 ir = %22%22;
-%0A%09
+  // stores the the location of the database script that is run according to the databse type%0A    %0A    
 public R
@@ -1201,51 +1201,12 @@
 %0A%09%09%0A
-%09%09// TODO Auto-generated constructor stub%0A%09
+    
 %7D%0A%09%0A
@@ -1592,17 +1592,22 @@
 ptName;%0A
-%09
+    %09%0A
     %7D%0A%0A%7D

Update RSSDbCreator.java