/** * Executes the action script using the script handler. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { scriptHandler.execute((IScript) context .get(ActionContextConstants.ACTION_PARAM), context); return super.execute(actionHandler, context); }
/** * Gets the entityFactory. * * @param context * the action context. * @return the entityFactory. */ protected IEntityFactory getEntityFactory(Map<String, Object> context) { return getController(context).getEntityFactory(); }
/** * refined to return a collection connector. * <p> * {@inheritDoc} */ @Override public ICollectionConnector getModelConnector(Map<String, Object> context) { return (ICollectionConnector) super.getModelConnector(context); }
/** * Refined to return a collection descriptor. * <p> * {@inheritDoc} */ @Override public ICollectionDescriptorProvider<?> getModelDescriptor( Map<String, Object> context) { return (ICollectionDescriptorProvider<?>) super.getModelDescriptor(context); }
/** * refined to return a collection connector. * <p> * {@inheritDoc} */ @Override public ICollectionConnector getSourceModelConnector( Map<String, Object> context) { return (ICollectionConnector) super.getSourceModelConnector(context); } }
/** * Executes the next action. * <p> * {@inheritDoc} */ public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { if (getNextAction() != null) { return actionHandler.execute(getNextAction(), context); } return true; }
/** * Resets the model connector value to null. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { getModelConnector(context).setConnectorValue(null); return super.execute(actionHandler, context); }
/** * {@inheritDoc} */ @Override public Locale getLocale(Map<String, Object> context) { return getController(context).getLocale(); }
/** * {@inheritDoc} */ @Override @SuppressWarnings("unchecked") public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { Map<String, Object> actionParam = (Map<String, Object>) context .get(ActionContextConstants.ACTION_PARAM); char[] typedPasswd = (char[]) actionParam.get(PASSWD_TYPED); char[] retypedPasswd = (char[]) actionParam.get(PASSWD_RETYPED); if (!Arrays.equals(typedPasswd, retypedPasswd)) { throw new ActionBusinessException( "Typed and retyped passwords are different.", "password.typed.retyped.different"); } UserPrincipal principal = getApplicationSession(context).getPrincipal(); if (changePassword(principal, (char[]) actionParam.get(PASSWD_CURRENT), typedPasswd)) { context.put(ActionContextConstants.ACTION_PARAM, getTranslationProvider( context) .getTranslation("password.change.success", getLocale(context))); return super.execute(actionHandler, context); } return false; }
/** * Gets the accessorFactory. * * @param context * the action context. * @return the accessorFactory. */ protected IAccessorFactory getAccessorFactory(Map<String, Object> context) { return getController(context).getAccessorFactory(); }
/** * Fills the context with the filter reference descriptor. * <p> * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { IModelValueConnector filterModelConnector = (IModelValueConnector) getModuleConnector( context).getChildConnector("filter"); context.put(ActionContextConstants.QUERY_MODEL_CONNECTOR, filterModelConnector); context.put(ActionContextConstants.COMPONENT_REF_DESCRIPTOR, filterModelConnector.getModelDescriptor()); BeanCollectionModule beanCollectionModule = (BeanCollectionModule) getModuleConnector( context).getConnectorValue(); beanCollectionModule.setModuleObjects(null); return super.execute(actionHandler, context); }
/** * Gets the current application session. * * @param context * the action context. * @return the current application session. */ protected IApplicationSession getApplicationSession( Map<String, Object> context) { return getController(context).getApplicationSession(); }
throw new ActionException(ex); return super.execute(actionHandler, context);
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { if (queryAction != null) { FilterableBeanCollectionModule module = (FilterableBeanCollectionModule) getModuleConnector( context).getConnectorValue(); IValueConnector filterConnector = getModuleConnector(context) .getChildConnector("filter"); context .put(ActionContextConstants.QUERY_MODEL_CONNECTOR, filterConnector); IQueryComponent filter = (IQueryComponent) module.getFilter(); if (actionHandler.execute(queryAction, context)) { module.setModuleObjects(filter.getQueriedComponents()); filter.setQueriedComponents(null); } } return super.execute(actionHandler, context); }
.setConnectorValue(queryPropertyValue); return super.execute(actionHandler, context);