|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.baswell.routes.RouteByHttpMethodNameConvention
org.baswell.routes.RouteByLowercaseConvention
public class RouteByLowercaseConvention
Default convention used by Routes. Performs a lowercase operation on method names to create a single path segments.
For example
| Method Name | Route Path |
|---|---|
| get | / |
| getMyResource | /myresource |
| getPostMyResource | /myresource |
| getPostDeleteAnotherThingHere | /anotherthinghere |
The same convention is used for generating the root path from the class name.
| Class Name | Route Root Path |
|---|---|
| ApiRoutes | /api |
| UserProfileController | /userprofile |
RoutesConfiguration.routeByConvention| Constructor Summary | |
|---|---|
RouteByLowercaseConvention()
|
|
| Method Summary | |
|---|---|
java.lang.String |
routePath(java.lang.reflect.Method routeMethod)
The generated route path from a route method with no Route.value(). |
java.lang.String |
routesPathPrefix(java.lang.Class routesClass)
The generated root path of a routes class when Routes.value() is not specified. |
| Methods inherited from class org.baswell.routes.RouteByHttpMethodNameConvention |
|---|
removeHttpMethodsFromName, removeRoutesControllerHandlerFromName, respondsToMethods |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RouteByLowercaseConvention()
| Method Detail |
|---|
public java.lang.String routesPathPrefix(java.lang.Class routesClass)
RouteByConventionRoutes.value() is not specified. This root
path will only be prepended to route method paths without Route.value().
routesClass - The routes class.
public java.lang.String routePath(java.lang.reflect.Method routeMethod)
RouteByConventionRoute.value(). The path returned
here will be appended to RouteByConvention.routesPathPrefix(Class).
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||