use of net.sourceforge.processdash.hier.Prop in project processdash by dtuma.
the class DashController method getTemplates.
public static Map getTemplates() {
Prop templates = dash.templates.pget(PropertyKey.ROOT);
TreeMap result = new TreeMap();
for (int i = templates.getNumChildren(); i-- > 0; ) {
PropertyKey childKey = templates.getChild(i);
Prop child = dash.templates.pget(childKey);
result.put(child.getID(), Prop.unqualifiedName(childKey.name()));
}
return result;
}
use of net.sourceforge.processdash.hier.Prop in project processdash by dtuma.
the class DashController method getDataAndDefectFilesInUse.
private static void getDataAndDefectFilesInUse(Set<String> filesInUse, PropertyKey node) {
Prop p = dash.getHierarchy().pget(node);
filesInUse.add(lower(p.getDataFile()));
filesInUse.add(lower(p.getDefectLog()));
for (int i = dash.getHierarchy().getNumChildren(node); i-- > 0; ) {
PropertyKey child = dash.getHierarchy().getChildKey(node, i);
getDataAndDefectFilesInUse(filesInUse, child);
}
}
use of net.sourceforge.processdash.hier.Prop in project processdash by dtuma.
the class MigrationToolIndivLauncher method assertNoMultiplePhases.
private void assertNoMultiplePhases(PropertyKey node) {
Prop p = ctx.getHierarchy().pget(node);
if (p.getNumChildren() == 0)
return;
String templateID = p.getID();
if (templateID != null && templateID.startsWith("PSP"))
return;
List<String> phases = getPhaseChildren(node);
int nonPhaseChildCount = p.getNumChildren() - phases.size();
if (node == projectRoot) {
// don't perform these tests for the root node - they aren't
// applicable there.
} else if (!phases.isEmpty() && nonPhaseChildCount > 0) {
String message = getRes("Error.Hybrid_Node_FMT", esc(node.path()), enumeratePaths(node.path(), phases));
failedPreconditions.add(message);
showDeleteAdvice = true;
} else if (phases.size() > 1) {
String message = getRes("Error.Multiple_Phases_FMT", esc(node.path()), enumeratePaths(node.path(), phases));
failedPreconditions.add(message);
showDeleteAdvice = true;
}
for (int i = 0; i < p.getNumChildren(); i++) assertNoMultiplePhases(p.getChild(i));
}
use of net.sourceforge.processdash.hier.Prop in project processdash by dtuma.
the class MigrationToolTeam method getDataFileName.
private String getDataFileName(DashboardContext ctx, String path) {
DashHierarchy hier = ctx.getHierarchy();
PropertyKey key = hier.findExistingKey(path);
if (key == null) {
logger.severe("No property key found for '" + path + "'");
return null;
}
Prop p = hier.pget(key);
if (p == null) {
logger.severe("No prop found for '" + path + "'");
return null;
}
String dataFileName = p.getDataFile();
if (dataFileName == null) {
logger.severe("No datafile associated with '" + path + "'");
return null;
}
return dataFileName;
}
use of net.sourceforge.processdash.hier.Prop in project processdash by dtuma.
the class TemplateLoader method addScriptMaps.
private static void addScriptMaps(DashHierarchy templates, PropertyKey key, String ID, Vector v) {
Prop val = (Prop) templates.get(key);
if (val == null)
return;
if (Prop.hasValue(val.getID())) {
ID = val.getID();
v = (Vector) scriptMaps.get(ID);
if (v == null)
scriptMaps.put(ID, (v = new Vector()));
}
val.setScriptFile(processScriptFlag(v, val.getScriptFile()));
for (int i = 0; i < val.getNumChildren(); i++) addScriptMaps(templates, val.getChild(i), ID, v);
}
Aggregations