use of org.wso2.carbon.apimgt.rest.api.core.dto.AnalyticsInfoDTO in project carbon-apimgt by wso2.
the class MappingUtil method toAnalyticsDTO.
/**
* Converts RegistrationSummary analytics information into AnalyticsInfoDTO
*
* @param registrationSummary the registration summary required by gateway
* @return AnalyticsInfoDTO
*/
private static AnalyticsInfoDTO toAnalyticsDTO(RegistrationSummary registrationSummary) {
AnalyticsInfoDTO analyticsInfoDTO = new AnalyticsInfoDTO();
analyticsInfoDTO.serverURL(registrationSummary.getAnalyticsInfo().getDasServerURL());
analyticsInfoDTO.setEnabled(registrationSummary.getAnalyticsInfo().isEnabled());
CredentialsDTO analyticsServerCredentials = new CredentialsDTO();
analyticsServerCredentials.setUsername(registrationSummary.getAnalyticsInfo().getDasServerCredentials().getUsername());
analyticsServerCredentials.setPassword(registrationSummary.getAnalyticsInfo().getDasServerCredentials().getPassword());
analyticsInfoDTO.setCredentials(analyticsServerCredentials);
return analyticsInfoDTO;
}
Aggregations