@Override
  public long saveTrigger(SPFTrigger trigger, String token, SPFError err) {
    Utils.logCall(TAG, "saveTrigger", trigger, token, err);

    AppAuth appAuth;
    try {
      appAuth = getAppAuth(token, err);
    } catch (Exception e) {
      return -1;
    }
    return getSPFNotificationManager().saveTrigger(trigger, appAuth.getAppIdentifier());
  }
  @Override
  public boolean deleteTrigger(long triggerId, String token, SPFError err) {
    Utils.logCall(TAG, "deleteTrigger", triggerId, token, err);

    AppAuth appAuth;
    try {
      appAuth = getAppAuth(token, err);
    } catch (Exception e) {
      return false;
    }
    return getSPFNotificationManager().deleteTrigger(triggerId, appAuth.getAppIdentifier());
  }
  @Override
  public List<SPFTrigger> listTrigger(String token, SPFError err) {
    Utils.logCall(TAG, "listTrigger", token, err);

    AppAuth appAuth;
    try {
      appAuth = getAppAuth(token, err);
    } catch (Exception e) {
      return new ArrayList<SPFTrigger>(0);
    }
    return getSPFNotificationManager().listTriggers(appAuth.getAppIdentifier());
  }