/FileExtraction/Java_unseen/neatlogic_neatlogic-itsm-base/src/main/java/neatlogic/framework/process/datacube/StaticDataCubeHandler.java
package neatlogic.framework.process.datacube;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSONArray;

import neatlogic.framework.process.dto.ProcessDataCubeVo;
import neatlogic.framework.process.dto.ProcessDataCubeVo.DataCubeType;

@Component
public class StaticDataCubeHandler implements IDataCubeHandler {

	@Override
	public String getType() {
		return DataCubeType.STATIC.getValue();
	}

	@Override
	public JSONArray getData(ProcessDataCubeVo dataCubeVo) {
		if(StringUtils.isNotBlank(dataCubeVo.getValue())) {
			try {
				return JSONArray.parseArray(dataCubeVo.getValue());
			}catch(Exception ex) {
				
			}
		}
		return new JSONArray();
	}

}
