Examples of ChangesLogIterator


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

    */
   public void save(ItemStateChangesLog changesLog) throws InvalidItemStateException, UnsupportedOperationException,
      RepositoryException
   {

      ChangesLogIterator logIterator = ((CompositeChangesLog)changesLog).getLogIterator();
      TransactionChangesLog newLog = new TransactionChangesLog();

      while (logIterator.hasNextLog())
      {
         List<ItemState> states = new ArrayList<ItemState>(changesLog.getSize());
         PlainChangesLog changes = logIterator.nextLog();
         for (ItemState change : changes.getAllStates())
         {
            states.add(new ItemState(copyItemData(change.getData()), change.getState(), change.isEventFire(), change
               .getAncestorToSave(), change.isInternallyCreated(), change.isPersisted()));
         }
View Full Code Here

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

   }

   public void save(final CompositeChangesLog changesLog) throws RepositoryException, InvalidItemStateException
   {

      final ChangesLogIterator logIterator = changesLog.getLogIterator();

      final TransactionChangesLog versionLogs = new TransactionChangesLog();
      final TransactionChangesLog nonVersionLogs = new TransactionChangesLog();

      while (logIterator.hasNextLog())
      {
         List<ItemState> vstates = new ArrayList<ItemState>();
         List<ItemState> nvstates = new ArrayList<ItemState>();

         PlainChangesLog changes = logIterator.nextLog();
         for (ItemState change : changes.getAllStates())
         {
            if (isSystemDescendant(change.getData().getQPath()) && !this.equals(versionDataManager))
            {
               vstates.add(change);
View Full Code Here

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

         while (true)
         {
            TransactionChangesLog changesLog = readExternal(ois);
            changesLog.setSystemId(Constants.JCR_CORE_RESTORE_WORKSPACE_INITIALIZER_SYSTEM_ID); // mark changes

            ChangesLogIterator cli = changesLog.getLogIterator();
            while (cli.hasNextLog())
            {
               if (cli.nextLog().getEventType() == ExtendedEvent.LOCK)
                  cli.removeLog();
            }

            saveChangesLog(changesLog);
         }
      }
View Full Code Here

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

      {

         TransactionChangesLog result = new TransactionChangesLog();
         result.setSystemId(changesLog.getSystemId());

         ChangesLogIterator cli = changesLog.getLogIterator();
         while (cli.hasNextLog())
         {
            ArrayList<ItemState> normalized = new ArrayList<ItemState>();
            PlainChangesLog next = cli.nextLog();
            for (ItemState change : next.getAllStates())
            {
               if (state == change.getState())
               {
                  ItemData item = change.getData();
View Full Code Here

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

   public void onSaveItems(ItemStateChangesLog changesLog)
   {
      List<PlainChangesLog> chengesLogList = new ArrayList<PlainChangesLog>();
      if (changesLog instanceof TransactionChangesLog)
      {
         ChangesLogIterator logIterator = ((TransactionChangesLog)changesLog).getLogIterator();

         while (logIterator.hasNextLog())
         {
            chengesLogList.add(logIterator.nextLog());
         }
      }
      else if (changesLog instanceof PlainChangesLog)
      {
         chengesLogList.add((PlainChangesLog)changesLog);
View Full Code Here

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

   }

   public void save(final CompositeChangesLog changesLog) throws RepositoryException, InvalidItemStateException
   {

      final ChangesLogIterator logIterator = changesLog.getLogIterator();

      final TransactionChangesLog versionLogs = new TransactionChangesLog();
      final TransactionChangesLog nonVersionLogs = new TransactionChangesLog();

      while (logIterator.hasNextLog())
      {
         List<ItemState> vstates = new ArrayList<ItemState>();
         List<ItemState> nvstates = new ArrayList<ItemState>();

         PlainChangesLog changes = logIterator.nextLog();
         for (ItemState change : changes.getAllStates())
         {
            if (isSystemDescendant(change.getData().getQPath()) && !this.equals(versionDataManager))
            {
               vstates.add(change);
View Full Code Here

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

    */
   public void save(ItemStateChangesLog changesLog) throws InvalidItemStateException, UnsupportedOperationException,
      RepositoryException
   {

      ChangesLogIterator logIterator = ((CompositeChangesLog)changesLog).getLogIterator();
      TransactionChangesLog newLog = new TransactionChangesLog();

      while (logIterator.hasNextLog())
      {
         List<ItemState> states = new ArrayList<ItemState>(changesLog.getSize());
         PlainChangesLog changes = logIterator.nextLog();
         for (ItemState change : changes.getAllStates())
         {
            states.add(new ItemState(copyItemData(change.getData()), change.getState(), change.isEventFire(), change
               .getAncestorToSave(), change.isInternallyCreated(), change.isPersisted()));
         }
View Full Code Here

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

   public void onSaveItems(ItemStateChangesLog changesLog)
   {
      List<PlainChangesLog> chengesLogList = new ArrayList<PlainChangesLog>();
      if (changesLog instanceof TransactionChangesLog)
      {
         ChangesLogIterator logIterator = ((TransactionChangesLog)changesLog).getLogIterator();

         while (logIterator.hasNextLog())
         {
            chengesLogList.add(logIterator.nextLog());
         }
      }
      else if (changesLog instanceof PlainChangesLog)
      {
         chengesLogList.add((PlainChangesLog)changesLog);
View Full Code Here

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

   public void onSaveItems(ItemStateChangesLog changesLog)
   {
      List<PlainChangesLog> chengesLogList = new ArrayList<PlainChangesLog>();
      if (changesLog instanceof TransactionChangesLog)
      {
         ChangesLogIterator logIterator = ((TransactionChangesLog)changesLog).getLogIterator();

         while (logIterator.hasNextLog())
         {
            chengesLogList.add(logIterator.nextLog());
         }
      }
      else if (changesLog instanceof PlainChangesLog)
      {
         chengesLogList.add((PlainChangesLog)changesLog);
View Full Code Here

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

   public void onSaveItems(ItemStateChangesLog changesLog)
   {
      List<PlainChangesLog> chengesLogList = new ArrayList<PlainChangesLog>();
      if (changesLog instanceof TransactionChangesLog)
      {
         ChangesLogIterator logIterator = ((TransactionChangesLog)changesLog).getLogIterator();

         while (logIterator.hasNextLog())
         {
            chengesLogList.add(logIterator.nextLog());
         }
      }
      else if (changesLog instanceof PlainChangesLog)
      {
         chengesLogList.add((PlainChangesLog)changesLog);
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.