package com.ssj.service.conch.parents.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;

public class DimensionCountDto implements Serializable {
    private static final long serialVersionUID = 1L;
    private List<Map<String, Object>> dimensionCount;

    public DimensionCountDto () {
        dimensionCount = new ArrayList<>();
    }

    public void setDimensions (List<String> dimensions) {
        Map<String, Object> temp = null;
        if (dimensions != null){
            for (String d : dimensions){
                if (StringUtils.isNotBlank(d)){
                    temp = new HashMap<>();
                    temp.put("module", d);
                    temp.put("count", 0);
                    this.dimensionCount.add(temp);
                }
            }
        }
    }

    public List<Map<String, Object>> getDimensionCount (){
        return this.dimensionCount;
    }
}
