use of com.vmware.flowgate.nlyteworker.scheduler.job.common.HandleAssetUtil in project flowgate by vmware.
the class NlyteDataService method generateAssets.
public List<Asset> generateAssets(String nlyteSource, List<NlyteAsset> nlyteAssets, HashMap<Integer, LocationGroup> locationMap, HashMap<Integer, Manufacturer> manufacturerMap, HashMap<Integer, Material> materialMap, AssetCategory category, HashMap<Long, String> chassisMountedAssetNumberAndChassisIdMap) {
HandleAssetUtil assetUtil = new HandleAssetUtil();
List<Asset> oldAssetsFromWormhole = restClient.getAllAssetsBySourceAndType(nlyteSource, category);
Map<Long, Asset> assetsFromWormholeMap = assetUtil.generateAssetsMap(oldAssetsFromWormhole);
List<Asset> allAssetsFromNlyte = assetUtil.getAssetsFromNlyte(nlyteSource, nlyteAssets, locationMap, materialMap, manufacturerMap, chassisMountedAssetNumberAndChassisIdMap);
return assetUtil.handleAssets(allAssetsFromNlyte, assetsFromWormholeMap);
}
Aggregations