use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class TeamStartBootstrap method getValue.
/** Get a value from the data repository. */
protected String getValue(String name) {
DataRepository data = getDataRepository();
String prefix = getPrefix();
if (prefix == null)
prefix = "";
String dataName = DataRepository.createDataName(prefix, name);
SimpleData d = data.getSimpleValue(dataName);
return (d == null ? null : d.format());
}
use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class TeamProjectSetupWizard method createTeamSchedule.
protected String createTeamSchedule(String scheduleName) {
DataRepository data = getDataRepository();
EVTaskListRollup rollup = new EVTaskListRollup(scheduleName, data, getPSPProperties(), getObjectCache(), false);
rollup.save();
// publish the newly created schedule, with no password required.
String passwordDataName = "/ev /" + scheduleName + "/_Password_";
data.putValue(passwordDataName, ImmutableDoubleData.TRUE);
passwordDataName = "/ev /" + scheduleName + "/PW_STOR";
data.putValue(passwordDataName, StringData.create(" none "));
return rollup.getID();
}
use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class TeamProjectSetupWizard method getSimpleValue.
/** Get a value from the data repository. */
protected SimpleData getSimpleValue(String name) {
DataRepository data = getDataRepository();
String prefix = getPrefix();
if (prefix == null)
prefix = "";
String dataName = DataRepository.createDataName(prefix, name);
SimpleData d = data.getSimpleValue(dataName);
return d;
}
use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class TeamProjectSetupWizard method handleTeamSchedulePage.
/** Handle values posted from the team schedule name page */
protected void handleTeamSchedulePage() {
String scheduleName = getParameter("scheduleName");
if (scheduleName == null || scheduleName.trim().length() == 0) {
printRedirect(TEAM_SCHEDULE_URL + "?missing");
return;
}
scheduleName = scheduleName.trim();
putValue(TEAM_SCHEDULE, scheduleName);
if (!EVTaskListRollup.validName(scheduleName)) {
printRedirect(TEAM_SCHEDULE_URL + "?invalid");
return;
}
DataRepository data = getDataRepository();
if (EVTaskListData.exists(data, scheduleName) || EVTaskListRollup.exists(data, scheduleName))
printRedirect(TEAM_SCHEDULE_URL + "?duplicate");
else
showTeamConfirmPage();
}
use of net.sourceforge.processdash.data.repository.DataRepository in project processdash by dtuma.
the class ExportManager method getExportInstructionsFromData.
private Collection getExportInstructionsFromData() {
Collection result = new LinkedList();
DataRepository data = dashboard.getData();
Object hints = new DataNameFilter.PrefixLocal() {
public boolean acceptPrefixLocalName(String p, String localName) {
return localName.endsWith(EXPORT_DATANAME);
}
};
for (Iterator iter = data.getKeys(null, hints); iter.hasNext(); ) {
String name = (String) iter.next();
AbstractInstruction instr = getExportInstructionFromData(name);
if (instr != null)
result.add(instr);
}
return result;
}
Aggregations