@Override protected CommandResult execute(CommandContext context, SelectionItem parent) { return new BatchResult( new RefreshListResult(), new NotificationResult(context, this) .setDefaultMessage("The list has been refreshed.")); }
public BatchResult(CommandResult... results) { for (CommandResult result : results) { add(result); } }
protected CommandResult handleYes(CommandContext context, Selection selection, Object input) { return new NotificationResult(context).setMessage("Yes!"); }
public CommandResult execute(CommandContext context, Selection selection) { Clipboard.get(context).set(context.getScreen(), selection, this); return new BatchResult( new UpdateCommandsResult(), new NotificationResult(context, this) .setArgs(selection.size()) .setDefaultMessage("{0,choice,1#Item|1<{0} items} put into the clipboard")); }
public CommandResult execute(CommandContext context, Selection selection) { System.gc(); return new RefreshListResult(); }
@Override protected CommandResult execute(CommandContext context, Object item) { String url = PropertyUtils.getPropertyAsString(item, urlProperty); return new PopupResult(url); }
@Override protected CommandResult execute(CommandContext context, Object item) { return new GotoUrlResult(context.getScreenContext().createItemContext(item)); }
public CommandResult execute(CommandContext context, Selection selection) throws IOException { return new DownloadResult(createFileTransfer(context, selection)); }
@RemoteProperty public String getTitle() { if (title == null && messageResolver != null) { title = messageResolver.getMessage(getTitleKey(), args, defaultTitle); } return title; }
public CommandResult execute(CommandContext context, Selection selection) { return new ScriptResult("parent.riot.window.getDialog(window).options.chooser.chosen('" + selection.getSingleItem().getObjectId() + "')"); } }
@RemoteProperty public String getMessage() { if (message == null && messageResolver != null) { message = messageResolver.getMessage(getMessageKey(), args, defaultMessage); } return message; }
public CommandResult execute(CommandContext context, Selection selection) { sessionFactory.getStatistics().clear(); return new BatchResult( new RefreshListResult(), new NotificationResult(context, this) .setDefaultMessage("The baseline has been cleared.")); } }
public CommandResult execute(CommandContext context, Selection selection) { Clipboard.get(context).set(context.getScreen(), selection, this); return new BatchResult( new UpdateCommandsResult(), new NotificationResult(context, this) .setArgs(selection.size()) .setDefaultMessage("{0,choice,1#Item|1<{0} items} put into the clipboard")); }
public CommandResult execute(CommandContext context, Selection selection) { doExecute(context, selection); return new RefreshListResult(); }
@Override protected CommandResult execute(CommandContext context, Page page, int index, int selectionSize) { String url = new PageFacade(page, context.getRequest()).getUrl(); return new PopupResult(url); }
@Override public CommandResult execute(CommandContext context, SelectionItem parent) { NotificationResult notification = new NotificationResult(context, this) .setDefaultMessage("{0,choice,1#One item has|1<{0} items have} been pasted."); Clipboard.get(context).paste(context, parent, notification); return new BatchResult( notification, new RefreshListResult(parent.getObjectId()).refreshAll()); }
public CommandResult execute(CommandContext context, Selection selection) { requestStats.reset(); return new RefreshListResult(); }
@Override protected CommandResult handleYes(CommandContext context, Selection selection, Object input) { Object[] args = getArgs(context, selection); for (SelectionItem item : selection) { context.getScreen().getDao().delete(item.getObject(), context.getParent()); } return new BatchResult( new RefreshListResult(), new NotificationResult(context, this) .setDefaultMessage("{0,choice,1#Item \"{1}\"|1<{0} items} successfully deleted.") .setArgs(args)); }
public CommandResult execute(CommandContext context, Selection selection) { setEnabled(!isEnabled()); return new RefreshListResult(); }
@Override public CommandResult handleInput(CommandContext context, Selection selection, Object input, String button) { context.getScreenContext().getDao().update(input); return new RefreshListResult(); }