private StringBuilder innAddOrUpdTopicCtrlInfo(HttpServletRequest req,
            StringBuilder sBuffer,
            ProcessResult result,
            boolean isAddOp) {
        // check and get operation info
        if (!WebParameterUtils.getAUDBaseInfo(req, isAddOp, null, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        final BaseEntity opEntity = (BaseEntity) result.getRetData();
        // check and get topicName field
        if (!WebParameterUtils.getStringParamValue(req,
                WebFieldDef.COMPSTOPICNAME, true, null, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        Set<String> topicNameSet = (Set<String>) result.getRetData();
        // get topicNameId info
        int topicNameId = TBaseConstants.META_VALUE_UNDEFINED;
        if (topicNameSet.size() == 1) {
            if (!WebParameterUtils.getIntParamValue(req, WebFieldDef.TOPICNAMEID,
                    false, (isAddOp ? TServerConstants.TOPIC_ID_MIN
                            : TBaseConstants.META_VALUE_UNDEFINED),
                    TServerConstants.TOPIC_ID_MIN, sBuffer, result)) {
                WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
                return sBuffer;
            }
            topicNameId = (int) result.getRetData();
        }
        // get authCtrlStatus info
        if (!WebParameterUtils.getEnableStatusValue(req, WebFieldDef.AUTHCTRLENABLE,
                false, (isAddOp ? EnableStatus.STATUS_DISABLE : null), sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        EnableStatus enableTopicAuth = (EnableStatus) result.getRetData();
        // check and get max message size
        ClusterSettingEntity defClusterSetting =
                defMetaDataService.getClusterDefSetting(false);
        int maxMsgSizeMB = defClusterSetting.getMaxMsgSizeInMB();
        // check max message size
        if (!WebParameterUtils.getIntParamValue(req,
                WebFieldDef.MAXMSGSIZEINMB, false,
                (isAddOp ? maxMsgSizeMB : TBaseConstants.META_VALUE_UNDEFINED),
                TBaseConstants.META_MIN_ALLOWED_MESSAGE_SIZE_MB,
                TBaseConstants.META_MAX_ALLOWED_MESSAGE_SIZE_MB, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return sBuffer;
        }
        maxMsgSizeMB = (int) result.getRetData();
        // add or update records
        List<TopicProcessResult> retInfo =
                defMetaDataService.addOrUpdTopicCtrlConf(isAddOp, opEntity,
                        topicNameSet, topicNameId, enableTopicAuth, maxMsgSizeMB, sBuffer, result);
        return buildRetInfo(retInfo, sBuffer);
    }
Delete topic control info

@param req       Http Servlet Request
@param sBuffer   string buffer
@param result    process result
@return    process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebTopicCtrlHandler.java