use of org.ovirt.engine.core.common.action.BookmarksOperationParameters in project ovirt-engine by oVirt.
the class BackendBookmarksResource method add.
@Override
public Response add(Bookmark bookmark) {
validateParameters(bookmark, "name");
validateParameters(bookmark, "value");
return performCreate(ActionType.AddBookmark, new BookmarksOperationParameters(map(bookmark)), new BookmarkNameResolver(bookmark.getName()));
}
use of org.ovirt.engine.core.common.action.BookmarksOperationParameters in project ovirt-engine by oVirt.
the class BookmarkListModel method onSave.
public void onSave() {
BookmarkModel model = (BookmarkModel) getWindow();
if (model.getProgress() != null) {
return;
}
if (!model.validate()) {
return;
}
org.ovirt.engine.core.common.businessentities.Bookmark tempVar = new org.ovirt.engine.core.common.businessentities.Bookmark();
tempVar.setId(model.getIsNew() ? Guid.Empty : ((org.ovirt.engine.core.common.businessentities.Bookmark) getSelectedItem()).getId());
tempVar.setName(model.getName().getEntity());
tempVar.setValue(model.getSearchString().getEntity());
org.ovirt.engine.core.common.businessentities.Bookmark bookmark = tempVar;
model.startProgress();
Frontend.getInstance().runAction(model.getIsNew() ? ActionType.AddBookmark : ActionType.UpdateBookmark, new BookmarksOperationParameters(bookmark), result -> {
BookmarkListModel localModel = (BookmarkListModel) result.getState();
localModel.postOnSave(result.getReturnValue());
}, this);
}
Aggregations