Package play.mvc.Router

Examples of play.mvc.Router.Route


      this.lastApplicationClassloaderState = Play.classloader.currentState;
    }

    // copy fixed routes from the old route
    for (Iterator<Route> iterator = oldRoutes.iterator(); iterator.hasNext();) {
      Route r = iterator.next();
      if (r.routesFileLine != RouterMethod.AUTO_ROUTE_LINE) {
        newRoutes.add(r);
      }
    }
    Router.routes = newRoutes;
View Full Code Here


    if (httpMethodAnnotations.size() == 0) {
      if (autoRouting) {
        // automatically added a special post for POST
        // no params on path
        if (paramNames.length() > 0) {
          Route r = new Route();
          r.method = "POST";
          r.path = pathSpec; // no params, no post-fix.
          r.action = act;
          r.routesFile = "_autopath";
          r.routesFileLine = AUTO_ROUTE_LINE;
          r.compute();
          routes.add(r);
        }
        // the catch other
        Route r = new Route();
        r.method = "*";
        r.path = pathSpec + paramNames + pathEnding;
        r.action = act;
        r.routesFile = "_autopath";
        r.routesFileLine = AUTO_ROUTE_LINE;
        r.compute();
        routes.add(r);
      } else {
        Route r = new Route();
        r.method = "*";
        r.path = pathSpec;
        r.action = act;
        r.routesFile = "_autopath";
        r.routesFileLine = AUTO_ROUTE_LINE;
        r.compute();
        routes.add(r);
      }
    } else {
      for (Annotation an : httpMethodAnnotations) {
        Route r = new Route();
        r.method = an.annotationType().getSimpleName();
        r.action = act;
        r.routesFile = "_autopath";
        r.routesFileLine = AUTO_ROUTE_LINE;
        if (!autoRouting || an instanceof POST) {
          r.path = pathSpec;
        } else {
          r.path = pathSpec + paramNames + pathEnding;
        }
        r.compute();
        routes.add(r);
      }
    }

    pathSpecPattern = Pattern.compile(pathSpec.replaceAll(RouterClass.urlParamCapture, "\\\\{(.*)\\\\}"));
 
View Full Code Here

        }

        // Route and resolve format if not already done
        if (request.action == null) {
            Play.pluginCollection.routeRequest(request);
            Route route = Router.route(request);
            Play.pluginCollection.onRequestRouting(route);
        }
        request.resolveFormat();

        // Find the action method
View Full Code Here

        }

        // Route and resolve format if not already done
        if (request.action == null) {
            Play.pluginCollection.routeRequest(request);
            Route route = Router.route(request);
            Play.pluginCollection.onRequestRouting(route);
        }
        request.resolveFormat();

        // Find the action method
View Full Code Here

        }

        // Route and resolve format if not already done
        if (request.action == null) {
            Play.pluginCollection.routeRequest(request);
            Route route = Router.route(request);
            Play.pluginCollection.onRequestRouting(route);
        }
        request.resolveFormat();

        // Find the action method
View Full Code Here

TOP

Related Classes of play.mvc.Router.Route

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.