Search in sources :

Example 6 with SendDestinationAndMethod

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SendDestinationAndMethod in project open-smart-grid-platform by OSGP.

the class PushSetupSmsConverter method convertFrom.

@Override
public PushSetupSms convertFrom(final org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.PushSetupSms source, final Type<PushSetupSms> destinationType, final MappingContext context) {
    if (source == null) {
        return null;
    }
    final PushSetupSms.Builder builder = new PushSetupSms.Builder();
    final String destination = source.getHost() + ":" + source.getPort();
    final SendDestinationAndMethod sendDestinationAndMethod = new SendDestinationAndMethod(TransportServiceType.TCP, destination, MessageType.MANUFACTURER_SPECIFIC);
    builder.withSendDestinationAndMethod(sendDestinationAndMethod);
    return builder.build();
}
Also used : SendDestinationAndMethod(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SendDestinationAndMethod) PushSetupSms(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PushSetupSms)

Aggregations

SendDestinationAndMethod (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.SendDestinationAndMethod)6 BigInteger (java.math.BigInteger)2 PushObject (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.PushObject)2 PushSetupAlarm (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PushSetupAlarm)2 PushSetupSms (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.PushSetupSms)2 SendDestinationAndMethodDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.SendDestinationAndMethodDto)2 CosemObjectDefinition (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.CosemObjectDefinition)1