use of org.wso2.carbon.apimgt.rest.api.analytics.dto.ApplicationCountDTO in project carbon-apimgt by wso2.
the class AnalyticsMappingUtil method fromApplicationCountToListDTO.
/**
* Converts and ApplicationCountList to ApplicationCountListDTO.
*
* @param applicationCountList list of ApplicationCount objects
* @return corresponding ApplicationCountListDTO object
*/
public static ApplicationCountListDTO fromApplicationCountToListDTO(List<ApplicationCount> applicationCountList, ZoneId zoneId) {
ApplicationCountListDTO applicationCountListDTO = new ApplicationCountListDTO();
List<ApplicationCountDTO> applicationCountDTOList = new ArrayList<>();
applicationCountListDTO.setCount(applicationCountList.size());
for (ApplicationCount applicationCount : applicationCountList) {
applicationCountDTOList.add(fromApplicationCountToDTO(applicationCount, zoneId));
}
applicationCountListDTO.setList(applicationCountDTOList);
return applicationCountListDTO;
}
use of org.wso2.carbon.apimgt.rest.api.analytics.dto.ApplicationCountDTO in project carbon-apimgt by wso2.
the class AnalyticsMappingUtil method fromApplicationCountToDTO.
private static ApplicationCountDTO fromApplicationCountToDTO(ApplicationCount applicationCount, ZoneId zoneId) {
ApplicationCountDTO applicationCountDTO = new ApplicationCountDTO();
applicationCountDTO.setTime(epochToISO8601DateTime(applicationCount.getTimestamp(), zoneId));
applicationCountDTO.setCount(applicationCount.getCount());
return applicationCountDTO;
}
Aggregations