Examples of ItemDataRemoveVisitor


Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

         NodeData removeNodeTypeData =
            (NodeData)dataManager.getItemData(nodeTypeStorageRoot, new QPathEntry(nodeTypeData.getName(), 1),
               ItemType.NODE);
         if (removeNodeTypeData != null)
         {
            ItemDataRemoveVisitor removeVisitor =
               new ItemDataRemoveVisitor(dataManager, nodeTypeStorageRoot.getQPath());
            removeNodeTypeData.accept(removeVisitor);

            changesLog.addAll(removeVisitor.getRemovedStates());
         }
         // add
         definitionAccessProvider.write(changesLog, nodeTypeStorageRoot, nodeTypeData);
         if (observer != null)
         {
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

            + " with jcr:uuid attribute the same as the  parent of the import target.");
      }

      setAncestorToSave(QPath.getCommonAncestorPath(ancestorToSave, sameUuidPath));

      ItemDataRemoveVisitor visitor =
         new ItemDataRemoveVisitor(dataConsumer, getAncestorToSave(), nodeTypeDataManager, accessManager, userState);
      sameUuidItem.accept(visitor);

      changesLog.addAll(visitor.getRemovedStates());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

      {
         ItemData n = dataManager.getItemData(nodeData(), new QPathEntry(nd.getName(), 1), ItemType.NODE);
         if (n != null && n.isNode())
         {
            // remove node with subtree
            ItemDataRemoveVisitor remover = new ItemDataRemoveVisitor(dataManager, ancestorToSave);
            n.accept(remover);
            for (ItemState deleted : remover.getRemovedStates())
            {
               dataManager.delete(deleted.getData(), ancestorToSave);
            }
         }
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

      String srcPath;
      try
      {
         srcPath = getCorrespondingNodePath(srcWorkspaceName);

         ItemDataRemoveVisitor remover =
            new ItemDataRemoveVisitor(session.getTransientNodesManager(), null, session.getWorkspace()
               .getNodeTypesHolder(), session.getAccessManager(), session.getUserState());
         nodeData().accept(remover);

         changes.addAll(remover.getRemovedStates());
      }
      catch (ItemNotFoundException e)
      {
         LOG.debug("No corresponding node in workspace: " + srcWorkspaceName);
         return;
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

   private void cleanWorkspace(TransactionableDataManager dataManager)
      throws RepositoryException
   {
      NodeData rootData = (NodeData)dataManager.getItemData(Constants.ROOT_UUID);

      ItemDataRemoveVisitor removeVisitor = new ItemDataRemoveVisitor(dataManager, null);
      rootData.accept(removeVisitor);

      PlainChangesLogImpl changesLog = new PlainChangesLogImpl();
      changesLog.addAll(removeVisitor.getRemovedStates());

      dataManager.save(changesLog);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

         }

      }
      // remove VH
      ItemDataRemoveVisitor visitor = new ItemDataRemoveVisitor(dataManager, ancestorToSave);
      vhnode.accept(visitor);
      transientChangesLog.addAll(visitor.getRemovedStates());
   };
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

      catch (IOException e)
      {
         throw new RepositoryException("Get successor " + version.getPath() + " error " + e, e);
      }

      ItemDataRemoveVisitor removeVisitor = new ItemDataRemoveVisitor(dataManager.getTransactManager(), null);
      version.getData().accept(removeVisitor);
      changes.addAll(removeVisitor.getRemovedStates());

      dataManager.getTransactManager().save(changes);

      version.invalidate();
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

                           return item.getQPath().isDescendantOf(removedRoot.getQPath())
                              || item.getQPath().isDescendantOf(restorePath);
                        }
                     };

                     ItemDataRemoveVisitor removeVisitor = new RemoveVisitor();
                     removeVisitor.visit(sameIdentifierNode);

                     changes.addAll(removeVisitor.getRemovedStates());
                  }
                  else
                  {
                     throw new ItemExistsException("Item with the same UUID as restored node " + nodePath.getAsString()
                        + " already exists and removeExisting=false. Existed "
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

            + " with jcr:uuid attribute the same as the  parent of the import target.");
      }

      setAncestorToSave(QPath.getCommonAncestorPath(ancestorToSave, sameUuidPath));

      ItemDataRemoveVisitor visitor =
         new ItemDataRemoveVisitor(dataConsumer, getAncestorToSave(), nodeTypeDataManager, accessManager, userState);
      sameUuidItem.accept(visitor);

      changesLog.addAll(visitor.getRemovedStates());
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.ItemDataRemoveVisitor

            + " with jcr:uuid attribute the same as the  parent of the import target.");
      }

      setAncestorToSave(QPath.getCommonAncestorPath(ancestorToSave, sameUuidPath));

      ItemDataRemoveVisitor visitor =
         new ItemDataRemoveVisitor(dataConsumer, getAncestorToSave(), nodeTypeDataManager, accessManager, userState);
      sameUuidItem.accept(visitor);

      changesLog.addAll(visitor.getRemovedStates());
   }
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.