Package org.springframework.web.method

Examples of org.springframework.web.method.HandlerMethod


    DynamicSpecifications.putRequest(request);
    if (!(handler instanceof HandlerMethod)) {
      return true;
    }
   
    final HandlerMethod handlerMethod = (HandlerMethod)handler;
    Method method = handlerMethod.getMethod();
   
    final RequiresPermissions rps = method.getAnnotation(RequiresPermissions.class);
    if (rps == null) {
      return true;
    }
View Full Code Here


          }
          this.forwardPath = "forward:" + path;
        }
      }
      else {
        this.handlerMethod = new HandlerMethod(beanName, context, method)
            .createWithResolvedBean();
      }
    }

    switch (type) {
View Full Code Here

      return methodInfo.getForwardPath();
    } else if (methodInfo != null && methodInfo.getHandlerMethod() != null) {
      streamResponse = configurationService.getConfiguration().isStreamResponse()
          || methodInfo.isStreamResponse();

      HandlerMethod handlerMethod = methodInfo.getHandlerMethod();
      try {

        ModelAndView modelAndView;

        if (configurationService.getConfiguration().isSynchronizeOnSession()
View Full Code Here

    assertValue("Handler", "Type", Object.class.getName());
  }

  @Test
  public void testPrintHandlerMethod() throws Exception {
    HandlerMethod handlerMethod = new HandlerMethod(this, "handle");
    this.mvcResult.setHandler(handlerMethod);
    this.handler.handle(mvcResult);

    assertValue("Handler", "Type", this.getClass().getName());
    assertValue("Handler", "Method", handlerMethod);
View Full Code Here

  }

  @Test
  public void shouldGetControllerIfHandlerMethod() throws Exception {
    Object controller = mock(Object.class, "controller");
    HandlerMethod handlerMethod = mock(HandlerMethod.class, "handler");
    this.springFacesContext = new DefaultSpringFacesContext(this.lifecycleAccessor, this.webApplicationContext,
        this.request, this.response, handlerMethod);
    given(handlerMethod.createWithResolvedBean()).willReturn(handlerMethod);
    given(handlerMethod.getBean()).willReturn(controller);
    assertThat(this.springFacesContext.getController(), is(sameInstance(controller)));
  }
View Full Code Here

     */
    @Override
    protected Object getHandlerInternal(HttpServletRequest request)
            throws Exception {

        HandlerMethod handler;
       
        // reload routes files if configured in servlet-context
        if(this.autoReloadEnabled) {
            this.reloadRoutesConfiguration();
        }
View Full Code Here

     * @return HandlerMethod to be used by the RequestAdapter
     * @throws ActionNotFoundException
     */
    public HandlerMethod resolveHandler(Router.Route route, String fullAction, HTTPRequestAdapter req) throws ActionNotFoundException {

        HandlerMethod handlerMethod;
       
        // check if the Handler is already cached
        if(this.cachedHandlers.containsKey(fullAction)) {
            handlerMethod = this.cachedHandlers.get(fullAction);
        } else {
View Full Code Here

            path = path.substring(1, path.length());
          }
          this.forwardPath = "forward:" + path;
        }
      } else {
        this.handlerMethod = new HandlerMethod(beanName, context, method).createWithResolvedBean();
      }
    }

    switch (type) {
    case SIMPLE:
View Full Code Here

      return methodInfo.getForwardPath();
    } else if (methodInfo != null && methodInfo.getHandlerMethod() != null) {
      streamResponse = configurationService.getConfiguration().isStreamResponse()
          || methodInfo.isStreamResponse();

      HandlerMethod handlerMethod = methodInfo.getHandlerMethod();
      try {

        ModelAndView modelAndView = null;

        if (configurationService.getConfiguration().isSynchronizeOnSession()
View Full Code Here

      return methodInfo.getForwardPath();
    } else if (methodInfo != null && methodInfo.getHandlerMethod() != null) {
      streamResponse = configurationService.getConfiguration().isStreamResponse()
          || methodInfo.isStreamResponse();

      HandlerMethod handlerMethod = methodInfo.getHandlerMethod();
      try {

        ModelAndView modelAndView = null;

        if (configurationService.getConfiguration().isSynchronizeOnSession()
View Full Code Here

TOP

Related Classes of org.springframework.web.method.HandlerMethod

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.