use of net.sourceforge.processdash.api.PDashContext in project processdash by dtuma.
the class WorkflowReport method getWorkflowsForCurrentProject.
private Map<String, String> getWorkflowsForCurrentProject(HttpServletRequest req) {
DashboardContext dash = (DashboardContext) PDashServletUtils.buildEnvironment(req).get(TinyCGI.DASHBOARD_CONTEXT);
DatabasePlugin databasePlugin = dash.getDatabasePlugin();
QueryUtils.waitForAllProjects(databasePlugin);
QueryRunner queryRunner = databasePlugin.getObject(QueryRunner.class);
PDashContext ctx = PDashServletUtils.getContext(req);
String projectID = ctx.getData().getString("Project_ID");
String workflowProcessIDPattern = DatabasePluginUtils.getWorkflowPhaseIdentifier(projectID, "%");
Map<String, String> result = new TreeMap<String, String>();
String query = Settings.isTeamMode() ? WORKFLOW_LIST_QUERY : WORKFLOW_LIST_QUERY_PERSONAL;
QueryUtils.mapColumns(result, //
queryRunner.queryHql(//
query, workflowProcessIDPattern));
return result;
}
Aggregations