Examples of NotFoundException


Examples of com.braintreegateway.exceptions.NotFoundException

        return new Result<UnknownPaymentMethod>();
    }

    public PaymentMethod find(String token) {
        if(token.trim().equals("") || token == null)
            throw new NotFoundException();

        NodeWrapper response = http.get("/payment_methods/any/" + token);

        if (response.getElementName() == "paypal-account") {
            return new PayPalAccount(response);
View Full Code Here

Examples of com.cedarsoft.NotFoundException

  @Override
  @Nonnull
  public T findStoredObject( @Nonnull Matcher<T> matcher, @Nonnull String notFoundMessage ) throws NotFoundException {
    T found = findStoredObject( matcher );
    if ( found == null ) {
      throw new NotFoundException( notFoundMessage );
    }

    return found;
  }
View Full Code Here

Examples of com.cedarsoft.exceptions.NotFoundException

  private CouchDoc<DesignDocumentsVersionInfo> queryCurrentVersionInfoDoc() throws ActionFailedException, NotFoundException {
    try {
      return db.get( DESIGN_DOCS_VERSION_ID, serializer );
    } catch ( ActionFailedException e ) {
      if ( e.getStatus() == 404 ) {
        throw new NotFoundException( "No document found for <" + DESIGN_DOCS_VERSION_ID + ">", e );
      }
      throw e;
    }
  }
View Full Code Here

Examples of com.cedarsoft.serialization.NotFoundException

  @Override
  public OutputStream openOutForUpdate( @Nonnull String id ) throws NotFoundException, FileNotFoundException {
    File file = getFile( id );
    if ( !file.exists() ) {
      throw new NotFoundException( id );
    }
    return new BufferedOutputStream( new FileOutputStream( file ) );
  }
View Full Code Here

Examples of com.cedarsolutions.exception.NotFoundException

            if (method.getName().equals(name)) {
                return get(clazz, method);
            }
        }

        throw new NotFoundException("Could not find: " + clazz.getCanonicalName() + "." + name + "()");
    }
View Full Code Here

Examples of com.createsend.util.exceptions.NotFoundException

          case BAD_REQUEST:
              return new BadRequestException(apiResponse.Code, apiResponse.Message, apiResponse.ResultData);
          case INTERNAL_SERVER_ERROR:
              return new ServerErrorException(apiResponse.Code, apiResponse.Message);
          case NOT_FOUND:
              return new NotFoundException(apiResponse.Code, apiResponse.Message);
          case UNAUTHORIZED:
            if (apiResponse.Code == 121)
              return new ExpiredOAuthTokenException(apiResponse.Code, apiResponse.Message);
              return new UnauthorisedException(apiResponse.Code, apiResponse.Message);
          default:
View Full Code Here

Examples of com.dotcms.repackage.com.bradmcevoy.http.exceptions.NotFoundException

                case 401:
                    throw new NotAuthorizedException(href,null);
                case 403:
                    throw new NotAuthorizedException(href,null);
                case 404:
                    throw new NotFoundException(href);
                case 405:
                    throw new MethodNotAllowedException(result, href);
                case 409:
                    throw new ConflictException(href);
                default:
View Full Code Here

Examples of com.dottydingo.hyperion.exception.NotFoundException

    private EntityPlugin<C,?,ID> getEntityPlugin(String entity)
    {
        EntityPlugin<C,?,ID> plugin = serviceRegistry.getPluginForName(entity);
        if(plugin == null)
            throw new NotFoundException(String.format("%s is not a valid entity.",entity));

        return plugin;
    }
View Full Code Here

Examples of com.elibom.jogger.exception.NotFoundException

   * @param middlewares
   * @throws Exception
   */
  private void handle(final Request request, final Response response, final List<Middleware> middlewares) throws Exception {
    if (middlewares.isEmpty()) {
      throw new NotFoundException();
    }
   
    Middleware current = middlewares.remove(0);
    current.handle(request, response, new MiddlewareChain() {
      @Override
View Full Code Here

Examples of com.ericdaugherty.mail.server.errors.NotFoundException

            //Otherwise, just throw the NotFoundException to bounce the email.
            if( configurationManager.isDefaultUserEnabled() ) {
                EmailAddress defaultAddress = configurationManager.getDefaultUser();
                //If this throws a NotFoundException, go ahead and let it bounce.
                user = configurationManager.getUser( defaultAddress );
                if( user == null ) throw new NotFoundException();
                if( log.isDebugEnabled() ) { log.info( "Delivering message addressed to: " + address + " to default user: " + defaultAddress ); }
            }
            else {
                throw new NotFoundException( "User does not exist and no default delivery options found." );
            }
        }

        //The file to write to.
        File messageFile = 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.