@Override public void remove( String absPath ) throws UnsupportedOperationException, PathNotFoundException, VersionException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.remove('{0}')", absPath); JcrSession removeSession = session.spawnSession(false); AbstractJcrNode node = removeSession.getNode(absPath); checkVersionable(node); SessionCache systemCache = session.createSystemCache(false); removeHistories(node, systemCache); node.remove(); removeSession.cache().save(systemCache, null); }
@Override public void remove( String absPath ) throws UnsupportedOperationException, PathNotFoundException, VersionException, RepositoryException { if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.remove('{0}')", absPath); JcrSession removeSession = session.spawnSession(false); AbstractJcrNode node = removeSession.getNode(absPath); checkVersionable(node); SessionCache systemCache = session.createSystemCache(false); removeHistories(node, systemCache); node.remove(); removeSession.cache().save(systemCache, null); }
void cancelMerge( AbstractJcrNode targetNode, Version version ) throws RepositoryException { targetNode.session().checkLive(); checkVersionable(targetNode); if (targetNode.isNew() || targetNode.isModified()) { throw new InvalidItemStateException(JcrI18n.noPendingChangesAllowedForNode.text()); } if (!targetNode.isNodeType(JcrMixLexicon.VERSIONABLE)) { throw new UnsupportedRepositoryOperationException(JcrI18n.requiresVersionable.text()); } removeVersionFromMergeFailedProperty(targetNode, version); targetNode.session().save(); }
void cancelMerge( AbstractJcrNode targetNode, Version version ) throws RepositoryException { targetNode.session().checkLive(); checkVersionable(targetNode); if (targetNode.isNew() || targetNode.isModified()) { throw new InvalidItemStateException(JcrI18n.noPendingChangesAllowedForNode.text()); } if (!targetNode.isNodeType(JcrMixLexicon.VERSIONABLE)) { throw new UnsupportedRepositoryOperationException(JcrI18n.requiresVersionable.text()); } removeVersionFromMergeFailedProperty(targetNode, version); targetNode.session().save(); }
void doneMerge( AbstractJcrNode targetNode, Version version ) throws RepositoryException { targetNode.session().checkLive(); checkVersionable(targetNode); if (targetNode.isNew() || targetNode.isModified()) { throw new InvalidItemStateException(JcrI18n.noPendingChangesAllowedForNode.text()); } if (!targetNode.isNodeType(JcrMixLexicon.VERSIONABLE)) { throw new VersionException(JcrI18n.requiresVersionable.text()); } AbstractJcrProperty prop = targetNode.getProperty(JcrLexicon.PREDECESSORS); JcrValue[] values = prop.getValues(); JcrValue[] newValues = new JcrValue[values.length + 1]; System.arraycopy(values, 0, newValues, 0, values.length); newValues[values.length] = targetNode.valueFrom(version); targetNode.setProperty(JcrLexicon.PREDECESSORS, newValues, PropertyType.REFERENCE, false); removeVersionFromMergeFailedProperty(targetNode, version); targetNode.session().save(); }
void doneMerge( AbstractJcrNode targetNode, Version version ) throws RepositoryException { targetNode.session().checkLive(); checkVersionable(targetNode); if (targetNode.isNew() || targetNode.isModified()) { throw new InvalidItemStateException(JcrI18n.noPendingChangesAllowedForNode.text()); } if (!targetNode.isNodeType(JcrMixLexicon.VERSIONABLE)) { throw new VersionException(JcrI18n.requiresVersionable.text()); } AbstractJcrProperty prop = targetNode.getProperty(JcrLexicon.PREDECESSORS); JcrValue[] values = prop.getValues(); JcrValue[] newValues = new JcrValue[values.length + 1]; System.arraycopy(values, 0, newValues, 0, values.length); newValues[values.length] = targetNode.valueFrom(version); targetNode.setProperty(JcrLexicon.PREDECESSORS, newValues, PropertyType.REFERENCE, false); removeVersionFromMergeFailedProperty(targetNode, version); targetNode.session().save(); }
JcrVersionHistoryNode getVersionHistory( AbstractJcrNode node ) throws RepositoryException { checkVersionable(node);
JcrVersionHistoryNode getVersionHistory( AbstractJcrNode node ) throws RepositoryException { checkVersionable(node);