Examples of findExistingKey()


Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

        try {
            ListData hierItem = (ListData) context
                    .get(DashHierarchy.DATA_REPOSITORY_NAME);
            DashHierarchy hier = (DashHierarchy) hierItem.get(0);
           
            PropertyKey key = hier.findExistingKey(prefix);
            if (key == null) return null;
           
            String templateID = hier.getID(key);
            return StringData.create(templateID);
        } catch (Exception e) {
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

    protected void writeContents() throws IOException {
        String prefix = getPrefix();
        if (prefix == null) prefix = "";

        DashHierarchy props = getPSPProperties();
        PropertyKey key = props.findExistingKey(prefix);

        out.write("<HTML><HEAD>");
        out.write("<link rel=stylesheet type='text/css' href='/style.css'>");
        out.write("<TITLE>Hierarchy");
        if (prefix.length() > 0) {
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

       
        Enumeration leafNames = getInheritedPhaseList(defectPath, context
                .getData());
        if (leafNames == null) {
            DashHierarchy hier = context.getHierarchy();
            PropertyKey defectPathKey = hier.findExistingKey(defectPath);
            if (defectPathKey == null)
                return result;
            leafNames = hier.getLeafNames(defectPathKey);
            prefixLength = defectPath.length() + 1;
        }
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

   
        // no luck so far.  Look at the task in question, and see if it only
        // includes a single phase child (typical for old-style team projects
        // with phase stubs).
        DashHierarchy hier = context.getHierarchy();
        PropertyKey defectPathKey = hier.findExistingKey(defectPath);
        if (defectPathKey != null) {
            Enumeration leafNames = hier.getLeafNames(defectPathKey);
            List possibleMatches = new ArrayList();
            while (leafNames.hasMoreElements()) {
                String oneLeaf = (String) leafNames.nextElement();
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

        }
        HTMLUtils.appendQuery(uri, "Unit", unit);
        HTMLUtils.appendQuery(uri, "Units", units);

        DashHierarchy props = getPSPProperties();
        PropertyKey self = props.findExistingKey(getPrefix());
        int numPhases = props.getNumChildren(self);
        for (int i = 0;  i < numPhases;  i++)
            HTMLUtils.appendQuery(uri, "Phases",
                props.getChildKey(self, i).name());
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

        return pathNamesTeamProjectStub(getPrefix());
    }

    private boolean pathNamesTeamProjectStub(String path) {
        DashHierarchy hierarchy = getPSPProperties();
        PropertyKey key = hierarchy.findExistingKey(path);
        String templateID = hierarchy.getID(key);
        return TEAM_STUB_ID.equals(templateID);
    }

    private void maybeSetDefaultProjectPath() {
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

        String nodeLocation = tweakLocation(getValue(NODE_LOCATION));
        String nodePath = nodeLocation + "/" + nodeName;

        // does a node already exist in the hierarchy with this path?
        DashHierarchy hier = getPSPProperties();
        PropertyKey key = hier.findExistingKey(nodePath);
        if (key != null) {
            // if the preexisting node is a team project stub, all is well.
            if (TEAM_STUB_ID.equals(hier.getID(key)))
                return nodePath;
            else
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

    }


    private List getProjectPaths() {
        DashHierarchy hier = getDashboardContext().getHierarchy();
        PropertyKey parent = hier.findExistingKey(getPrefix());
        int numKids = hier.getNumChildren(parent);
        List projectPaths = new ArrayList(numKids);
        ListData projectPathsData = new ListData();
        for (int i = 0;  i < numKids; i++) {
            PropertyKey child = hier.getChildKey(parent, i);
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

        out.close();
    }

    private String getStudentProfilePath() {
        DashHierarchy hier = getDashboardContext().getHierarchy();
        PropertyKey parent = hier.findExistingKey(getPrefix());
        int numKids = hier.getNumChildren(parent);
        for (int i = 0;  i < numKids;  i++) {
            PropertyKey child = hier.getChildKey(parent, i);
            String path = child.path();
            if (hasTag(path, "PspForEngV3_Student_Profile"))
View Full Code Here

Examples of net.sourceforge.processdash.hier.DashHierarchy.findExistingKey()

    /** Get the list of PSP3 cycle names under the current PSP3 task. */
    private String[] getCycleList() {
        String prefix = (String) env.get("PATH_TRANSLATED");
        DashHierarchy props = getPSPProperties();
        PropertyKey self = props.findExistingKey(prefix);
        // WARNING: the "4" on the next line is a magic number which
        // depends on the structure of the PSP3 template.
        int numCycles = props.getNumChildren (self) - 4;
        if (numCycles < 0) numCycles = 0;
        String [] result = new String[numCycles];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.