コード例 #1
0
  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);
    }
  }
コード例 #2
0
  @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;
  }