public void checkIsCheckedOut(NodeState nodeState) throws VersionException, RepositoryException { if (!isCheckedOut(nodeState)) { throw new VersionException(nodeState + " is checked-in"); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!isCheckedOut()) { throw new VersionException(format( "Cannot add mixin type. Node [%s] is checked in.", getNodePath())); } } @Override
public VersionHistoryImpl(SessionImpl session, NodeState state, ItemLifeCycleListener[] listeners) throws VersionException, RepositoryException { super(session, state, listeners); this.vhEntry = (NodeEntry) state.getHierarchyEntry(); // retrieve hierarchy entry of the jcr:versionLabels node labelNodeEntry = vhEntry.getNodeEntry(NameConstants.JCR_VERSIONLABELS, Path.INDEX_DEFAULT, true); if (labelNodeEntry == null) { String msg = "Unexpected error: nt:versionHistory requires a mandatory, autocreated child node jcr:versionLabels."; log.error(msg); throw new VersionException(msg); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!isCheckedOut()) { throw new VersionException(format("Cannot set primary type. Node [%s] is checked in.", getNodePath())); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!isCheckedOut()) { throw new VersionException(format("Cannot set primary type. Node [%s] is checked in.", getNodePath())); } }
/** * {@inheritDoc} */ public InternalVersionHistory getVersionHistory() throws VersionException { try { return vMgr.getVersionHistory(getVersionHistoryId()); } catch (RepositoryException e) { throw new VersionException(e); } }
/** * {@inheritDoc} */ public InternalVersionHistory getVersionHistory() throws VersionException { try { return vMgr.getVersionHistory(getVersionHistoryId()); } catch (RepositoryException e) { throw new VersionException(e); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!isCheckedOut() && getOPV(dlg.getTree(), state) != OnParentVersionAction.IGNORE) { throw new VersionException(format( "Cannot set property. Node [%s] is checked in.", getNodePath())); } } @NotNull
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!isCheckedOut() && getOPV(dlg.getTree(), state) != OnParentVersionAction.IGNORE) { throw new VersionException(format( "Cannot set property. Node [%s] is checked in.", getNodePath())); } } @NotNull
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); PropertyDelegate property = dlg.getPropertyOrNull(oakName); if (property != null && !isCheckedOut() && getOPV(dlg.getTree(), property.getPropertyState()) != OnParentVersionAction.IGNORE) { throw new VersionException(format( "Cannot remove property. Node [%s] is checked in.", getNodePath())); } } @NotNull
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); PropertyDelegate property = dlg.getPropertyOrNull(oakName); if (property != null && !isCheckedOut() && getOPV(dlg.getTree(), property.getPropertyState()) != OnParentVersionAction.IGNORE) { throw new VersionException(format( "Cannot remove property. Node [%s] is checked in.", getNodePath())); } } @NotNull
/** * @see Node#restoreByLabel(String, boolean) */ public void restoreByLabel(String versionLabel, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException { checkSessionHasPendingChanges(); // check for version-enabled and lock are performed with subsequent calls. Version v = getVersionHistory().getVersionByLabel(versionLabel); if (v == null) { throw new VersionException("No version for label " + versionLabel + " found."); } restore(this, null, v, removeExisting); }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!getParent().isCheckedOut() && getDefinition().getOnParentVersion() != OnParentVersionAction.IGNORE) { throw new VersionException( "Cannot set property. Node is checked in."); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!getParent().isCheckedOut() && getDefinition().getOnParentVersion() != OnParentVersionAction.IGNORE) { throw new VersionException( "Cannot set property. Node is checked in."); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!getParent().isCheckedOut() && getDefinition().getOnParentVersion() != OnParentVersionAction.IGNORE) { throw new VersionException( "Cannot set property. Node is checked in."); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!getParent().isCheckedOut() && getDefinition().getOnParentVersion() != OnParentVersionAction.IGNORE) { throw new VersionException( "Cannot set property. Node is checked in."); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!getParent().isCheckedOut() && getDefinition().getOnParentVersion() != OnParentVersionAction.IGNORE) { throw new VersionException( "Cannot set property. Node is checked in."); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!getParent().isCheckedOut() && getDefinition().getOnParentVersion() != OnParentVersionAction.IGNORE) { throw new VersionException( "Cannot set property. Node is checked in."); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!getParent().isCheckedOut() && getDefinition().getOnParentVersion() != OnParentVersionAction.IGNORE) { throw new VersionException( "Cannot set property. Node is checked in."); } }
@Override public void checkPreconditions() throws RepositoryException { super.checkPreconditions(); if (!getParent().isCheckedOut() && getDefinition().getOnParentVersion() != OnParentVersionAction.IGNORE) { throw new VersionException( "Cannot set property. Node is checked in."); } }