public CommandResult execute(CommandContext context, Selection selection) { System.gc(); return new RefreshListResult(); }
public CommandResult execute(CommandContext context, Selection selection) { doExecute(context, selection); return new RefreshListResult(); }
public CommandResult execute(CommandContext context, Selection selection) { requestStats.reset(); return new RefreshListResult(); }
@Override protected CommandResult execute(CommandContext context, SelectionItem parent) { return new BatchResult( new RefreshListResult(), new NotificationResult(context, this) .setDefaultMessage("The list has been refreshed.")); }
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(); }
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.")); } }
@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) throws Exception { CachiusStatisticsDao dao = (CachiusStatisticsDao) context.getScreenContext().getDao(); dao.getCachiusStatistics().reset(); return new RefreshListResult(); }
public CommandResult execute(CommandContext context, Selection selection) throws Exception { CachiusStatisticsDao dao = (CachiusStatisticsDao) context.getScreenContext().getDao(); dao.getCachiusStatistics().invalidateAllItems(); return new RefreshListResult(); }
public CommandResult execute(CommandContext context, Selection selection) { String bundle = ((MessageBundleEntryDao) context.getScreen().getDao()).getBundle(); MessageBundleEntry.removeEmptyEntries(bundle); return new RefreshListResult(); }
@Override public CommandResult handleInput(CommandContext context, Selection selection, Object input, String button) { Upload upload = (Upload) input; try { RiotUser user = AccessController.getCurrentUser(); log.info("Global messages uploaded by {}", user.getUserId()); updateMessages(upload.getData(), upload.isAddNewMessages()); } catch (OfficeXmlFileException e) { throw new InvalidPropertyValueException("data","error.dbmsgsrc.unsupportedExcelVersion", "The Excel version is not support. Please save Excel file as version 97 - 2003"); } catch (IOException e) { } return new RefreshListResult(); }
@Override public CommandResult handleInput(CommandContext context, Selection selection, Object input, String button) { Site site = (Site) context.getParent(); Upload upload = (Upload) input; try { RiotUser user = AccessController.getCurrentUser(); log.info("Local messages uploaded for site {} by {}", site, user.getUserId()); updateMessages(upload.getData(), site); } catch (OfficeXmlFileException e) { throw new InvalidPropertyValueException("data","error.dbmsgsrc.unsupportedExcelVersion", "The Excel version is not support. Please save Excel file as version 97 - 2003"); } catch (IOException e) { } 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)); }
@Override protected CommandResult execute(CommandContext context, ContentContainerOwner owner, int index, int selectionSize) { owner.getContentContainer().unpublish(); String objectId = context.getScreen().getDao().getObjectId(owner); return new RefreshListResult(objectId).refreshAll(); } }
@Override protected CommandResult execute(CommandContext context, ContentContainerOwner owner, int index, int selectionSize) { ContentContainer container = owner.getContentContainer(); if (container.isDirty()) { container.publish(); } String objectId = context.getScreen().getDao().getObjectId(owner); return new RefreshListResult(objectId).refreshAll(); } }
@Override protected CommandResult execute(CommandContext context, ContentContainerOwner owner, int index, int selectionSize) { ContentContainer container = owner.getContentContainer(); if (container.isDirty()) { container.discard(); } String objectId = context.getScreen().getDao().getObjectId(owner); return new RefreshListResult(objectId).refreshAll(); } }
public CommandResult execute(CommandContext context, Selection selection) { Swapping dao = (Swapping) context.getScreen().getDao(); dao.swapEntity(selection.getSingleItem().getObject(), context.getParent(), context.getParams(), getSwapWith()); return new RefreshListResult(selection.getSingleItem().getParentNodeId()); }