Package net.sourceforge.processdash.data

Examples of net.sourceforge.processdash.data.ListData


    }

    private boolean listLongerThan(String projectPath, String listName,
            int length) {
        String name = projectPath + "/" + listName;
        ListData l = ListData.asListData(ctx.getData().getSimpleValue(name));
        return l != null && l.size() > length;
    }
View Full Code Here


        }
    }

    private int hierChangeCount = 0;
    private void registerHierarchyDataElement() {
        ListData propItem = new ListData();
        propItem.add(props);
        propItem.add(String.valueOf(hierChangeCount++));
        data.putValue(DashHierarchy.DATA_REPOSITORY_NAME, propItem);
    }
View Full Code Here

            // point.  If multiple are present, go with the first one
            DatabasePlugin plugin = (DatabasePlugin) extensions.get(0);
            this.databasePlugin = plugin;

            // register the plugin as an element in the data repository
            ListData dbItem = new ListData();
            dbItem.add(databasePlugin);
            data.putValue(DatabasePlugin.DATA_REPOSITORY_NAME, dbItem);
            data.pinElement(DatabasePlugin.DATA_REPOSITORY_NAME);

            // check a user setting to see whether the database plugin
            // should be started. If the user doesn't have a value for the
View Full Code Here

        if (!XMLUtils.hasValue(flag))
            flag = null;
        if (e.hasAttribute("nt"))
            nodeType = e.getAttribute("nt");
        if (e.hasAttribute("nts"))
            nodeTypeSpec = new ListData(e.getAttribute("nts"));

        planTimeEditable = planTimeNull = planTimeUndefined = false;
        actualPreTime = 0;

        List childElements = XMLUtils.getChildElements(e);
View Full Code Here

    public void userSetNodeType(Object aValue) {
        if (!isNodeTypeEditable() || aValue == null)
            return;       
        String newType = aValue.toString();

        ListData allowedTypes = getAcceptableNodeTypes();
        if (allowedTypes == null || !allowedTypes.contains(newType))
            return;
       
        String dataName = DataRepository.createDataName(fullName,
                NODE_TYPE_DATA_NAME);
        this.nodeType = newType;
View Full Code Here

     */
    public boolean isNodeTypeInvalid() {
        if (nodeType == null || nodeType.length() == 0 || isNodeTypeImplicit())
            return false;

        ListData l = getAcceptableNodeTypes();
        return (l != null && !l.contains(nodeType));
    }
View Full Code Here

            return null;
        else
            return parent.getAcceptableNodeTypes();
    }
    protected String getNodeTypeSpecValue(String key, String defaulVal) {
        ListData spec = getAcceptableNodeTypes();
        if (spec == null)
            return defaulVal;
       
        String prefix = "(" + key + ":";
        for (int i = 0;  i < spec.size();  i++) {
            String specItem = (String) spec.get(i);
            if (specItem.startsWith(prefix) && specItem.endsWith(")"))
                return specItem.substring(prefix.length(), specItem.length()-1);
        }

        return defaulVal;
View Full Code Here

        }
    }

    private void loadLabelData(String path) {
        String dataName = DataRepository.createDataName(path, LABELS_DATA_NAME);
        ListData list = ListData.asListData(data.getSimpleValue(dataName));
        if (list == null || list.size() == 0)
            return;

        maybeListenForDataChanges(dataName);

        String currentLabel = null;
        String currentMilestone = null;
        for (int i = 0; i < list.size(); i++) {
            String item = StringUtils.asString(list.get(i));
            if (item == null || item.length() == 0) {
                continue;

            } else if (NO_LABEL.equals(item) || LABEL_PREFIX.equals(item)) {
                currentLabel = currentMilestone = null;
View Full Code Here

            prefix = context.get(ExpressionContext.PREFIXVAR_NAME).format();

        if (prefix == null) return null;
       
        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);
View Full Code Here

     *
     * This method <b>must</b> be thread-safe.
     */
    public Object call(java.util.List arguments, ExpressionContext context)
    {
        ListData result = new ListData();
        Iterator i = collapseLists(arguments, 0).iterator();
        while (i.hasNext())
            result.add(i.next());

        return result;
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.data.ListData

Copyright © 2018 www.massapicom. 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.