Search in sources :

Example 51 with DashHierarchy

use of net.sourceforge.processdash.hier.DashHierarchy in project processdash by dtuma.

the class TeamProjectSetupWizard method getNodeLocationError.

private String getNodeLocationError() {
    String nodeLocation = getValue(NODE_LOCATION);
    if (nodeLocation == null)
        return "nodeLocationMissing";
    DashHierarchy hierarchy = getPSPProperties();
    PropertyKey key = hierarchy.findExistingKey(nodeLocation);
    if (key == null)
        return "nodeLocationNotFound";
    while (key != null) {
        String templateID = hierarchy.getID(key);
        if (templateID != null && templateID.length() > 0)
            return "nodeLocationBadParent";
        key = key.getParent();
    }
    return null;
}
Also used : DashHierarchy(net.sourceforge.processdash.hier.DashHierarchy) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 52 with DashHierarchy

use of net.sourceforge.processdash.hier.DashHierarchy in project processdash by dtuma.

the class TeamProjectSetupWizard method getTemplateID.

private String getTemplateID(String path) {
    DashHierarchy hierarchy = getPSPProperties();
    PropertyKey key = hierarchy.findExistingKey(path);
    return hierarchy.getID(key);
}
Also used : DashHierarchy(net.sourceforge.processdash.hier.DashHierarchy) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 53 with DashHierarchy

use of net.sourceforge.processdash.hier.DashHierarchy in project processdash by dtuma.

the class TeamProjectSetupWizard method maybeSetProjectRootNodeId.

private void maybeSetProjectRootNodeId(String projectID) {
    DashHierarchy hier = getPSPProperties();
    if (hier.hasNodeIDs()) {
        PropertyKey rootKey = hier.findExistingKey(getPrefix());
        hier.pget(rootKey).setNodeID(projectID + ":root");
    }
}
Also used : DashHierarchy(net.sourceforge.processdash.hier.DashHierarchy) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 54 with DashHierarchy

use of net.sourceforge.processdash.hier.DashHierarchy in project processdash by dtuma.

the class RestoreIndivDataWorker method analyze.

public void analyze(String path, Defect d) {
    DashHierarchy hier = ctx.getHierarchy();
    PropertyKey node = hier.findClosestKey(path);
    DefectLogID defectLogID = hier.defectLog(node, defectDirectory);
    DefectLog defectLog = new DefectLog(defectLogID.filename, defectLogID.path.path(), ctx.getData());
    if (defectLog.getDefect(d.number) == null)
        defectLog.writeDefect(d);
}
Also used : DefectLog(net.sourceforge.processdash.log.defects.DefectLog) DashHierarchy(net.sourceforge.processdash.hier.DashHierarchy) DefectLogID(net.sourceforge.processdash.log.defects.DefectLogID) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 55 with DashHierarchy

use of net.sourceforge.processdash.hier.DashHierarchy in project processdash by dtuma.

the class RestoreIndivDataWorker method scanHierarchyForIDs.

private void scanHierarchyForIDs() {
    hierarchyPathsToIDs = new HashMap<String, String>();
    hierarchyIDsToPaths = new HashMap<String, String>();
    DashHierarchy hier = ctx.getHierarchy();
    PropertyKey projectNode = hier.findExistingKey(projectPrefix);
    scanHierarchyForIDs(hier, projectNode);
}
Also used : DashHierarchy(net.sourceforge.processdash.hier.DashHierarchy) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Aggregations

DashHierarchy (net.sourceforge.processdash.hier.DashHierarchy)56 PropertyKey (net.sourceforge.processdash.hier.PropertyKey)40 ArrayList (java.util.ArrayList)7 ListData (net.sourceforge.processdash.data.ListData)6 List (java.util.List)5 HashMap (java.util.HashMap)4 DataRepository (net.sourceforge.processdash.data.repository.DataRepository)4 Point (java.awt.Point)3 Iterator (java.util.Iterator)3 ProcessDashboard (net.sourceforge.processdash.ProcessDashboard)3 SimpleData (net.sourceforge.processdash.data.SimpleData)3 TinyCGIException (net.sourceforge.processdash.net.http.TinyCGIException)3 IOException (java.io.IOException)2 Enumeration (java.util.Enumeration)2 HashSet (java.util.HashSet)2 LinkedList (java.util.LinkedList)2 HierarchyAlterer (net.sourceforge.processdash.hier.HierarchyAlterer)2 Prop (net.sourceforge.processdash.hier.Prop)2 DefectLog (net.sourceforge.processdash.log.defects.DefectLog)2 DefectLogID (net.sourceforge.processdash.log.defects.DefectLogID)2