Package org.exoplatform.frameworks.jcr.cli

Examples of org.exoplatform.frameworks.jcr.cli.GetItemCommand


   public void testSetProperty2() throws Exception
   {
      params.clear();
      //
      GetItemCommand getItemCommand = (GetItemCommand)cservice.getCatalog("CLI").getCommand("getitem");
      params.add("..");
      ctx.put(PARAMETERS_KEY, params);
      getItemCommand.execute(ctx);
      //
      params.clear();
      SetPropertyCommand setPropertyCommand = (SetPropertyCommand)cservice.getCatalog("CLI").getCommand("setproperty");
      params.add("propertyName2");
      params.add("12345");
View Full Code Here


   public void testCdCommand() throws Exception
   {
      // go to root
      params.clear();
      GetItemCommand getItemCommand1 = (GetItemCommand)cservice.getCatalog("CLI").getCommand("getitem");
      params.add("/");
      ctx.put(PARAMETERS_KEY, params);
      getItemCommand1.execute(ctx);
      // test absPath
      params.clear();
      GetItemCommand getItemCommandAbsPath = (GetItemCommand)cservice.getCatalog("CLI").getCommand("getitem");
      params.add("/testJCRClientCommands");
      ctx.put(PARAMETERS_KEY, params);
      getItemCommandAbsPath.execute(ctx);
      assertEquals(ctx.getCurrentItem().getName(), "testJCRClientCommands");
      // go to root again
      params.clear();
      GetItemCommand getItemCommand2 = (GetItemCommand)cservice.getCatalog("CLI").getCommand("getitem");
      params.add("/");
      ctx.put(PARAMETERS_KEY, params);
      getItemCommand2.execute(ctx);
      // test relPath
      params.clear();
      GetItemCommand getItemCommandRelPath = (GetItemCommand)cservice.getCatalog("CLI").getCommand("getitem");
      params.add("testJCRClientCommands");
      ctx.put(PARAMETERS_KEY, params);
      getItemCommandRelPath.execute(ctx);
      assertEquals(ctx.getCurrentItem().getName(), "testJCRClientCommands");
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.frameworks.jcr.cli.GetItemCommand

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.