Class ExoRouter
java.lang.Object
org.exoplatform.social.common.router.ExoRouter
- All Implemented Interfaces:
org.picocontainer.Startable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classRoute class which contains path, action and argument list. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd new route which loaded from route configuration file.static voidAdd new route which loaded from route configuration file.voidaddRoutes(ExoRouterConfig routerConfig) static voidappendRoute(String path, String action, String params) static ExoRouter.Routestatic ExoRouter.Routestatic ExoRouter.Routestatic voidprependRoute(String path, String action) Add a new route at the beginning of the route liststatic voidprependRoute(String path, String action, String params) Add a new route at the beginning of the route liststatic voidreset()static ExoRouter.ActionBuilderGenerates ActionBuilder base on the action name and arguments list.static ExoRouter.Routevoidstart()voidstop()
-
Field Details
-
routes
All the loaded routes.
-
-
Constructor Details
-
ExoRouter
public ExoRouter()
-
-
Method Details
-
reset
public static void reset() -
addRoutes
-
addRoute
Add new route which loaded from route configuration file.- Parameters:
path- /{pageID}/ForumServiceaction- the action which appends to patch after "ForumService" string.
-
addRoute
Add new route which loaded from route configuration file.- Parameters:
path- /{pageID}/ForumServiceaction- /{pageID}/ForumServiceparams- the action which appends to patch after "ForumService" string ex: /{pageID}/{ForumService|}/{action} =>/{pageID}/ForumService/{}
-
appendRoute
-
getRoute
-
getRoute
-
getRoute
public static ExoRouter.Route getRoute(String path, String action, String params, String sourceFile, int line) -
prependRoute
Add a new route at the beginning of the route list -
prependRoute
Add a new route at the beginning of the route list -
route
-
reverse
Generates ActionBuilder base on the action name and arguments list. Example: invokesreverse("show.topic", new HashMap<String, Object>{topicId, "topicId321"})method.- Parameters:
action-args-- Returns:
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-