Package com.sonyericsson.hudson.plugins.metadata.model.definitions

Examples of com.sonyericsson.hudson.plugins.metadata.model.definitions.StringMetadataDefinition


                        child31
                            child312=something else
             */
        TreeNodeMetadataDefinition[] startTree = createTreePath("", "root", "child1");
        TreeNodeMetadataDefinition startChild1 = startTree[1];
        startChild1.addChild(new StringMetadataDefinition("child11", "something"));
        TreeNodeMetadataDefinition startRoot = startTree[0];
        startRoot.addChild(new StringMetadataDefinition("child2", "something"));
        addValue(startRoot, "something", "", "child3", "child31", "child311");
        addValue(startRoot, "something", "", "child3", "child31", "child312");

        TreeNodeMetadataDefinition addRoot = createPath("something", "", "root", "child1", "child12");
        addValue(addRoot, "something else", "", "child2");
View Full Code Here


     * @param description the description
     * @param path        the full path to the leaf.
     * @return the tree.
     */
    public static TreeNodeMetadataDefinition createPath(String value, String description, String... path) {
        StringMetadataDefinition str = new StringMetadataDefinition(path[path.length - 1], description, value, false);
        return createPath(str, Arrays.copyOf(path, path.length - 1));
    }
View Full Code Here

     * @param description the description of the leaf node.
     * @param path        the path to the leaf from the root.
     * @return true if there was no merge conflicts.
     */
    public static boolean addValue(MetadataParent root, String value, String description, String... path) {
        StringMetadataDefinition sVal = new StringMetadataDefinition(path[path.length - 1], description, value, false);
        return addValue(root, sVal, Arrays.copyOf(path, path.length - 1));
    }
View Full Code Here

     * Tests the conversion from definitions to values for TreeNodes.
     *
     * @throws Exception if so.
     */
    public void testNodeConversion() throws Exception {
        StringMetadataDefinition string = new StringMetadataDefinition("string", "myValue");
        TreeNodeMetadataDefinition tree = new TreeNodeMetadataDefinition("tree");
        tree.addChild(string);
        List<AbstractMetadataDefinition> list = new LinkedList<AbstractMetadataDefinition>();
        list.add(tree);
        PluginImpl.getInstance().setDefinitions(list);
View Full Code Here

        TreeNodeMetadataValue[] startTree = TreeStructureUtil.createTreePath("", "root", "child1");
        TreeNodeMetadataValue treeValue = startTree[0];
        TreeStructureUtil.addValue(treeValue, "nonDefaultVal", "", "child1", "child12");
        values = new LinkedList<MetadataValue>();
        values.add(treeValue);
        StringMetadataDefinition stringDef = new StringMetadataDefinition("child12", "defaultVal");
        TreeNodeMetadataDefinition subTreeDef = new TreeNodeMetadataDefinition("child1");
        subTreeDef.addChild(stringDef);
        startTreeNode = new TreeNodeMetadataDefinition("root", new LinkedList<MetadataDefinition>());
        startTreeNode.addChild(subTreeDef);
    }
View Full Code Here

TOP

Related Classes of com.sonyericsson.hudson.plugins.metadata.model.definitions.StringMetadataDefinition

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.