use of org.ovirt.engine.core.common.businessentities.Bookmark in project ovirt-engine by oVirt.
the class UpdateBookmarkCommand method validate.
@Override
protected boolean validate() {
Bookmark updated = getBookmark();
if (updated == null) {
return failValidation(EngineMessage.ACTION_TYPE_FAILED_BOOKMARK_INVALID_ID);
}
Bookmark current = bookmarkDao.getByName(updated.getName());
if (current != null && !current.getId().equals(updated.getId())) {
return failValidation(EngineMessage.ACTION_TYPE_FAILED_NAME_ALREADY_USED);
}
return true;
}
Aggregations