Examples of JcrNode


Examples of org.brixcms.jcr.api.JcrNode

        set.add(nodePath);

        final boolean result;

        if (tileNode.getObject().hasProperty("pageNode")) {
            JcrNode pageNode = tileNode.getObject().getProperty("pageNode").getNode();
            result = ((AbstractContainer) pageNode).requiresSSL();
        } else {
            result = false;
        }
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

        super.onBeforeRender();
    }

    private void init() {
        JcrNode tileNode = (JcrNode) getModelObject();

        if (checkLoop(getModel()) == true) {
            add(new Label("view", "Loop detected."));
        } else {
            BrixNode pageNode = (BrixNode) (tileNode.hasProperty("pageNode") ? tileNode.getProperty("pageNode")
                    .getNode() : null);

            if (pageNode != null) {
                add(new PageRenderingPanel("view", new BrixNodeModel(pageNode)));
            } else {
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

    /**
     * @deprecated
     */
    @Deprecated
    public JcrNode getNodeByUUID(final String uuid) {
        JcrNode result = uuidMap.get(uuid);
        if (result == null) {
            result = executeCallback(new Callback<JcrNode>() {
                public JcrNode execute() throws Exception {
                    Node node = getDelegate().getNodeByUUID(uuid);
                    return JcrNode.Wrapper.wrap(node, getJcrSession());
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

        }
        return result;
    }

    public JcrNode getNodeByIdentifier(final String id) {
        JcrNode result = uuidMap.get(id);
        if (result == null) {
            result = executeCallback(new Callback<JcrNode>() {
                public JcrNode execute() throws Exception {
                    Node node = getDelegate().getNodeByIdentifier(id);
                    return JcrNode.Wrapper.wrap(node, getJcrSession());
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

    public JcrNode wrap(Node node, JcrSession session) {
        if (node instanceof JcrNode) {
            return (JcrNode) node;
        }

        JcrNode n = new NodeWrapper(node, session);

        Collection<JcrNodeWrapperFactory> factories = brix.getConfig().getRegistry().lookupCollection(
                JcrNodeWrapperFactory.POINT);

        for (JcrNodeWrapperFactory factory : factories) {
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

            handleSaveEvent((SaveEvent) event);
        }
    }

    private void handleSaveEvent(SaveEvent event) {
        JcrNode node = event.getNode();
        touch(node);
        if (node.getDepth() == 0 || node.isNodeType("nt:folder")) {
            // go through immediate children to determine if there are any
            // modified ones
            JcrNodeIterator iterator = node.getNodes();
            while (iterator.hasNext()) {
                JcrNode n = iterator.nextNode();
                if (n.isModified() || n.isNew()) {
                    touch(n);
                } else if (n.hasNode("jcr:content")) {
                    JcrNode content = n.getNode("jcr:content");
                    if (content.isModified() || content.isNew()) {
                        touch(n);
                    } else if (content.hasProperty("jcr:data")) {
                        JcrProperty data = content.getProperty("jcr:data");
                        if (data.isNew() || data.isModified()) {
                            touch(n);
                        }
                    }
                }
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

    public Rule getRule(String name) {
        if (!hasNode(RULES)) {
            return null;
        } else {
            JcrNode parent = getNode(RULES);
            if (parent.hasNode(name)) {
                Rule rule = Rule.load(parent.getNode(name));
                return rule;
            } else {
                return null;
            }
        }
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

    public List<Rule> getRules(boolean sortByPriority) {
        if (!hasNode(RULES)) {
            return Collections.emptyList();
        } else {
            JcrNode rules = getNode(RULES);
            List<Rule> result = new ArrayList<Rule>();
            JcrNodeIterator n = rules.getNodes();
            while (n.hasNext()) {
                Rule rule = Rule.load(n.nextNode());
                result.add(rule);
            }
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

        return "WebDAV Rules";
    }

    public void removeRule(Rule rule) {
        if (hasNode(RULES)) {
            JcrNode parent = getNode(RULES);
            if (parent.hasNode(rule.getName())) {
                parent.getNode(rule.getName()).remove();
                parent.save();
            }
        }
    }
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode

            }
        }
    }

    public void saveRule(Rule rule) {
        JcrNode parent;
        if (!hasNode(RULES)) {
            parent = addNode(RULES, "nt:unstructured");
        } else {
            parent = getNode(RULES);
        }
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.