/** * Gets a translation provider out of the action context. * * @param context * the action context. * @return the translation provider. */ protected ITranslationProvider getTranslationProvider( Map<String, Object> context) { return getController(context).getTranslationProvider(); } }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { if (actionHandler.execute(getWrappedAction(context), context)) { return actionHandler.execute(getNextAction(context), context); } return false; }
/** * Gets the permId. * * @return the permId. */ @Override public String getPermId() { String permId = super.getPermId(); if (permId == null) { return getName(); } return permId; }
/** * {@inheritDoc} */ @Override protected <T> IView<T> getView(int[] viewPath, Map<String, Object> context) { warnBadFrontendAccess(context); return super.getView(viewPath, context); }
/** * {@inheritDoc} */ @Override protected IValueConnector getViewConnector(int[] viewPath, Map<String, Object> context) { warnBadFrontendAccess(context); return super.getViewConnector(viewPath, context); }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override protected <T> List<T> getSelectedModels(int[] viewPath, Map<String, Object> context) { boolean wbad = context.containsKey(WARN_BAD_ACCESS_DISABLED); try { if (viewPath == null) { // we don't warn about anything if we only query the selected model // since it's supported now by injecting a SELECTED_MODELS variable in // the context during testing. if (context.containsKey(SELECTED_MODELS)) { return (List<T>) context.get(SELECTED_MODELS); } context.put(WARN_BAD_ACCESS_DISABLED, null); } return super.getSelectedModels(viewPath, context); } finally { if (!wbad) { context.remove(WARN_BAD_ACCESS_DISABLED); } } }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override protected <T> T getSelectedModel(int[] viewPath, Map<String, Object> context) { boolean wbad = context.containsKey(WARN_BAD_ACCESS_DISABLED); try { if (viewPath == null) { // we don't warn about anything if we only query the selected model // since it's supported now by injecting a SELECTED_MODEL variable in // the context during testing. if (context.containsKey(SELECTED_MODEL)) { return (T) context.get(SELECTED_MODEL); } context.put(WARN_BAD_ACCESS_DISABLED, null); } return super.getSelectedModel(viewPath, context); } finally { if (!wbad) { context.remove(WARN_BAD_ACCESS_DISABLED); } } }
protected IDisplayableAction completeOkDialogAction(IAction okNextAction) { IDisplayableAction refinedOkCloseDialogAction = getOkCloseDialogAction(); if (refinedOkCloseDialogAction instanceof AbstractAction && okNextAction != null) { refinedOkCloseDialogAction = (IDisplayableAction) refinedOkCloseDialogAction.clone(); ((AbstractAction) refinedOkCloseDialogAction).setNextAction(okNextAction); } return refinedOkCloseDialogAction; }