Package org.brixcms

Examples of org.brixcms.BrixNodeModel


                getContainer().save();

                // populate node
                ResourceNode resource = (ResourceNode) getContainer().getSession().getItem(
                        node.getPath());
                model.setObject(new BrixNodeModel(resource));
                model.apply();

                getContainer().save();

                // done
View Full Code Here


      // root path handling
      if (path.isRoot()) {
        if (handleHomePage) {
          final BrixNode node = getNodeForUriPath(path);
          return SitePlugin.get().getNodePluginForNode(node)
              .respond(new BrixNodeModel(node), new BrixPageParameters(request.getRequestParameters()));
        } else {
          return null;
        }
      }

      IRequestHandler handler = null;
      try {
        while (handler == null) {
          final BrixNode node = getNodeForUriPath(path);
          if (node != null) {
            SiteNodePlugin plugin = SitePlugin.get().getNodePluginForNode(node);
            if (plugin instanceof AbstractSitePagePlugin) {
              handler = SitePlugin.get().getNodePluginForNode(node)
                  .respond(new BrixNodeModel(node), createBrixPageParams(request.getUrl(), path));
            } else {
              handler = SitePlugin.get().getNodePluginForNode(node)
                  .respond(new BrixNodeModel(node), new BrixPageParameters(request.getRequestParameters()));
            }
          }
          if (handler != null || path.toString().equals(".")) {
            break;
          }
View Full Code Here

            PageInfo info = new PageInfo(page.getPageId());
            return encode(node, page.getBrixPageParameters(), info);
        } else if (requestHandler instanceof BookmarkablePageRequestHandler
                && ((BookmarkablePageRequestHandler) requestHandler).getPageClass().equals(HomePage.class)) {
            BrixNode node = ((BrixRequestCycleProcessor) RequestCycle.get().getActiveRequestHandler()).getNodeForUriPath(Path.ROOT);
            return mapHandler(new BrixNodeRequestHandler(new BrixNodeModel(node)));
        } else {
            return null;
        }
    }
View Full Code Here

                final BrixNode node = this.brixRequestCycleProcessor.getNodeForUriPath(path);
                if (node != null) {
                    target = getSwitchTarget(node);
                    if (target == null) {
                        target = SitePlugin.get().getNodePluginForNode(node).respond(
                                new BrixNodeModel(node), new BrixPageParameters(requestParameters));
                    }
                }
                if (path.isRoot() || path.toString().equals(".")) {
                    break;
                }
View Full Code Here

    }

    public void load(BrixNode node) {
        setType(Type.valueOf(node.getProperty("type").getString()));
        if (node.hasProperty("node")) {
            setNodeModel(new BrixNodeModel((BrixNode) node.getProperty("node").getNode()));
        }
        if (node.hasProperty("url")) {
            setUrl(node.getProperty("url").getString());
        }
        if (node.hasProperty("indexedParameters")) {
View Full Code Here

    }

    public Reference(Reference copy) {
        this.type = copy.type;
        if (copy.nodeModel != null)
            this.nodeModel = new BrixNodeModel(copy.nodeModel.getObject());
        this.url = copy.url;

        if (copy.parameters != null)
            this.parameters = new BrixPageParameters(copy.parameters);
    }
View Full Code Here

            this.parameters = new BrixPageParameters(copy.parameters);
    }

    public IModel<BrixNode> getNodeModel() {
        if (nodeModel == null) {
            nodeModel = new BrixNodeModel();
        }
        return nodeModel;
    }
View Full Code Here

        super(id);
        init(rootNode, visibleFilter, enabledFilter);
    }

    private void init(JcrTreeNode rootNode, NodeFilter visibleFilter, NodeFilter enabledFilter) {
        nodeModel = new BrixNodeModel(getModel().getObject());

        add(new NodePicker("picker", this.nodeModel, rootNode, visibleFilter, enabledFilter));

        add(new AjaxLink<Void>("ok") {
            @Override
View Full Code Here

    public AbstractJcrTreeNode(BrixNode node) {
        if (node == null) {
            throw new IllegalArgumentException("Argument 'node' may not be null.");
        }
        this.nodeModel = new BrixNodeModel(node);
    }
View Full Code Here

        }

        @Override
        public void setObject(Object object) {
            if (object instanceof BrixNode) {
                super.setObject(new BrixNodeModel((BrixNode) object));
            } else {
                super.setObject(object);
            }
        }
View Full Code Here

TOP

Related Classes of org.brixcms.BrixNodeModel

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.