Examples of TransactionChangesLog


Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

         return;
      }

      PlainChangesLog changesLog = new PlainChangesLogImpl();
      definitionAccessProvider.write(changesLog, nodeTypeStorageRoot, nodeType);
      dataManager.save(new TransactionChangesLog(changesLog));
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

      {
         log.debug("/jcr:system/jcr:nodetypes is created, creation time: " + (System.currentTimeMillis() - start)
            + " ms");
      }

      dataManager.save(new TransactionChangesLog(changesLog));

      return jcrNodetypes;

   }
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

      for (NodeTypeData nodeTypeData : nodeTypes)
      {
         definitionAccessProvider.write(changesLog, nodeTypeStorageRoot, nodeTypeData);
      }

      dataManager.save(new TransactionChangesLog(changesLog));

   }
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

      ItemDataRemoveVisitor removeVisitor = new ItemDataRemoveVisitor(dataManager, nodeTypeStorageRoot.getQPath());
      nodeTypeData.accept(removeVisitor);

      PlainChangesLog changesLog = new PlainChangesLogImpl();
      changesLog.addAll(removeVisitor.getRemovedStates());
      dataManager.save(new TransactionChangesLog(changesLog));
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

         }
      }
      //made changes if needed
      if (changesLog.getSize() > 0)
      {
         dataManager.save(new TransactionChangesLog(changesLog));
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

         if (lockOwner == null && lockIsDeep == null)
         {
            return;
         }

         dataManager.save(new TransactionChangesLog(changesLog));
      }
      catch (JCRInvalidItemStateException e)
      {
         //TODO EXOJCR-412, should be refactored in future.
         //Skip property not found in DB, because that lock property was removed in other node of cluster.
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

      if (log.isDebugEnabled())
      {
         log.debug("Removing all locks");
      }

      TransactionChangesLog transactionChangesLog = new TransactionChangesLog();

      String[] list = PrivilegedFileHelper.list(rootDir);

      try
      {
         for (int i = 0; i < list.length; i++)
         {
            PlainChangesLog plainChangesLog =
               new PlainChangesLogImpl(new ArrayList<ItemState>(), SystemIdentity.SYSTEM, ExtendedEvent.UNLOCK);

            NodeData lockedNodeData = (NodeData)dataManager.getItemData(list[i]);
            // No item no problem
            if (lockedNodeData != null)
            {
               PropertyData dataLockIsDeep =
                  (PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKISDEEP, 0));

               if (dataLockIsDeep != null)
               {
                  plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
                     lockedNodeData.getQPath(), Constants.JCR_LOCKISDEEP), dataLockIsDeep.getIdentifier(), 0,
                     dataLockIsDeep.getType(), dataLockIsDeep.getParentIdentifier(), dataLockIsDeep.isMultiValued())));
               }

               PropertyData dataLockOwner =
                  (PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKOWNER, 0));
               if (dataLockOwner != null)
                  plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
                     lockedNodeData.getQPath(), Constants.JCR_LOCKOWNER), dataLockOwner.getIdentifier(), 0,
                     dataLockOwner.getType(), dataLockOwner.getParentIdentifier(), dataLockOwner.isMultiValued())));

               if (plainChangesLog.getSize() > 0)
               {
                  transactionChangesLog.addLog(plainChangesLog);
               }
            }
         }

         if (transactionChangesLog.getSize() > 0)
         {
            dataManager.save(transactionChangesLog);
         }

         // remove files
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

         if (lockOwner == null && lockIsDeep == null)
         {
            return;
         }

         dataManager.save(new TransactionChangesLog(changesLog));
      }
      catch (JCRInvalidItemStateException e)
      {
         //TODO EXOJCR-412, should be refactored in future.
         //Skip property not found in DB, because that lock property was removed in other node of cluster.
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

         if (lockOwner == null && lockIsDeep == null)
         {
            return;
         }

         dataManager.save(new TransactionChangesLog(changesLog));
      }
      catch (JCRInvalidItemStateException e)
      {
         //TODO EXOJCR-412, should be refactored in future.
         //Skip property not found in DB, because that lock property was removed in other node of cluster.
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.TransactionChangesLog

      if (log.isDebugEnabled())
      {
         log.debug("Removing all locks");
      }

      TransactionChangesLog transactionChangesLog = new TransactionChangesLog();

      String[] list = PrivilegedFileHelper.list(rootDir);

      try
      {
         for (int i = 0; i < list.length; i++)
         {
            PlainChangesLog plainChangesLog =
               new PlainChangesLogImpl(new ArrayList<ItemState>(), IdentityConstants.SYSTEM, ExtendedEvent.UNLOCK);

            NodeData lockedNodeData = (NodeData)dataManager.getItemData(list[i]);
            // No item no problem
            if (lockedNodeData != null)
            {
               PropertyData dataLockIsDeep =
                  (PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKISDEEP, 0),
                     ItemType.PROPERTY);

               if (dataLockIsDeep != null)
               {
                  plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
                     lockedNodeData.getQPath(), Constants.JCR_LOCKISDEEP), dataLockIsDeep.getIdentifier(), 0,
                     dataLockIsDeep.getType(), dataLockIsDeep.getParentIdentifier(), dataLockIsDeep.isMultiValued())));
               }

               PropertyData dataLockOwner =
                  (PropertyData)dataManager.getItemData(lockedNodeData, new QPathEntry(Constants.JCR_LOCKOWNER, 0),
                     ItemType.PROPERTY);
               if (dataLockOwner != null)
               {
                  plainChangesLog.add(ItemState.createDeletedState(new TransientPropertyData(QPath.makeChildPath(
                     lockedNodeData.getQPath(), Constants.JCR_LOCKOWNER), dataLockOwner.getIdentifier(), 0,
                     dataLockOwner.getType(), dataLockOwner.getParentIdentifier(), dataLockOwner.isMultiValued())));
               }

               if (plainChangesLog.getSize() > 0)
               {
                  transactionChangesLog.addLog(plainChangesLog);
               }
            }
         }

         if (transactionChangesLog.getSize() > 0)
         {
            dataManager.save(transactionChangesLog);
         }

         // remove files
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.