|
[ https://issues.apache.org/jira/browse/OFBIZ-11007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17012038#comment-17012038 ] ASF subversion and git services commented on OFBIZ-11007: --------------------------------------------------------- Commit 6e1c7b5958cc1a80be5746bfd177136a1feabe0d in ofbiz-framework's branch refs/heads/trunk from Nicolas Malin [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=6e1c7b5 ] Implemented: REST, adding segmented URI support for webtools/entitymaint (OFBIZ-11007) After implemeted Rest mechanism on rev. 1868963 by Mathieu Lirzin, I reviewed the rest url implemented by Artemiy Rozovyk for entitymaint in webtools. With discussion with Mathieu and Leila, I selected this pattern : entity/[cover]/{entityName}/{pkValues: .*} and implemented like this : entity/list -> list all entities entity/find/Party -> search entity/find/Party/Company -> displaying form for Party with id Company entity/create/Party -> creation form for a Party entity/edit/Party/Company/Company -> edit form for Party with id Company entity/change/Party/Company -> call crud following given http method entity/relations/Party -> View relation for Party The old uris were currently kept and the oldest GenericWebEvent.updateGeneric() were updated to support rest method information. Thanks Mathieu, Artemiy and Leila for their help to complete this improvement. > REST: adding segmented URI support > ---------------------------------- > > Key: OFBIZ-11007 > URL: https://issues.apache.org/jira/browse/OFBIZ-11007 > Project: OFBiz > Issue Type: New Feature > Components: framework > Affects Versions: Trunk > Environment: > Reporter: Artemiy Rozovyk > Assignee: Nicolas Malin > Priority: Minor > Labels: REST, URI > Fix For: Upcoming Branch > > Attachments: OFBIZ-11007_refactor-entitymaint.patch, OFBIZ-11007_refactor-entitymaint.patch, OFBIZ-11007_refactor-entitymaint.patch, entitymaint_example.patch, restful_URIs.patch > > > Following the discussion on making OFBiz RESTful OFBIZ-4274 i implemented the support of segmented URIs without interfering with current mechanisms of URI resolution nor with _overrideView()_ feature. > Combined with work on associating URIs and HTTP methods done by [~mthl] in OFBIZ-10438 , we are now able to provide RESTful APIs as follows: > {code:java} > <request-map uri="foo/bar" method="get"> > ... > <request-map uri="foo/bar/{baz}" method="get"> > ... > <request-map uri="foo/bar/{baz}" method="post"> > ... > {code} > After we matched a request-map having parametrized URI as in > {code:java} > uri="foo/bar/{baz}" > {code} > the value is available inside the request attributes with the corresponding key (here _"baz"_) > The *restful_URIs.patch* allows segmented URI support. > The *entitymaint_example.patch* is a modified _entitymaint_ part that serves as an example of possible application of new system. > Any questions or comments are welcomed. -- This message was sent by Atlassian Jira (v8.3.4#803005) |
| Free forum by Nabble | Edit this page |
