- Currently, we are handling with complexity condition(See more detail in https://github.com/exodev/ks/blob/master/eXoApplication/forum/webapp/src/main/java/org/exoplatform/forum/webui/UIForumPortlet.java#calculateRenderComponent method), so totally difficult to maintainance if you have any change with forum's URI.
No | URI path | Comment |
1 | {selectNode}/ForumService | Accesses to Forum home page |
2 | {selectNode}/SearchForum | Render for Advanced Search UI form |
3 | {selectNode}/Tag | Handles for rendering list topics in the Tag |
4 | {selectNode}/topic/topic{random id} | Handles for rendering to show with topicID |
5 | {selectNode}/topic/topic{random id}/true | Handles for rendering to reply this topic |
6 | {selectNode}/topic/topic{random id}/false | Handles for rendering to qoute this topic |
7 | {selectNode}/topic/topic{random id}/post{ramdom id} | Handles for rendering to show postID which belong to given topicID |
8 | {selectNode}/topic/topic{ramdom id}/{number} | Handles for rendering to go to page of topicID |
9 | {selectNode}/forum/forum{random id} | Handles for rendering forum container |
10 | {selectNode}/forum/forum{random id}/{number} | Handles for rendering forum container and goto page number |
11 | {selectNode}/category/forumCategory{random id} | Handles for rendering category UI Form |
- This component which uses to improve the way to parse URI's path in eXo Forum, it also made more easier to handle and manage forum's URI and then map to forum's handler.
Use this command to build project:
mvn clean install
By default, it will run only unit tests.
Sample code:
-
Router configuration
//{selectedNode}/ForumService ExoRouter.prependRoute("/{pageID}/ForumService", "forum.home"); //{selectedNode}/SearchForum ExoRouter.addRoute("/{pageID}/SearchForum", "forum.search"); //{selectedNode}Tag ExoRouter.addRoute("/{pageID}/Tag", "forum.tag"); //{selectedNode}/topic/{topicId} ExoRouter.addRoute("/{pageID}/topic/{topicID}", "forum.topic.show"); //{selectedNode}/topic/topic{topicId}/true ExoRouter.addRoute("/{pageID}/topic/{topicID}/reply", "forum.topic.reply"); //{selectedNode}/topic/{topicId}/false ExoRouter.addRoute("/{pageID}/topic/{topicID}/quote", "forum.topic.quote"); //{selectedNode}/topic/{topicID}/{postID} ExoRouter.addRoute("/{pageID}/topic/{topicID}/post/{postID}", "forum.topic.post.show"); //{selectedNode}/topic/topic{topicID}/ ExoRouter.addRoute("/{pageID}/topic/{topicID}/page/{pageNo}", "forum.topic.page"); //{selectedNode}/forum/forum{forumID} ExoRouter.addRoute("/{pageID}/forum/{forumID}", "forum.show"); //{selectNode}/forum/{forumID}/{number} ExoRouter.addRoute("/{pageID}/forum/{forumID}/page/{pageNo}", "forum.show.page");
-
Gets Route from path like that:
forum's path= "/12345/ForumService");" Route route = ExoRouter.route("/12345/ForumService"); route.action is "forum.home" pageID is "12345"
Base on these got data, it's easier to map with forum's handler.