Package com.cosmicpush.app.domain.clients.config

Examples of com.cosmicpush.app.domain.clients.config.GoogleTalkConfig


    if (StringUtils.isNotBlank(reasonNotPermitted)) {
      return apiRequest.denyRequest(reasonNotPermitted);
    }

    String apiMessage = null;
    GoogleTalkConfig config = apiClient.getGoogleTalkConfig();
    if (config == null) {
      return apiRequest.failed("Google Talk configuration was not specified.");
    }

    JabberFactory factory = new JabberFactory(config.getUserName(), config.getPassword());

    if (StringUtils.isNotBlank(config.getRecipientOverride())) {
      // This is NOT a "production" request.
      factory.sendTo(config.getRecipientOverride(), action.getMessage());
      apiMessage = String.format("Request sent to recipient override, %s.", config.getRecipientOverride());
    } else {
      // This IS a "production" request.
      factory.sendTo(action.getRecipient(), action.getMessage());
    }
View Full Code Here


    String reasonNotPermitted = account.getReasonNotPermitted(push);
    if (StringUtils.isNotBlank(reasonNotPermitted)) {
      return apiRequest.denyRequest(reasonNotPermitted);
    }

    GoogleTalkConfig gtConfig = apiClient.getGoogleTalkConfig();
    if (gtConfig == null) {
      return apiRequest.failed("Google Talk configuration was not specified.");

    } else {
      JabberFactory factory = new JabberFactory(gtConfig.getUserName(), gtConfig.getPassword());
      String id = apiRequest.getApiRequestId();
      id = id.substring(id.indexOf(":")+1);
      String message = push.getMessage() + " >> " + "https://www.cosmicpush.com/q/" + id;
      factory.sendTo("jacob.parr@gmail.com", message);
      return apiRequest.processed();
View Full Code Here

TOP

Related Classes of com.cosmicpush.app.domain.clients.config.GoogleTalkConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.