Examples of statusNotificationName()


Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

                message += "<br>With the revocation info we received, there was an indication that you wanted your " +
                           "data to be permanently deleted from our servers. Consequently we just permanently removed your " +
                            connector.getPrettyName() + " connector and all its associated data.";
            }
            notificationsService.addNamedNotification(updateInfo.getGuestId(), Notification.Type.WARNING,
                                                      connector.statusNotificationName(), message);
            UpdateWorkerTask.AuditTrailEntry failed = new UpdateWorkerTask.AuditTrailEntry(new Date(), updateResult.getType().toString(), "abort");
            abort(updateInfo.apiKey, failed, updateResult.reason);
            break;
        case NEEDS_REAUTH:
            notificationsService.addNamedNotification(updateInfo.getGuestId(), Notification.Type.WARNING,
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

            UpdateWorkerTask.AuditTrailEntry failed = new UpdateWorkerTask.AuditTrailEntry(new Date(), updateResult.getType().toString(), "abort");
            abort(updateInfo.apiKey, failed, updateResult.reason);
            break;
        case NEEDS_REAUTH:
            notificationsService.addNamedNotification(updateInfo.getGuestId(), Notification.Type.WARNING,
                                                      connector.statusNotificationName(),
                                                      "Heads Up. Your " + connector.prettyName() + " Authorization Token has expired.<br>" +
                                                      "Please head to <a href=\"javascript:App.manageConnectors()\">Manage Connectors</a>,<br>" +
                                                      "scroll to the " + connector.prettyName() + " section, and renew your tokens (look for the <i class=\"icon-resize-small icon-large\"></i> icon)");
            failed = new UpdateWorkerTask.AuditTrailEntry(new Date(), updateResult.getType().toString(), "abort");
            failed.stackTrace = updateResult.stackTrace;
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

                // we should not retry
                abort(updateInfo.apiKey, failed, updateResult.reason);
            }
            if (updateInfo.getUpdateType()== UpdateInfo.UpdateType.INITIAL_HISTORY_UPDATE)
                notificationsService.addNamedNotification(updateInfo.apiKey.getGuestId(), Notification.Type.ERROR,
                                                          connector.statusNotificationName(),
                                                          "<i class=\"icon-remove-sign\" style=\"color:red;margin-right:7px\"/>There was a problem while importing your " + connector.getPrettyName() + " data. We will try again later.  " +
                                                          "See <a href=\"javascript:App.manageConnectors()\">Manage Connectors</a> dialog for details."
                );
      break;
    case NO_RESULT:
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

        Guest guest = AuthHelper.getGuest();

        String errorParameter = request.getParameter("error");
        if (errorParameter!=null) {
            notificationsService.addNamedNotification(guest.getId(), Notification.Type.WARNING,
                                                      scopedApi.statusNotificationName(),
                                                      "There was a problem importing your " + scopedApi.prettyName() + " data: " + errorParameter);
            return new ModelAndView("redirect:/app/");
        }

    String swapTokenUrl = "https://accounts.google.com/o/oauth2/token";
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

  }

    public String welcomeBack(String connectorName, String message) {
        long guestId = AuthHelper.getGuestId();
        final Connector connector = Connector.getConnector(connectorName);
        notificationsService.addNamedNotification(guestId, Type.INFO, connector.statusNotificationName(), message);
        ApiKey apiKey = guestService.getApiKey(guestId, connector);
        connectorUpdateService.updateConnector(apiKey, true);
        return "redirect:/app";
    }
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

        final String errorMessage = request.getParameter("error");
        final Guest guest = AuthHelper.getGuest();
        Connector connector = Connector.getConnector("up");
        if (errorMessage!=null) {
            notificationsService.addNamedNotification(guest.getId(),
                                                      Notification.Type.ERROR, connector.statusNotificationName(),
                                                      "There was an error while setting you up with the Jawbone UP service: " + errorMessage);
            return "redirect:/app";
        }
        final String code = request.getParameter("code");
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

        if (token.has("error")) {
            String errorCode = token.getString("error");
            notificationsService.addNamedNotification(guest.getId(),
                                                      Notification.Type.ERROR,
                                                      connector.statusNotificationName(),
                                                      errorCode);
            // NOTE: In the future if we implement renew for the UP connector
            // we will potentially need to mark the connector as permanently failed.
            // The way to do this is to get hold of the existing apiKey and do:
            //  guestService.setApiKeyStatus(apiKey.getId(), ApiKey.Status.STATUS_PERMANENT_FAILURE, null);
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

        final String errorMessage = request.getParameter("error");
        final Guest guest = AuthHelper.getGuest();
        Connector connector = Connector.getConnector("moves");
        if (errorMessage!=null) {
            notificationsService.addNamedNotification(guest.getId(),
                                                      Notification.Type.ERROR, connector.statusNotificationName(),
                                                      "There was an error while setting you up with the moves service: " + errorMessage);
            return "redirect:/app";
        }
        final String code = request.getParameter("code");
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

        if (token.has("error")) {
            String errorCode = token.getString("error");
            notificationsService.addNamedNotification(guest.getId(),
                                                      Notification.Type.ERROR,
                                                      connector.statusNotificationName(),
                                                      errorCode);
            // NOTE: In the future if we implement renew for the Moves connector
            // we will potentially need to mark the connector as permanently failed.
            // The way to do this is to get hold of the existing apiKey and do:
            //  guestService.setApiKeyStatus(apiKey.getId(), ApiKey.Status.STATUS_PERMANENT_FAILURE, null);
View Full Code Here

Examples of org.fluxtream.core.connectors.Connector.statusNotificationName()

                      .append(" message=\"").append(msg).append("\"");
            logger.info(sb2.toString());
            System.out.println(msg);

            // Notify the user that the tokens need to be manually renewed
            notificationsService.addNamedNotification(apiKey.getGuestId(), Notification.Type.WARNING, connector.statusNotificationName(),
                                                      "Heads Up. This server cannot automatically refresh your Moves authentication tokens.<br>" +
                                                      "Please head to <a href=\"javascript:App.manageConnectors()\">Manage Connectors</a>,<br>" +
                                                      "scroll to the Moves connector, delete the connector, and re-add<br>" +
                                                      "<p>We apologize for the inconvenience</p>");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.