Examples of NodeContext


Examples of com.hazelcast.instance.NodeContext

        if (mockNetwork) {
            if (nodeIndex.get() >= addresses.length) {
                throw new IndexOutOfBoundsException("Max " + addresses.length + " instances can be created!");
            }
            config = init(config);
            NodeContext nodeContext = registry.createNodeContext(addresses[nodeIndex.getAndIncrement()]);
            return HazelcastInstanceFactory.newHazelcastInstance(config, null, nodeContext);
        }
        if (useClient) {
            return newHazelcastClient();
        }else {
View Full Code Here

Examples of nodebox.node.NodeContext

        assertEquals(expectedResult2, context.renderNode(oscReceiveNode2.withInputValue("args", "x ,y")));
        assertEquals(expectedResult2, context.renderNode(oscReceiveNode2.withInputValue("args", "x,  y")));
    }

    private NodeContext createNodeContextWithData(Map<String, Object> data) {
        return new NodeContext(testLibrary, null, data);
    }
View Full Code Here

Examples of nodebox.node.NodeContext

    public static void assertResultsEqual(Iterable<?> result, Object... args) {
        assertEquals(ImmutableList.copyOf(args), ImmutableList.copyOf(result));
    }

    public static void assertResultsEqual(Node network, Node child, Object... args) {
        NodeContext context = new NodeContext(testLibrary);
        Iterable<?> values = context.renderChild(network, child);
        assertResultsEqual(values, args);
    }
View Full Code Here

Examples of nodebox.node.NodeContext

    public static void assertNoResults(Node network, Node child) {
        assertResultsEqual(network, child);
    }

    public static void assertResultsEqual(Node node, Object... args) {
        NodeContext context = new NodeContext(testLibrary);
        Iterable<?> values = context.renderNode(node);
        assertResultsEqual(values, args);
    }
View Full Code Here

Examples of org.exoplatform.portal.mop.navigation.NodeContext

                    return "Adding node " + target.getName() + " to parent " + parent.getName();
                }

                @Override
                public void rollback() throws Exception {
                    NodeContext node = parent.add(index, name);
                    node.setState(state);
                    node.setHidden(hidden);
                }
            });
        }
View Full Code Here

Examples of org.exoplatform.portal.mop.navigation.NodeContext

    public NodeContext<?> perform() {
        NavigationContext navigationCtx = navigationService.loadNavigation(navigationKey);

        //
        if (navigationCtx != null) {
            NodeContext root = navigationService.loadNode(NodeModel.SELF_MODEL, navigationCtx, GenericScope.branchShape(path),
                    null);

            //
            NodeContext from = root;
            for (String name : path) {
                NodeContext a = from.get(name);
                if (a != null) {
                    from = a;
                } else {
                    from = from.add(null, name);
                }
View Full Code Here

Examples of org.exoplatform.portal.mop.navigation.NodeContext

                    return "Adding node " + target.getName() + " to parent " + parent.getName();
                }

                @Override
                public void rollback() throws Exception {
                    NodeContext node = parent.add(index, name);
                    node.setState(state);
                    node.setHidden(hidden);
                }
            });
        }
View Full Code Here

Examples of org.exoplatform.portal.mop.navigation.NodeContext

      NavigationContext navigationCtx = navigationService.loadNavigation(navigationKey);

      //
      if (navigationCtx != null)
      {
         NodeContext root = navigationService.loadNode(NodeModel.SELF_MODEL, navigationCtx, GenericScope.branchShape(path), null);

         //
         NodeContext from = root;
         for (String name : path)
         {
            NodeContext a = from.get(name);
            if (a != null)
            {
               from = a;
            }
            else
View Full Code Here

Examples of org.exoplatform.portal.mop.navigation.NodeContext

            }

            @Override
            public void rollback() throws Exception
            {
               NodeContext node = parent.add(index, name);
               node.setState(state);
               node.setHidden(hidden);
            }
         });
      }
View Full Code Here

Examples of org.exoplatform.portal.mop.navigation.NodeContext

            path = requestPath.substring(1).split("/");
        } else {
            path = requestPath.split("/");
        }

        NodeContext nodeContext = navService.loadNode(NodeModel.SELF_MODEL, navContext,
                GenericScope.branchShape(path, Scope.ALL), null);

        boolean found = true;
        String lastCommonAncestor = "/";

        for (String nodeName : path) {
            nodeContext = nodeContext.get(nodeName);
            if (nodeContext == null) {
                found = false;
                break;
            } else {
                if (lastCommonAncestor.equals("/")) {
                    lastCommonAncestor += nodeContext.getName();
                } else {
                    lastCommonAncestor += "/" + nodeContext.getName();
                }
            }
        }

        if (found == true) {
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.