Examples of ItemImpl


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

{
   private static final Log LOG = ExoLogger.getLogger("exo-jcr-services.RemoveAuditableAction");

   public boolean execute(Context context) throws Exception
   {
      ItemImpl item = (ItemImpl) context.get("currentItem");
      int event = (Integer) context.get("event");

      Node node;
      if (item.isNode())
         node = (Node) item;
      else
         node = item.getParent();

      AuditService auditService =
               (AuditService) ((ExoContainer) context.get("exocontainer"))
                        .getComponentInstanceOfType(AuditService.class);
      RemoveAuditableVisitor removeVisitor = new RemoveAuditableVisitor(auditService);
View Full Code Here

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

   private static final Log LOG = ExoLogger.getLogger("exo-jcr-services.AddAuditableAction");

   public boolean execute(Context ctx) throws Exception
   {

      ItemImpl currentItem = (ItemImpl) ctx.get("currentItem");
      ItemImpl previousItem = (ItemImpl) ctx.get("previousItem");
      int event = (Integer) ctx.get("event");

      Node node;
      if (currentItem.isNode())
         node = (Node) currentItem;
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

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

   List<PropertyImpl> getChildProperties(String parentIdentifier)
   {
      List<PropertyImpl> children = new ArrayList<PropertyImpl>();
      for (Iterator<ItemImpl> i = items.values().iterator(); i.hasNext();)
      {
         ItemImpl item = i.next();
         if (item.getParentIdentifier().equals(parentIdentifier) && item.isNode())
            children.add((PropertyImpl)item);
      }
      return children;
   }
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 JCRItemExistsException("Item exists id = " + identifier + " name " + relItem.getName(),
                  identifier);
            }
         }
         keepIdentifiers = true;
      }
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 JCRItemExistsException("Item exists id = " + identifier + " name " + relItem.getName(),
                  identifier);
            }
         }
         keepIdentifiers = true;
      }
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
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.