Examples of ItemImpl


Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

         {
            SessionImpl editSession = (SessionImpl)repository.login(agentCredentials, "ws");
            while (true)
            {

               ItemImpl item = editSession.getItem(paths.get(random.nextInt(paths.size())));
               NodeImpl parentNode = item.getParent();
               parentNode.setProperty(PROP1_NAME, PROP1_VALUE);
               editSession.save();
            }
         }
         catch (Exception e)
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

   {

      List<String> names = new ArrayList<String>();
      while (iterator.hasNext())
      {
         ItemImpl item = (ItemImpl)iterator.next();
         names.add(item.getInternalPath().getEntries()[item.getInternalPath().getDepth()].getAsString(true));
      }

      //compare names
      assertEquals(expectedNames.length, names.size());
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

      node3.setProperty("exo:text", "Ho ho ha ha");

      session.save();

      Node n = root.getNode(name);
      ItemImpl item = null;
      try
      {
         item = session.getItem("/" + name);
      }
      catch (Exception e)
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

      }
   }

   public void testGetParentDataWhenNodeIsRoot() throws RepositoryException
   {
      ItemImpl node = (ItemImpl)root;

      try
      {
         node.parentData();
         fail();
      }
      catch (ItemNotFoundException e)
      {
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

   }

   public void testEquals() throws ItemExistsException, PathNotFoundException, VersionException,
      ConstraintViolationException, LockException, RepositoryException
   {
      ItemImpl testNode1 = (ItemImpl)root.addNode("testNode1");
      ItemImpl testNode2 = (ItemImpl)root.addNode("testNode2");

      assertFalse(testNode1.equals(new Object()));
      assertFalse(testNode1.equals(testNode2));
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

    * @see org.apache.commons.chain.Command#execute(org.apache.commons.chain.Context)
    */
   @Override
   public boolean execute(Context context) throws Exception
   {
      ItemImpl currentItem = (ItemImpl)context.get("currentItem");
      Node myActionNode = ((Node)currentItem).addNode("myActionNode");
      myActionNode.setProperty(addPropertyName, addPropertyValue);

      return false;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

   {

      List<String> names = new ArrayList<String>();
      while (iterator.hasNext())
      {
         ItemImpl item = (ItemImpl)iterator.next();
         names.add(item.getName());
      }

      //compare names
      assertEquals(expectedNames.length, names.size());
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

      deletedExistingPropery = false;

      if (isMixReferenceable)
      {
         String identifier = node.getIdentifier();
         ItemImpl relItem = dstDataManager.getItemByIdentifier(identifier, false);

         ItemState changesItemState = null;
         if (changes != null)
         {
            changesItemState = changes.getItemState(identifier);
         }

         if (relItem != null && !(changesItemState != null && changesItemState.isDeleted()))
         {
            if (removeExisting)
            {
               deletedExistingPropery = true;
               itemDeletedExistingStates.add(new ItemState(relItem.getData(), ItemState.DELETED, true, dstDataManager
                  .getItemByIdentifier(relItem.getParentIdentifier(), false).getInternalPath(), level != 0));
            }
            else
            {
               throw new ItemExistsException("Item exists id = " + identifier + " name " + relItem.getName());
            }
         }
         keepIdentifiers = true;
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

   ItemImpl get(QPath path)
   {
      for (Iterator<ItemImpl> i = items.values().iterator(); i.hasNext();)
      {
         ItemImpl item = i.next();
         if (item.getInternalPath().equals(path))
            return item;
      }
      return null;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.ItemImpl

   List<NodeImpl> getChildNodes(String parentIdentifier)
   {
      List<NodeImpl> children = new ArrayList<NodeImpl>();
      for (Iterator<ItemImpl> i = items.values().iterator(); i.hasNext();)
      {
         ItemImpl item = i.next();
         if (item.getParentIdentifier().equals(parentIdentifier) && item.isNode())
            children.add((NodeImpl)item);
      }
      return children;
   }
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.