All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.multiinone.event.vo.SimpleEventSubcribeRequest Maven / Gradle / Ivy

The newest version!
package com.dahuatech.icc.multiinone.event.vo;

import com.dahuatech.icc.event.enums.CategoryEnums;
import com.dahuatech.icc.multiinone.event.domain.BaseEventSubcribeInfo;
import com.dahuatech.icc.multiinone.exception.BusinessException;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SimpleEventSubcribeRequest extends BaseEventSubcribeInfo {

    /**类型列表配置*/
    private Map> typesConfigs;

    public Map> getTypesConfigs() {
        return typesConfigs;
    }

    public void setTypesConfigs(Map> typesConfigs) {
        this.typesConfigs = typesConfigs;
    }

    public void businessValid() {
        super.businessValid();
        if(typesConfigs == null || typesConfigs.size() == 0){
            typesConfigs = new HashMap>();
        }
        for(Map.Entry> entry : typesConfigs.entrySet()){
            if(!CategoryEnums.isRight(entry.getKey())){
                throw new BusinessException("类型列表配置非法|key:" + entry.getKey());
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy