Examples of VerifiedAccount


Examples of cave.nice.testMessage.data.VerifiedAccount

              .build());
    }

    DataManager dataManager = getDataManager();
    try {
      VerifiedAccount account = dataManager
          .getVerifiedAccount(emailAddress);

      // First, check if a policy of the selected type exists, If so, we
      // update it
      for (ReportingPolicy reportingPolicy : account
          .getReportingPolicies()) {
        if (type.equals(reportingPolicy.getType())) {
          throw new WebApplicationException(Status.CONFLICT);
        }
      }
View Full Code Here

Examples of cave.nice.testMessage.data.VerifiedAccount

    }
    */

    DataManager dataManager = getDataManager();
    try {
      VerifiedAccount account = dataManager
          .getVerifiedAccount(emailAddress);

      // First, check if a policy of the selected type exists, If so, we
      // update it
      ReportingPolicy reportingPolicy = account.getReportingPolicy(type);
      boolean modified = false;
      if (notifyAfterMinutes != null && reportingPolicy.getNotifyAfterMinutes() != notifyAfterMinutes) {
        reportingPolicy.setNotifyAfterMinutes(notifyAfterMinutes);
        modified = true;
      }
View Full Code Here

Examples of cave.nice.testMessage.data.VerifiedAccount

  public Response getReportingPolicies(
      @PathParam("emailAddress") InternetAddress emailAddress)
      throws WebApplicationException {
    DataManager dataManager = getDataManager();
    try {
      VerifiedAccount account = dataManager
          .getVerifiedAccount(emailAddress);

      List<ReportingPolicy> reportingPolicies = Lists
          .newArrayList(account.getReportingPolicies());

      return Response.ok(reportingPolicies).build();
    } catch (UnknownVerifiedAccountException e) {
      throw new WebApplicationException(Response
          .status(Status.NOT_FOUND)
View Full Code Here

Examples of cave.nice.testMessage.data.VerifiedAccount

      @PathParam("emailAddress") InternetAddress emailAddress,
      @FormParam("type") ReportingPolicyType type)
      throws WebApplicationException {
    DataManager dataManager = getDataManager();
    try {
      VerifiedAccount account = dataManager
          .getVerifiedAccount(emailAddress);

      ReportingPolicy reportingPolicy = account.getReportingPolicy(type);
      dataManager.removeReportingPolicy(account, reportingPolicy);
      return Response.status(Status.NO_CONTENT).build();
    } catch (UnknownVerifiedAccountException e) {
      throw new WebApplicationException(Response
          .status(Status.NOT_FOUND)
View Full Code Here

Examples of cave.nice.testMessage.data.VerifiedAccount

                  + "' results already registered (but not yet verified!) since "
                  + unverifiedAccount.getRegistrationDate())
              .build());
    } catch (UnknownUnverifiedAccountException e1) {
      try {
        VerifiedAccount verifiedAccount = dataManager
            .getVerifiedAccount(emailAddress);
        throw new WebApplicationException(Response
            .status(Status.BAD_REQUEST)
            .entity("The submitted email address '" + emailAddress
                + "' results already registered since "
                + verifiedAccount.getRegistrationDate())
            .build());
      } catch (UnknownVerifiedAccountException e) {
        /*
         * All right, that is how we like it ;-)
         */
 
View Full Code Here

Examples of cave.nice.testMessage.data.VerifiedAccount

      String testChallenge = testIdentifiers[0];
      UUID challenge = UUID.fromString(testChallenge);
      String accountIdentifier = accountIdentifiers[0];

      VerifiedAccount account = dataManager.getVerifiedAccount(KeyFactory
          .stringToKey(accountIdentifier));

      processSMTPTestAnswer(dataManager, account, challenge);
    } catch (MessagingException e) {
      throw new ServletException(
View Full Code Here

Examples of cave.nice.testMessage.data.VerifiedAccount

      UknownTestChallengeException, TestAlreadyAnsweredException {
    /*
     * It could be that the address is the one used to send the test in the
     * first place :D
     */
    VerifiedAccount account = null;
    if (from.equals(appInternetAddress)) {
      /*
       * OK, they just forwarded it.
       */
      Address[] tos = null;
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.