コード例 #1
0
 private List<PlayerTarget> getEligiblePlayerTargets(
     final CampaignDeliverMessage campaignDeliverMessage) {
   List<PlayerTarget> eligiblePlayerTargets =
       mobileDeviceCampaignDao.getEligiblePlayerTargets(
           campaignDeliverMessage.getCampaignRunId(),
           Platform.AMAZON,
           campaignDeliverMessage.getFrom(),
           campaignDeliverMessage.getTo());
   LOG.debug("segment size {} for {}", eligiblePlayerTargets.size(), campaignDeliverMessage);
   return eligiblePlayerTargets;
 }
コード例 #2
0
  private void sendMessageToTarget(
      final CampaignDeliverMessage campaignDeliverMessage,
      final PlayerTarget playerTarget,
      final Map<String, String> personalisedContent) {

    AmazonDeviceMessage message =
        new AmazonDeviceMessage(
            playerTarget.getPlayerId(),
            playerTarget.getTargetToken(),
            personalisedContent.get(MessageContentType.TITLE.getKey()),
            personalisedContent.get(MessageContentType.TITLE.getKey()),
            personalisedContent.get(MessageContentType.MESSAGE.getKey()),
            "notify",
            campaignDeliverMessage.getCampaignRunId());

    pushNotificationPublisher.sendPushNotification(message);
  }
コード例 #3
0
 private Map<String, String> getCampaignContent(
     final CampaignDeliverMessage campaignDeliverMessage) {
   return campaignContentService.getContent(campaignDeliverMessage.getCampaignRunId());
 }
コード例 #4
0
 private Map<NotificationChannelConfigType, String> getChannelCampaignConfig(
     final CampaignDeliverMessage campaignDeliverMessage) {
   return campaignContentService.getChannelConfig(campaignDeliverMessage.getCampaignRunId());
 }