Пример #1
0
  @Override
  @PreInboundActionMeta("login")
  @OutboundActionMeta(name = "config")
  public void handleOutbound(Context ctx) throws ServletException, IOException {
    Model model = new Model(ctx);
    Payload payload = ctx.getPayload();

    model.setPage(SystemPage.CONFIG);
    Action action = payload.getAction();

    storeModifyInfo(ctx, payload);
    model.setAction(action);
    switch (action) {
      case PROJECT_ALL:
      case PROJECT_UPDATE_SUBMIT:
      case PROJECT_DELETE:
      case DOMAIN_GROUP_CONFIGS:
      case DOMAIN_GROUP_CONFIG_UPDATE:
      case DOMAIN_GROUP_CONFIG_DELETE:
      case DOMAIN_GROUP_CONFIG_SUBMIT:
      case BUG_CONFIG_UPDATE:
      case ROUTER_CONFIG_UPDATE:
      case ALERT_SENDER_CONFIG_UPDATE:
      case BLACK_CONFIG_UPDATE:
      case STORAGE_GROUP_CONFIG_UPDATE:
      case SERVER_FILTER_CONFIG_UPDATE:
      case ALL_REPORT_CONFIG:
        m_globalConfigProcessor.process(action, payload, model);
        break;

      case THIRD_PARTY_RULE_CONFIGS:
      case THIRD_PARTY_RULE_UPDATE:
      case THIRD_PARTY_RULE_SUBMIT:
      case THIRD_PARTY_RULE_DELETE:
        m_thirdPartyConfigProcessor.process(action, payload, model);
        break;

      case AGGREGATION_ALL:
      case AGGREGATION_UPDATE:
      case AGGREGATION_UPDATE_SUBMIT:
      case AGGREGATION_DELETE:
      case URL_PATTERN_CONFIG_UPDATE:
      case URL_PATTERN_ALL:
      case URL_PATTERN_UPDATE:
      case URL_PATTERN_UPDATE_SUBMIT:
      case URL_PATTERN_DELETE:
      case WEB_RULE:
      case WEB_RULE_ADD_OR_UPDATE:
      case WEB_RULE_ADD_OR_UPDATE_SUBMIT:
      case WEB_RULE_DELETE:
        m_patternConfigProcessor.processPatternConfig(action, payload, model);
        break;

      case TOPOLOGY_GRAPH_NODE_CONFIG_LIST:
      case TOPOLOGY_GRAPH_NODE_CONFIG_ADD_OR_UPDATE:
      case TOPOLOGY_GRAPH_NODE_CONFIG_ADD_OR_UPDATE_SUBMIT:
      case TOPOLOGY_GRAPH_NODE_CONFIG_DELETE:
      case TOPOLOGY_GRAPH_EDGE_CONFIG_LIST:
      case TOPOLOGY_GRAPH_EDGE_CONFIG_ADD_OR_UPDATE:
      case TOPOLOGY_GRAPH_EDGE_CONFIG_ADD_OR_UPDATE_SUBMIT:
      case TOPOLOGY_GRAPH_EDGE_CONFIG_DELETE:
      case TOPOLOGY_GRAPH_PRODUCT_LINE:
      case TOPOLOGY_GRAPH_PRODUCT_LINE_ADD_OR_UPDATE:
      case TOPOLOGY_GRAPH_PRODUCT_LINE_DELETE:
      case TOPOLOGY_GRAPH_PRODUCT_LINE_ADD_OR_UPDATE_SUBMIT:
      case TOPO_GRAPH_FORMAT_CONFIG_UPDATE:
        m_topologyConfigProcessor.process(action, payload, model);
        break;

      case METRIC_CONFIG_ADD_OR_UPDATE:
      case METRIC_CONFIG_ADD_OR_UPDATE_SUBMIT:
      case METRIC_RULE_ADD_OR_UPDATE:
      case METRIC_RULE_ADD_OR_UPDATE_SUBMIT:
      case METRIC_CONFIG_LIST:
      case METRIC_CONFIG_DELETE:
      case METRIC_CONFIG_BATCH_DELETE:
      case METRIC_RULE_CONFIG_UPDATE:
        m_metricConfigProcessor.process(action, payload, model);
        break;

      case EXCEPTION:
      case EXCEPTION_THRESHOLD_DELETE:
      case EXCEPTION_THRESHOLD_UPDATE:
      case EXCEPTION_THRESHOLD_ADD:
      case EXCEPTION_THRESHOLD_UPDATE_SUBMIT:
      case EXCEPTION_EXCLUDE_DELETE:
      case EXCEPTION_EXCLUDE_ADD:
      case EXCEPTION_EXCLUDE_UPDATE_SUBMIT:
        m_exceptionConfigProcessor.process(action, payload, model);
        break;

      case NETWORK_RULE_CONFIG_LIST:
      case NETWORK_RULE_ADD_OR_UPDATE:
      case NETWORK_RULE_ADD_OR_UPDATE_SUBMIT:
      case NETWORK_RULE_DELETE:
      case NET_GRAPH_CONFIG_UPDATE:
        m_networkConfigProcessor.process(action, payload, model);
        break;

      case DATABASE_RULE_CONFIG_LIST:
      case DATABASE_RULE_ADD_OR_UPDATE:
      case DATABASE_RULE_ADD_OR_UPDATE_SUBMIT:
      case DATABASE_RULE_DELETE:
        m_databaseConfigProcessor.process(action, payload, model);
        break;

      case SYSTEM_RULE_CONFIG_LIST:
      case SYSTEM_RULE_ADD_OR_UPDATE:
      case SYSTEM_RULE_ADD_OR_UPDATE_SUBMIT:
      case SYSTEM_RULE_DELETE:
        m_systemConfigProcessor.process(action, payload, model);
        break;

      case HEARTBEAT_RULE_CONFIG_LIST:
      case HEARTBEAT_RULE_ADD_OR_UPDATE:
      case HEARTBEAT_RULE_ADD_OR_UPDATE_SUBMIT:
      case HEARTBEAT_RULE_DELETE:
        m_heartbeatConfigProcessor.process(action, payload, model);
        break;

      case STORAGE_RULE:
      case STORAGE_RULE_ADD_OR_UPDATE:
      case STORAGE_RULE_ADD_OR_UPDATE_SUBMIT:
      case STORAGE_RULE_DELETE:
        m_storageConfigProcessor.process(action, payload, model);
        break;

      case APP_NAME_CHECK:
      case APP_LIST:
      case APP_COMMMAND_UPDATE:
      case APP_COMMAND_SUBMIT:
      case APP_COMMAND_DELETE:
      case APP_CODE_UPDATE:
      case APP_CODE_SUBMIT:
      case APP_CODE_ADD:
      case APP_CODE_DELETE:
      case APP_SPEED_UPDATE:
      case APP_SPEED_ADD:
      case APP_SPEED_DELETE:
      case APP_SPEED_SUBMIT:
      case APP_CONFIG_UPDATE:
      case APP_RULE:
      case APP_RULE_ADD_OR_UPDATE:
      case APP_RULE_ADD_OR_UPDATE_SUBMIT:
      case APP_RULE_DELETE:
      case APP_COMPARISON_CONFIG_UPDATE:
      case APP_RULE_BATCH_UPDATE:
      case APP_CONSTANT_ADD:
      case APP_CONSTANT_UPDATE:
      case APP_CONSTATN_DELETE:
      case APP_CONSTATN_SUBMIT:
      case APP_COMMAND_FORMAT_CONFIG:
        m_appConfigProcessor.process(action, payload, model);
        break;

      case TRANSACTION_RULE:
      case TRANSACTION_RULE_ADD_OR_UPDATE:
      case TRANSACTION_RULE_ADD_OR_UPDATE_SUBMIT:
      case TRANSACTION_RULE_DELETE:
        m_transactionConfigProcessor.process(action, payload, model);
        break;

      case EVENT_RULE:
      case EVENT_RULE_ADD_OR_UPDATE:
      case EVENT_RULE_ADD_OR_UPDATE_SUBMIT:
      case EVENT_RULE_DELETE:
        m_eventConfigProcessor.process(action, payload, model);
        break;

      case ALERT_DEFAULT_RECEIVERS:
      case ALERT_POLICY:
        m_alertConfigProcessor.process(action, payload, model);
        break;

      case DISPLAY_POLICY:
      case ACTIVITY_CONFIG_UPDATE:
        m_displayConfigProfessor.process(action, payload, model);
        break;
    }
    m_jspViewer.view(ctx, model);
  }