Package org.brixcms.jcr.wrapper

Examples of org.brixcms.jcr.wrapper.BrixNode


            if (childEntry.getReference() != null) {
                childEntry.getReference().save(node, "reference");
            }
        }
        for (Entry e : entry.getChildren()) {
            BrixNode child = (BrixNode) node.addNode("child");
            saveEntry(child, e);
        }
    }
View Full Code Here


    }

    @Override
    protected void onBeforeRender() {
        String workspaceId = getModelObject().getId();
        BrixNode current = currentNode.getObject();
        if (current != null
                && current.getSession().getWorkspace().getName().equals(workspaceId) == false) {
            currentNode.setObject(null);
            currentMenu = new Menu();
            setupEditor();
        }
        super.onBeforeRender();
View Full Code Here

                    onSelectLinkClicked(item.getModelObject());
                }

                @Override
                public boolean isEnabled() {
                    BrixNode myNode = item.getModelObject();
                    BrixNode selectedNode = currentNode.getObject();
                    if (selectedNode != null) {
                        return !Objects.equal(myNode.getIdentifier(), selectedNode.getIdentifier());
                    } else {
                        return true;
                    }
                }
            };
            IModel<String> labelModel = new AbstractModel<String>() {
                @Override
                public String getObject() {
                    BrixNode node = item.getModelObject();
                    Menu menu = new Menu();
                    menu.loadName(node);
                    return menu.getName();
                }
            };
View Full Code Here

        if (ResourceNode.FACTORY.canWrap(brix, n)) {
            return ResourceNode.FACTORY.wrap(brix, node, session);
        }

        return new BrixNode(node, session);
    }
View Full Code Here

    }


    public Map<String, String> getAttributeMap() {
        Map<String, String> original = getDelegate().getAttributeMap();
        BrixNode pageNode = new BrixNodeModel(pageNodeModel).getObject();
        if (pageNode instanceof VariableValueProvider) {
            VariableValueProvider variableValueProvider = (VariableValueProvider) pageNode;
            Map<String, String> result = new HashMap<String, String>();
            for (Entry<String, String> e : original.entrySet()) {
                String k = getKey(e.getValue());
View Full Code Here

    }

    protected boolean anyChildren(ChildEntry entry) {
        if (entry.getChildren() != null) {
            for (ChildEntry e : entry.getChildren()) {
                BrixNode node = getNode(e);
                if (node == null || SitePlugin.get().canViewNode(node, Context.PRESENTATION)) {
                    return true;
                }
            }
        }
View Full Code Here

            response.write(klass);
            response.write(">\n");
        }

        for (ChildEntry e : entry.getChildren()) {
            BrixNode node = getNode(e);
            if (node == null || SitePlugin.get().canViewNode(node, Context.PRESENTATION)) {
                renderChild(container, e, response, selected, skipLevels, renderLevels);
            }
        }
View Full Code Here

        }
    }

    private void touch(JcrNode node) {
        if (node.isNodeType("nt:file") || node.isNodeType("nt:folder")) {
            new BrixNode(node.getDelegate(), node.getSession()).touch();
        }
    }
View Full Code Here

        this.pageNodeModel.detach();
    }


    public String getText() {
        BrixNode node = new BrixNodeModel(pageNodeModel).getObject();
        if (node instanceof VariableValueProvider) {
            String value = ((VariableValueProvider) node).getVariableValue(key);
            return value != null ? value : "[" + key + "]";
        } else {
            return "Couldn't resolve variable '" + key + "'";
View Full Code Here

                    selection.setObject(item.getModelObject());
                }

                @Override
                public boolean isEnabled() {
                    BrixNode current = selection.getObject();
                    return current == null || !item.getModelObject().isSame(current);
                }
            };
            IModel<String> labelModel = new AbstractModel<String>() {
                @Override
                public String getObject() {
                    BrixNode node = item.getModelObject();
                    Menu menu = new Menu();
                    menu.loadName(node);
                    return menu.getName();
                }
            };
View Full Code Here

TOP

Related Classes of org.brixcms.jcr.wrapper.BrixNode

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.