use of com.enonic.xp.node.NodeVersionDeleteException in project xp by enonic.
the class DeleteVersionCommand method doExecute.
private void doExecute() {
final Context currentContext = ContextAccessor.current();
final NodeVersionMetadata nodeVersionMetadata = this.nodeStorageService.getVersion(this.nodeId, this.nodeVersionId, InternalContext.from(currentContext));
if (isInUse(nodeVersionMetadata.getNodeId())) {
throw new NodeVersionDeleteException("Cannot delete version of a node that is in use");
}
}
Aggregations