protected void updateAction(ActionRequest actionRequest) throws Exception { long actionId = ParamUtil.getLong(actionRequest, "actionId"); long ruleGroupInstanceId = ParamUtil.getLong(actionRequest, "ruleGroupInstanceId"); Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(actionRequest, "name"); Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(actionRequest, "description"); String type = ParamUtil.getString(actionRequest, "type"); ActionHandler actionHandler = ActionHandlerManagerUtil.getActionHandler(type); if (actionHandler == null) { throw new ActionTypeException(); } UnicodeProperties typeSettingsProperties = getTypeSettingsProperties(actionRequest, actionHandler.getPropertyNames()); ServiceContext serviceContext = ServiceContextFactory.getInstance(actionRequest); if (actionId <= 0) { MDRActionServiceUtil.addAction( ruleGroupInstanceId, nameMap, descriptionMap, type, typeSettingsProperties, serviceContext); } else { MDRActionServiceUtil.updateAction( actionId, nameMap, descriptionMap, type, typeSettingsProperties, serviceContext); } }
@Override protected String getEditorJSP(String type) { ActionHandler actionHandler = ActionHandlerManagerUtil.getActionHandler(type); String editorJSP = null; if (actionHandler != null) { editorJSP = _editorJSPs.get(actionHandler.getClass()); } if (editorJSP == null) { editorJSP = StringPool.BLANK; } return editorJSP; }