public static <T> boolean getStringParamValue(T paramCntr, WebFieldDef fieldDef,
            boolean required, String defValue,
            StringBuilder sBuffer, ProcessResult result) {
        String paramValue;
        // get parameter value
        if (paramCntr instanceof Map) {
            Map<String, String> keyValueMap =
                    (Map<String, String>) paramCntr;
            paramValue = keyValueMap.get(fieldDef.name);
            if (paramValue == null) {
                paramValue = keyValueMap.get(fieldDef.shortName);
            }
        } else if (paramCntr instanceof HttpServletRequest) {
            HttpServletRequest req = (HttpServletRequest) paramCntr;
            paramValue = req.getParameter(fieldDef.name);
            if (paramValue == null) {
                paramValue = req.getParameter(fieldDef.shortName);
            }
        } else if (paramCntr instanceof JsonObject) {
            JsonObject jsonObject = (JsonObject) paramCntr;
            paramValue = jsonObject.get(fieldDef.name).getAsString();
            if (paramValue == null) {
                paramValue = jsonObject.get(fieldDef.shortName).getAsString();
            }
        } else {
            throw new IllegalArgumentException("Unknown parameter type!");
        }
        return checkStrParamValue(paramValue,
                fieldDef, required, defValue, sBuffer, result);
    }
Parse the parameter value from an object value

@param paramCntr    parameter container object
@param fieldDef     the parameter field definition
@param required     a boolean value represent whether the parameter is must required
@param defValue     a default value returned if the field not exist
@param sBuffer      string buffer
@param result       process result
@return valid result for the parameter value
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/utils/WebParameterUtils.java