ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support
Date Sun, 12 Apr 2020 11:18:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-11007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17081752#comment-17081752
] 

ASF subversion and git services commented on OFBIZ-11007:
---------------------------------------------------------

Commit e4871226249b7c5dcb51931b81bf5cdb79d7810f in ofbiz-framework's branch refs/heads/trunk
from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=e487122 ]

Fixed: "entity/list" request is not handled well

(OFBIZ-11593)

The "entity/list" request has been put in with OFBIZ-11007. It's used to call
the entitymaint view and so is a demo/didactic duplicate of entitymaint request.
It's only used in FindGeneric screen (look for WebtoolsBackToEntityList label).
It's problematic because since the CSRF token defense was put in you can no
longer filter the entities from the entities list screen, even when the default
NoCsrfDefenseStrategy is used. It works if you use the entitymaint request
instead.

Anyway, 2020-01-19 I proposed in OFBIZ-11306 a solution for such cases.
It was not used because 2020-02-14 I thought it was no longer needed,
but it's necessary for this case, and maybe others not already detected.

Here it's implementation (only trunk)


> 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)

Mime
View raw message