use of org.wso2.carbon.apimgt.internal.service.dto.ApplicationKeyMappingListDTO in project carbon-apimgt by wso2.
the class SubscriptionValidationDataUtil method fromApplicationKeyMappingToApplicationKeyMappingListDTO.
public static ApplicationKeyMappingListDTO fromApplicationKeyMappingToApplicationKeyMappingListDTO(List<ApplicationKeyMapping> model) {
ApplicationKeyMappingListDTO applicationKeyMappingListDTO = new ApplicationKeyMappingListDTO();
if (model != null) {
for (ApplicationKeyMapping applicationKeyMapping : model) {
ApplicationKeyMappingDTO applicationKeyMappingDTO = new ApplicationKeyMappingDTO();
applicationKeyMappingDTO.setApplicationId(applicationKeyMapping.getApplicationId());
applicationKeyMappingDTO.setConsumerKey(applicationKeyMapping.getConsumerKey());
applicationKeyMappingDTO.setKeyType(applicationKeyMapping.getKeyType());
applicationKeyMappingDTO.setKeyManager(applicationKeyMapping.getKeyManager());
applicationKeyMappingDTO.setApplicationUUID(applicationKeyMapping.getApplicationUUID());
applicationKeyMappingListDTO.getList().add(applicationKeyMappingDTO);
}
applicationKeyMappingListDTO.setCount(model.size());
} else {
applicationKeyMappingListDTO.setCount(0);
}
return applicationKeyMappingListDTO;
}
Aggregations