Examples of AugeasTreeException


Examples of org.rhq.augeas.tree.AugeasTreeException

            if (expression.indexOf(PATH_SEPARATOR) == 0)
                expression = expression.substring(1);

            return parseExpr(node, expression);
        } catch (Exception e) {
            throw new AugeasTreeException(e.getMessage());
        }
    }
View Full Code Here

Examples of org.rhq.augeas.tree.AugeasTreeException

        }
        return tempNode;
    }

    public void remove(boolean updateSeq) throws AugeasTreeException {
        throw new AugeasTreeException(
            "Root node is virtual and can not be removed. If you want to remove data remove all child nodes.");
    }
View Full Code Here

Examples of org.rhq.augeas.tree.AugeasTreeException

        return nodes;
    }

    public List<AugeasNode> matchRelative(AugeasNode node, String expression) throws AugeasTreeException {
        if (rootNode.getChildNodes().isEmpty())
            throw new AugeasTreeException("Root node has no children.");

        if (node.equals(rootNode)) {
            List<AugeasNode> nodes = rootNode.getChildNodes();
            List<AugeasNode> returnNodes = new ArrayList<AugeasNode>();
            for (AugeasNode nd : nodes) {
View Full Code Here

Examples of org.rhq.augeas.tree.AugeasTreeException

        if (index != -1) {
            String parentPath = fullPath.substring(0, index);
            AugeasNode parentNode = getNode(parentPath);
            node = new AugeasNodeReal(parentNode, this, fullPath);
        } else
            throw new AugeasTreeException("Node cannot be created. Parent node does not exist.");

        node.setValue(get(fullPath));

        List<AugeasNode> childs = match(fullPath + PATH_SEPARATOR + "*");

 
View Full Code Here

Examples of org.rhq.augeas.tree.AugeasTreeException

     * @throws AugeasTreeException if the specified module wasn't configured or if there was some error loading
     * the tree.
     */
    public AugeasTree getAugeasTree(String moduleName, boolean lazy) throws AugeasTreeException {
        if (!modules.contains(moduleName))
            throw new AugeasTreeException("Augeas Module " + moduleName + " not found.");

        try {
            if (augeas == null)
                load();

        } catch (Exception e) {
            throw new AugeasTreeException("Loading of augeas failed");
        }

        AugeasTree tree;

        try {
            tree = augeasTreeBuilder.buildTree(this, config, moduleName, lazy);
        } catch (Exception e) {
            throw new AugeasTreeException("Error building Augeas tree.", e);
        }

        return tree;
    }
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.