[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-04-12 Thread ASF subversion and git services (Jira)


[ 
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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-29 Thread Nicolas Malin (Jira)


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

Nicolas Malin commented on OFBIZ-11007:
---

Oups, forgot this one, sure :) I will close it

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-29 Thread Pawan Verma (Jira)


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

Pawan Verma commented on OFBIZ-11007:
-

Thanks [~nmalin]

Should we also close OFBIZ-11326?

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-29 Thread Nicolas Malin (Jira)


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

Nicolas Malin commented on OFBIZ-11007:
---

Hi [~pawan] , thanks for your alert, I corrected the paginate problem in the 
commit 
[1ee1ec7|https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=1ee1ec7]

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-29 Thread ASF subversion and git services (Jira)


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

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

Commit 11cf350302015d1210b9f663cb9c68339701a3f8 in ofbiz-framework's branch 
refs/heads/trunk from Nicolas Malin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=11cf350 ]

Improved: Change 'restMethod' by '_method' in request parameters
(OFBIZ-11332)

When we analyse a request method, we currently check the parameter "restMethod".
Mathieu Lirzin propose [1] to use "_method" instead to use a parameter name 
more generic

I create a new function UtilHttp.getRequestMethod() to centralize the request 
method resolution.

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


> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-29 Thread ASF subversion and git services (Jira)


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

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

Commit 1ee1ec76d6202f66cdff271fd4c313d5d2c132cc in ofbiz-framework's branch 
refs/heads/trunk from Nicolas Malin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=1ee1ec7 ]

Fixed: Change 'restMethod' by '_method' in request parameters
(OFBIZ-11007)

Some issue has been introduce on the previous commit 6e1c7b5 [1], corrected by 
this one :
  * the view link on ListGeneric failed
  * the paginate on ListGeneric failed

I also simplify the url writing with delegate the entity path generation and 
translation
to two function on EntityUtil : entityToPath and getPkValuesMapFromPath

thanks to Pawan Verma to spot the pagination problem

[1] https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=6e1c7b5


> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-25 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-11007:
-

Hi Pawan,

I too crossed this issue while working on OFBIZ-11306. I think I found a 
solution, which unfortunately is not enough for OFBIZ-11306. Please open a new 
Jira I'll try to handle it, thanks.

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-24 Thread Pawan Verma (Jira)


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

Pawan Verma commented on OFBIZ-11007:
-

After this change, entity find pagination(next, last, changes in the number of 
pages) stopped working. Getting following error:
{code:java}
// ERROR MESSAGEorg.apache.ofbiz.webapp.control.RequestHandlerException: 
Unknown request [entity]; this request does not exist or cannot be called 
directly.
{code}
Should I reopen this ticket? or report a new one?

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-13 Thread Nicolas Malin (Jira)


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

Nicolas Malin commented on OFBIZ-11007:
---

[~jleroux] Thanks to spot the checkstyle issue, I will commit a global 
correction on this file

[~mthl] ok I propose to change the variable restMethod to _method on other 
ticket

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-10 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-11007:
-

Thanks Mathieu,

That's enough for me, +1 for this "de facto standard"

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-10 Thread Mathieu Lirzin (Jira)


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

Mathieu Lirzin commented on OFBIZ-11007:


I did not dig much, I have first found 
https://stackoverflow.com/questions/8054165/using-put-method-in-html-form which 
gave me the impression that there was a consensus on this convention but that 
is not backed by statistics.

Regarding Java frameworks, Spring uses this convention too 
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/filter/reactive/HiddenHttpMethodFilter.html

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-10 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-11007:
-

HI Mathieu,

Is it only Laravel (PHP) or are there other Java frameworks?

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-10 Thread Mathieu Lirzin (Jira)


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

Mathieu Lirzin commented on OFBIZ-11007:


Hello Nicolas,

A bit late, but I have forgot to suggest the use of "_method" instead of 
"restMethod" for the hidden field containing the actual request method that 
should be effectively used in the controller. This naming convention is not 
specified in any standard  but seems [used in other web 
frameworks|https://laravel.com/docs/4.2/html#opening-a-form].

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-09 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-11007:
-

Hého Nicolas,

Small issue with checkstyleMain : 
https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1108/steps/shell_2/logs/stdio

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-09 Thread ASF subversion and git services (Jira)


[ 
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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2020-01-03 Thread Nicolas Malin (Jira)


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

Nicolas Malin commented on OFBIZ-11007:
---

Hello [~mthl],

Sure follows best practice given by the JAX-RS is better.

After a second analyze and crossed different vision with [~mleila] I propose to 
change nothing and keep your first approach on uri resolution.

We can use this pattern :
{code:java}
entity/[cover]/{entityName}/{pkValues: .*}{code}
Example :
{code:java}
entity/list
entity/find/Party -> search
entity/find/Party/Company -> displaying form
entity/create/Party -> creation form
entity/edit/Party/Company -> edit form
entity/change/Party/Company -> call crud 
entity/relations/Party {code}
I updated the patch [^OFBIZ-11007_refactor-entitymaint.patch] with this logic

> 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2019-12-29 Thread Mathieu Lirzin (Jira)


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

Mathieu Lirzin commented on OFBIZ-11007:


Hello [~nmalin],

The approach we followed with [~artemiy] was to intentionally not provide any 
guarantee on the request-map resolution algorithm in the context of 
ambiguities, meaning when multiple request-maps are matching the same HTTP 
request URI. Our assumption was that ambiguous routes should not be used to 
simplify reasoning/debugging. A limitation of the current implementation is 
that we currently don't detect/report those ambiguities, we simply choose one.

Our approach is debatable and for example the JAX-RS specification which serves 
as a standard for Java REST APIs [specifies a precedence order when matching 
URI|https://download.oracle.com/otn-pub/jcp/jaxrs-2_1-final-eval-spec/jaxrs-2_1-final-spec.pdf?AuthParam=1577630576_4b24b6231d72cf225332a21ec2aaf761#subsection.3.7.2].
 So I am not strongly opposed to specifying a resolution order in OFBiz as you 
proposed in [^OFBIZ-11007_refactor-entitymaint.patch], with the condition that 
it follows a standard and documented algorithm like for example the one from 
JAX-RS.

Regarding the particular case of entities, a simple way to avoid ambiguities in 
your example would be to use different separators like for example:
{code:java}
entity-list -> entitymaint
entity/{entityName} -> FindGeneric
entity/{entityName}/{pkValues: .*} -> ViewGeneric 
entity-edit/{entityName} -> edit form
entity-edit/{entityName}/{pkValues: .*} -> edit form
entity-relations/{entityName} -> ViewRelation
{code}
If you really want to use {{/}} while removing ambiguities you can use regular 
expression in URI templates to prevent {{entity/{entityName}}} to match 
{{/entity/list}} you should be able to replace it with something like 
{{entity/{name:(?!list).*}}} to prevent the match (not tested). However I don't 
recommend that solution because it requires understanding an advanced feature 
of Java regexp.

Thanks for working on that.

> 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, 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2019-12-27 Thread Nicolas Malin (Jira)


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

Nicolas Malin commented on OFBIZ-11007:
---

Hello [~mthl] ,

I reviewed the patch, resync with trunk, correct issues raise by Jacques and 
after an uncomfortable situation with the path naming I tried an other naming 
that I find it more intuitive:

 
{code:java}
entity/list -> entitymaint
entity/{entityName} -> FindGeneric
entity/{entityName}/{pkValues: .*} -> ViewGeneric 
entity/edit/{entityName} -> edit form
entity/edit/{entityName}/{pkValues: .*} -> edit form
entity/relations/{entityName} -> ViewRelation
{code}
This introduce a conflict for the resolution due to the parsing of request map 
entries didn't realize on the entry request-map ordered definition in 
controller.xml (so if you call *entity/list*, it's *entity/\{entityName}* that 
would be match), and  generate list of reserved word that dynamic element can't 
be use (entity would be never named *list*, *edit* or *relations*)

For the first, I change in function RequestHandler.resolveTemplateURI() the 
resolution order :
 *  check first by raw: entity/list match before any dynamic case
 *  order entries by the dynamic deep. The previous example would be parsing as 
follow  

{code:java}
entity/relations/{entityName}
entity/edit/{entityName}
entity/edit/{entityName}/{pkValues: .*}
entity/{entityName}
entity/{entityName}/{pkValues: .*} 

{code}
For the second I think it's not a problem but more on developper hands

The code changed on RequestHandler.resolveTemplateURI() it's just to experiment 
and exchange if my idea have some interesting element or smells like death :)
All has been put on [^OFBIZ-11007_refactor-entitymaint.patch]

 

> 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, 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2019-12-07 Thread Mathieu Lirzin (Jira)


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

Mathieu Lirzin commented on OFBIZ-11007:


[~nmalin] Can you take a look at  [^entitymaint_example.patch] to fix the issue 
reported by [~jleroux]? Feel free to assign the ticket to yourself If you want 
to do the work.

> 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: Mathieu Lirzin
>Priority: Minor
>  Labels: REST, URI
> Fix For: Upcoming Branch
>
> Attachments: 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2019-10-28 Thread Jacques Le Roux (Jira)


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

Jacques Le Roux commented on OFBIZ-11007:
-

Hi Mathieu,

I reviewed did not find any issues. I tested and found 2 small issues:
#  CommonCreateNew label no longer exists (for redundancy reason), use 
CommonCreate.
# If you delete a record, you can then modify it. In demo you get back to the 
edit screen with the previous parameters. With the patch you get something like 
"[entitymaint] cannot be called by [POST] method."

> 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: Mathieu Lirzin
>Priority: Minor
>  Labels: REST, URI
> Fix For: Upcoming Branch
>
> Attachments: 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2019-10-25 Thread Mathieu Lirzin (Jira)


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

Mathieu Lirzin commented on OFBIZ-11007:


Committed  [^restful_URIs.patch]  in revision 1868963.
I have provided  [^OFBIZ-11007_refactor-entitymaint.patch]  which is an updated 
version of  [^entitymaint_example.patch]. Can someone familiar with OFBiz 
screen incantations (Groovy/FTL/XML) take a look at it to check if the 
implementation is correct?

> 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: Mathieu Lirzin
>Priority: Minor
>  Labels: REST, URI
> Fix For: Upcoming Branch
>
> Attachments: 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}
> 
> ...
> 
> ...
> 
> ...
> {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)


[jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support

2019-05-06 Thread Jacques Le Roux (JIRA)


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

Jacques Le Roux commented on OFBIZ-11007:
-

Thanks Artemiy,

While reviewing, I just remembered this is a sequel of 
https://markmail.org/message/vylntnjxqigohejb. 

> REST: adding segmented URI support
> --
>
> Key: OFBIZ-11007
> URL: https://issues.apache.org/jira/browse/OFBIZ-11007
> Project: OFBiz
>  Issue Type: Improvement
>  Components: framework
>Affects Versions: Trunk
> Environment: 
>Reporter: Artemiy Rozovyk
>Priority: Minor
>  Labels: URI, rest_api
> Fix For: Upcoming Branch
>
> Attachments: 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}
> 
> ...
> 
> ...
> 
> ...
> {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
(v7.6.3#76005)