use of com.enonic.xp.node.MoveNodeException in project xp by enonic.
the class ArchiveContentCommand method execute.
ArchiveContentsResult execute() {
params.validate();
try {
final ArchiveContentsResult archivedContents = doExecute();
this.nodeService.refresh(RefreshMode.ALL);
return archivedContents;
} catch (MoveNodeException e) {
throw new ArchiveContentException(e.getMessage(), ContentNodeHelper.translateNodePathToContentPath(e.getPath()));
} catch (NodeAccessException e) {
throw new ContentAccessException(e);
}
}
use of com.enonic.xp.node.MoveNodeException in project xp by enonic.
the class MoveContentCommand method execute.
MoveContentsResult execute() {
params.validate();
try {
final MoveContentsResult movedContents = doExecute();
this.nodeService.refresh(RefreshMode.ALL);
return movedContents;
} catch (MoveNodeException e) {
throw new MoveContentException(e.getMessage(), ContentPath.from(e.getPath().toString()));
} catch (NodeAlreadyExistAtPathException e) {
throw new ContentAlreadyExistsException(ContentPath.from(e.getNode().toString()), e.getRepositoryId(), e.getBranch());
} catch (NodeAccessException e) {
throw new ContentAccessException(e);
}
}
use of com.enonic.xp.node.MoveNodeException in project xp by enonic.
the class RestoreContentCommand method execute.
RestoreContentsResult execute() {
params.validate();
try {
final RestoreContentsResult restoredContents = doExecute();
this.nodeService.refresh(RefreshMode.ALL);
return restoredContents;
} catch (MoveNodeException e) {
throw new RestoreContentException(e.getMessage(), ContentNodeHelper.translateNodePathToContentPath(e.getPath()));
} catch (NodeAccessException e) {
throw new ContentAccessException(e);
}
}
Aggregations