public static <T> boolean getEnableStatusValue(T paramCntr, WebFieldDef fieldDef,
            boolean required, EnableStatus defValue,
            StringBuilder sBuffer,
            ProcessResult result) {
        if (!WebParameterUtils.getBooleanParamValue(paramCntr, fieldDef,
                required, null, sBuffer, result)) {
            return result.isSuccess();
        }
        Boolean enableValue = (Boolean) result.getRetData();
        if (enableValue == null) {
            result.setSuccResult(defValue);
        } else if (enableValue) {
            result.setSuccResult(EnableStatus.STATUS_ENABLE);
        } else {
            result.setSuccResult(EnableStatus.STATUS_DISABLE);
        }
        return result.isSuccess();
    }
Parse the parameter value from an object value to a EnableStatus value

@param paramCntr   parameter container object
@param required   a boolean value represent whether the parameter is must required
@param defValue   a default value returned if failed to parse value from the given object
@param sBuffer     string buffer
@param result     process result of parameter value
@return the process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/utils/WebParameterUtils.java