Package juzu

Examples of juzu.Response$Error$Forbidden


    return Stage.Unmarshalling.class;
  }

  @Override
  public Response handle(Stage.Unmarshalling argument) {
    Response result = argument.invoke();
    Request request = argument.getRequest();
    if (request.getPhase() == Phase.VIEW) {
      if (result instanceof Response.Content) {
        final Collection<Chunk.Property<String>> bar = foo(request.getHandler().getMethod(), Collections.<Chunk.Property<String>>emptyList());
        Response.Status status = (Response.Status)result;
View Full Code Here


          return new Response.Error(e);
        }
      }

      //
      Response response = context.getResponse();
      if (response == null) {
        Stage.Invoke invokeStage = new Invoke(request, context, controller, args);
        response = invokeStage.invoke();
        context.setResponse(response);
View Full Code Here

          // We should check that it matches....
          // btw we should try to enforce matching during compilation phase
          // @Action -> Response.Action
          // @View -> Response.Mime
          // as we can do it
          Response resp = (Response)ret;
          if (mimeType != null) {
            resp = resp.with(PropertyType.MIME_TYPE, mimeType.value()[0]);
          }
          return resp;
        } else if (ret != null && mimeType != null) {
          for (EntityMarshaller writer : Tools.loadService(EntityMarshaller.class, request.controllerPlugin.getApplication().getClassLoader())) {
            for (String s : mimeType.value()) {
View Full Code Here

      ClassLoader classLoader = application.getClassLoader();
      Thread.currentThread().setContextClassLoader(classLoader);
      bridge.begin(request);

      //
      Response result = request.invoke();

      //
      if (result instanceof Response.Error && descriptor.getErrorController() != null) {
        Class<? extends juzu.Handler<Response.Error, Response>> a = descriptor.getErrorController();
        Method m;
View Full Code Here

  }

  @Override
  public Response handle(Stage.Handler argument) {
    Request request = argument.getRequest();
    Response result = argument.invoke();
    if (result instanceof Response.Error) {
      result = Response.ok("pass");
    }
    return result;
  }
View Full Code Here

  }

  @Override
  public Response handle(Stage.Handler argument) {
    Request request = argument.getRequest();
    Response result = argument.invoke();
    if (result instanceof Response.Error) {
      result = Response.ok("pass");
    }
    return result;
  }
View Full Code Here

  @Override
  public Response handle(Stage.Handler argument) {
    Request request = argument.getRequest();
    Registry.compareAndSet("request.filter.lifecycle", "created", "before");
    Response result = argument.invoke();
    Registry.compareAndSet("request.filter.lifecycle", "before", "after");
    return result;
  }
View Full Code Here

                errorId = (String) entry.getValue();
                errorCode = (String) entry.getValue();
              }
            }

                                                Error err = this._errors.get(errorCode);
                                                if (err == null){
                                                    err = Bpmn2Factory.eINSTANCE.createError();
                                                    err.setId(errorId);
                                                    err.setErrorCode(errorCode);
                                                    this._errors.put(errorCode, err);
                                                }
                                               
            toAddErrors.add(err);
            ((ErrorEventDefinition) ed).setErrorRef(err);
View Full Code Here

                                errorId = (String) entry.getValue();
                                errorCode = (String) entry.getValue();
                            }
                        }

                        Error err = this._errors.get(errorCode);
                        if (err == null){
                            err = Bpmn2Factory.eINSTANCE.createError();
                            err.setId(errorId);
                            err.setErrorCode(errorCode);
                            this._errors.put(errorCode, err);
                        }

                        toAddErrors.add(err);
                        ((ErrorEventDefinition) ed).setErrorRef(err);
View Full Code Here

                                                errorId = (String) entry.getValue();
                                                errorCode = (String) entry.getValue();
                                        }
                                }

                                Error err = this._errors.get(errorCode);
                                if (err == null){
                                    err = Bpmn2Factory.eINSTANCE.createError();
                                    err.setId(errorId);
                                    err.setErrorCode(errorCode);
                                    this._errors.put(errorCode, err);
                                }

                                toAddErrors.add(err);
                                ((ErrorEventDefinition) ed).setErrorRef(err);
View Full Code Here

TOP

Related Classes of juzu.Response$Error$Forbidden

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.