use of org.wso2.carbon.apimgt.rest.api.store.v1.dto.AdditionalSubscriptionInfoSolaceTopicsObjectDTO in project carbon-apimgt by wso2.
the class AdditionalSubscriptionInfoMappingUtil method mapSolaceTopicObjects.
/**
* Map SolaceTopicsObjectDTO details from Solace package to DevPortal DTOs
*
* @param solaceTopicsObject SolaceTopicsObjectDTO object from Solace package
* @return AdditionalSubscriptionInfoSolaceTopicsObjectDTO object
*/
private static AdditionalSubscriptionInfoSolaceTopicsObjectDTO mapSolaceTopicObjects(SolaceTopicsObjectDTO solaceTopicsObject) {
AdditionalSubscriptionInfoSolaceTopicsObjectDTO solaceTopicsObjectDTO = new AdditionalSubscriptionInfoSolaceTopicsObjectDTO();
// Set default syntax object
org.wso2.carbon.apimgt.solace.dtos.SolaceTopicsDTO defaultSyntaxObject = solaceTopicsObject.getDefaultSyntax();
SolaceTopicsDTO storeDefaultSolaceTopicObject = new SolaceTopicsDTO();
storeDefaultSolaceTopicObject.setPublishTopics(defaultSyntaxObject.getPublishTopics());
storeDefaultSolaceTopicObject.setSubscribeTopics(defaultSyntaxObject.getSubscribeTopics());
solaceTopicsObjectDTO.setDefaultSyntax(storeDefaultSolaceTopicObject);
// Set mqtt syntax object
org.wso2.carbon.apimgt.solace.dtos.SolaceTopicsDTO mqttSyntaxObject = solaceTopicsObject.getMqttSyntax();
SolaceTopicsDTO storeMQTTSolaceTopicObject = new SolaceTopicsDTO();
storeMQTTSolaceTopicObject.setPublishTopics(mqttSyntaxObject.getPublishTopics());
storeMQTTSolaceTopicObject.setSubscribeTopics(mqttSyntaxObject.getSubscribeTopics());
solaceTopicsObjectDTO.setMqttSyntax(storeMQTTSolaceTopicObject);
return solaceTopicsObjectDTO;
}
Aggregations