use of org.wso2.carbon.apimgt.rest.api.publisher.dto.ApplicationDTO in project carbon-apimgt by wso2.
the class MappingUtil method toApplicationDto.
/**
* This method convert Application model to ApplicationEvent
* @param application Contains application data
* @return DTO containing application data
*/
public static ApplicationDTO toApplicationDto(Application application) {
ApplicationDTO applicationDTO = new ApplicationDTO();
applicationDTO.setApplicationId(application.getId());
applicationDTO.setDescription(application.getDescription());
applicationDTO.setName(application.getName());
applicationDTO.setSubscriber(application.getCreatedUser());
if (application.getPolicy() != null) {
applicationDTO.setThrottlingTier(application.getPolicy().getPolicyName());
}
return applicationDTO;
}
Aggregations