class PatchingServiceImpl implements PatchingService, Constants {

    @Override
    public List<Map<String, Object>> getPatchingDetails(String assetGroup,
            Map<String, String> filter) throws ServiceException {
        List<Map<String, Object>> patchingDetailsList;
        try {
            patchingDetailsList = new ArrayList<>();
            AssetCountDTO[] targetTypes = filterRepository
                    .getListOfTargetTypes(assetGroup, null);
            for (AssetCountDTO targettype : targetTypes) {
                if (StringUtils.isNotBlank(targettype.getType()) && ("ec2".equals(targettype.getType()))) {
                        // get apps info
                        List<Map<String, Object>> cloudAppsList = getCloudAppList(CLOUD);
                        Map<String, Object> cloudappstodirectorMap = getCloudAppstodirectorMap(
                                cloudAppsList, DIRECTOR);
                        Map<String, Object> cloudappstoExecutiveMap = getCloudAppstodirectorMap(
                                cloudAppsList, EXCUTIVE_SPONSOR);
                        List<Map<String, Object>> issueInfo = repository
                                .getIssueInfo(assetGroup);
                        Map<String, String> instanceIssueStatusLookup = prepareInstanceToIssueStatusLookup(issueInfo);
                        List<Map<String, Object>> instanceInfo = repository
                                .getInstanceInfo(assetGroup, filter);
                        List<Map<String, Object>> closedInfo = repository
                                .getClosedIssueInfo(assetGroup,
                                        instanceInfo.size());
                        Map<String, String> closedInfoLookup = prepareInstanceToClosedIssueStatusLookup(closedInfo);
                        patchingDetailsListForEc2(patchingDetailsList,
                                instanceInfo, instanceIssueStatusLookup,
                                cloudappstodirectorMap, 
                                cloudappstoExecutiveMap, closedInfoLookup,
                                targettype.getType());

                }
            }
        } catch (DataException e) {
            throw new ServiceException(e);
        }
        return patchingDetailsList;
    }

}