Package net.sourceforge.processdash.tool.db

Examples of net.sourceforge.processdash.tool.db.DatabasePlugin


            if (extensions == null || extensions.isEmpty())
                return false;

            // there should always only be one instance of this extension
            // point.  If multiple are present, go with the first one
            DatabasePlugin plugin = (DatabasePlugin) extensions.get(0);
            this.databasePlugin = plugin;

            // register the plugin as an element in the data repository
            ListData dbItem = new ListData();
            dbItem.add(databasePlugin);
            data.putValue(DatabasePlugin.DATA_REPOSITORY_NAME, dbItem);
            data.pinElement(DatabasePlugin.DATA_REPOSITORY_NAME);

            // check a user setting to see whether the database plugin
            // should be started. If the user doesn't have a value for the
            // setting, only start the plugin for team dashboard datasets.
            if (Settings.getBool("tpidw.enabled", Settings.isTeamMode())) {
                plugin.initialize();
                data.addGlobalDefineDeclarations("#define DATABASE_PLUGIN t");
                return true;
            }

        } catch (Exception e) {
View Full Code Here


                           String prefix,
                           Map queryParameters,
                           Task t) {

        if (queryParameters.containsKey(DB_MODE_PARAM)) {
            DatabasePlugin plugin = QueryUtils.getDatabasePlugin(data);
            ListData criteria = getDatabaseCriteria(data, prefix,
                queryParameters);
            if (plugin != null && criteria != null)
                ImportedDefectManager.run(plugin, criteria.asList(), t);
View Full Code Here

        ListData dbItem = (ListData) context
                .get(DatabasePlugin.DATA_REPOSITORY_NAME);
        if (dbItem == null)
            return null;

        DatabasePlugin plugin = (DatabasePlugin) dbItem.get(0);
        T result = plugin.getObject(clazz);
        return result;
    }
View Full Code Here

        result.put(getOwner(), actualTimes);
    }

    private void getActualTimeSpentTeam(Map<String, Map<String, Double>> result,
            TableModel tasks, Date fromDate, Date toDate) {
        DatabasePlugin db = getDashboardContext().getDatabasePlugin();
        if (db == null)
            return;

        ProjectLocator loc = db.getObject(ProjectLocator.class);
        QueryRunner query = db.getObject(QueryRunner.class);
        if (loc == null || query == null)
            return;

        int fromDateKey = DatabasePluginUtils.getKeyForDate(fromDate, 10000);
        int toDateKey = DatabasePluginUtils.getKeyForDate(toDate, -10000);
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.tool.db.DatabasePlugin

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.