Examples of execute()


Examples of org.exoplatform.frameworks.jcr.cli.CopyNodeCommand.execute()

      params.clear();
      CopyNodeCommand copyNodeCommand = (CopyNodeCommand)cservice.getCatalog("CLI").getCommand("copynode");
      params.add("/testJCRClientCommands");
      params.add("/copyOftestJCRClientCommands");
      ctx.put(PARAMETERS_KEY, params);
      copyNodeCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertNotNull(ctx.getSession().getRootNode().getNode("copyOftestJCRClientCommands"));
   }

   public void testMoveNodeCommand() throws Exception
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.GetContextInfoCommand.execute()

   public void testContextInfoCommand() throws Exception
   {
      GetContextInfoCommand getContextInfoCommand =
         (GetContextInfoCommand)cservice.getCatalog("CLI").getCommand("getcontextinfo");
      getContextInfoCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertTrue(ctx.getOutput().contains("root"));
      assertTrue(ctx.getOutput().contains("ws"));
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.GetItemCommand.execute()

      params.clear();
      GetItemCommand getItemCommand = (GetItemCommand)cservice.getCatalog("CLI").getCommand("getitem");
      params.add("/testJCRClientCommands");
      ctx.put(PARAMETERS_KEY, params);
      getItemCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertEquals(ctx.getCurrentItem().getName(), "testJCRClientCommands");
   }

   public void testGetCtxNode() throws Exception
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.GetNodeCommand.execute()

   {
      params.clear();
      GetNodeCommand getNodeCommand = (GetNodeCommand)cservice.getCatalog("CLI").getCommand("getnode");
      params.add("childOftestJCRClientCommands");
      ctx.put(PARAMETERS_KEY, params);
      getNodeCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertEquals(ctx.getCurrentItem().getName(), "childOftestJCRClientCommands");
   }

   public void testGetCtxProperty() throws Exception
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.GetNodesCommand.execute()

      params.add("/testJCRClientCommands");
      ctx.put(PARAMETERS_KEY, params);
      getItemCommand.execute(ctx);
      // ok, now currentItem is Node "/testJCRClientCommands"
      GetNodesCommand getNodesCommand = (GetNodesCommand)cservice.getCatalog("CLI").getCommand("getnodes");
      getNodesCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertTrue(ctx.getOutput().contains("childOftestJCRClientCommands"));
   }

   public void testGetCtxProperties() throws Exception
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.GetPropertiesCommand.execute()

   public void testGetCtxProperties() throws Exception
   {
      GetPropertiesCommand getPropertiesCommand =
         (GetPropertiesCommand)cservice.getCatalog("CLI").getCommand("getproperties");
      getPropertiesCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertTrue(ctx.getOutput().contains("jcr:primaryType"));
   }

   public void testAddNode1() throws Exception
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.GetPropertyCommand.execute()

   {
      params.clear();
      GetPropertyCommand getPropertyCommand = (GetPropertyCommand)cservice.getCatalog("CLI").getCommand("getproperty");
      params.add("testProperty");
      ctx.put(PARAMETERS_KEY, params);
      getPropertyCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertEquals(((Property)ctx.getCurrentItem()).getValue().getString(), "test");
   }

   public void testGetCtxNodes() throws Exception
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.HelpCommand.execute()

   {
      params.clear();
      HelpCommand helpCommand = (HelpCommand)cservice.getCatalog("CLI").getCommand("help");
      // params.add("addnode");
      ctx.put(PARAMETERS_KEY, params);
      helpCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertTrue(ctx.getOutput().contains("addnode"));
   }

   public void testCdCommand() throws Exception
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.LoginCommand.execute()

   {
      params.clear();
      LoginCommand loginCommand = (LoginCommand)cservice.getCatalog("CLI").getCommand("login");
      params.add("ws");
      ctx.put(PARAMETERS_KEY, params);
      loginCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertEquals(ctx.getCurrentItem(), ctx.getSession().getRootNode());
      assertEquals("ws", ctx.getSession().getWorkspace().getName());
   }
View Full Code Here

Examples of org.exoplatform.frameworks.jcr.cli.MoveNodeCommand.execute()

      params.clear();
      MoveNodeCommand moveNodeCommand = (MoveNodeCommand)cservice.getCatalog("CLI").getCommand("movenode");
      params.add("/copyOftestJCRClientCommands");
      params.add("/newCopyOftestJCRClientCommands");
      ctx.put(PARAMETERS_KEY, params);
      moveNodeCommand.execute(ctx);
      System.out.println("[out]:" + ctx.getOutput());
      assertNotNull(ctx.getSession().getRootNode().getNode("newCopyOftestJCRClientCommands"));
   }

   public void testHelpCommand() throws Exception
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.