Package org.apache.airavata.common.utils

Examples of org.apache.airavata.common.utils.DBUtil


    public LocalUserStore(ServletContext servletContext) throws Exception {
        // Properties properties = WebAppUtil.getAiravataProperties(servletContext);

        hashMethod = RegistrySettings.getSetting("default.registry.password.hash.method");

        dbUtil = new DBUtil(RegistrySettings.getSetting("registry.jdbc.url"),
                RegistrySettings.getSetting("registry.jdbc.user"),
                RegistrySettings.getSetting("registry.jdbc.password"),
                RegistrySettings.getSetting("registry.jdbc.driver"));

    }
View Full Code Here


    private CertificateCredentialWriter certificateCredentialWriter;

    public void init() throws ServletException {

        DBUtil dbUtil;

        try {
            dbUtil = DBUtil.getDBUtil();
        } catch (Exception e) {
            throw new ServletException("Error initializing database operations.", e);
View Full Code Here

    public LocalUserStore(ServletContext servletContext) throws Exception {
        // Properties properties = WebAppUtil.getAiravataProperties(servletContext);

        hashMethod = RegistrySettings.getSetting("default.registry.password.hash.method");

        dbUtil = new DBUtil(RegistrySettings.getSetting("registry.jdbc.url"),
                RegistrySettings.getSetting("registry.jdbc.user"),
                RegistrySettings.getSetting("registry.jdbc.password"),
                RegistrySettings.getSetting("registry.jdbc.driver"));

        dbUtil.init();
View Full Code Here

    }

    @Before
    public void setUp() throws Exception {

        DBUtil dbUtil = new DBUtil(getJDBCUrl(), getUserName(), getPassword(), getDriver());
        dbUtil.init();

        localUserStore = new LocalUserStore(dbUtil);
    }
View Full Code Here

        log.debug(stringBuilder.toString());
    }

    private void initializeDatabaseLookup() throws RuntimeException {

        this.dbUtil = new DBUtil(getDatabaseURL(), getDatabaseUserName(), getDatabasePassword(), getDatabaseDriver());

        try {
            this.dbUtil.init();
        } catch (ClassNotFoundException e) {
            throw new RuntimeException("Error loading database driver. Driver class not found.", e);
View Full Code Here

        log.debug(stringBuilder.toString());
    }

    protected void initializeDatabaseLookup(String passwordColumn, String userTable, String userNameColumn) {

        DBUtil dbUtil = new DBUtil(getDatabaseURL(), getDatabaseUserName(), getDatabasePassword(), getDatabaseDriver());
        DataSource dataSource = dbUtil.getDataSource();
        jdbcRealm.setDataSource(dataSource);

        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder.append("SELECT ").append(passwordColumn).append(" FROM ").append(userTable).append(" WHERE ")
View Full Code Here

    private CertificateCredentialWriter certificateCredentialWriter;

    public void init() throws ServletException {

        DBUtil dbUtil;

        try {
            dbUtil = DBUtil.getDBUtil();
        } catch (Exception e) {
            throw new ServletException("Error initializing database operations.", e);
View Full Code Here

            String dbUser = ServerSettings.getCredentialStoreDBUser();
            String password = ServerSettings.getCredentialStoreDBPassword();
            String dbUrl = ServerSettings.getCredentialStoreDBURL();
            String driver = ServerSettings.getCredentialStoreDBDriver();

            DBUtil dbUtil = new DBUtil(dbUrl, dbUser, password, driver);

            credentialReader = CredentialReaderFactory.createCredentialStoreReader(dbUtil);

        } catch (Exception e) {
            credentialReader = null;
View Full Code Here

    public LocalUserStore(ServletContext servletContext) throws Exception {
        // Properties properties = WebAppUtil.getAiravataProperties(servletContext);

        hashMethod = ServerSettings.getSetting("default.registry.password.hash.method");

        dbUtil = new DBUtil(ServerSettings.getSetting("registry.jdbc.url"),
                ServerSettings.getSetting("registry.jdbc.user"),
                ServerSettings.getSetting("registry.jdbc.password"),
                ServerSettings.getSetting("registry.jdbc.driver"));

    }
View Full Code Here

    private NotifierBootstrap notifierBootstrap;

    public void init() throws ServletException {

        DBUtil dbUtil;

        try {
            AiravataUtils.setExecutionAsServer();
            dbUtil = DBUtil.getCredentialStoreDBUtil();
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.common.utils.DBUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.