From notifications-return-29698-archive-asf-public=cust-asf.ponee.io@ofbiz.apache.org Fri Jan 3 14:44:07 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id A0AAC180660 for ; Fri, 3 Jan 2020 15:44:06 +0100 (CET) Received: (qmail 59937 invoked by uid 500); 3 Jan 2020 14:44:06 -0000 Mailing-List: contact notifications-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list notifications@ofbiz.apache.org Received: (qmail 59927 invoked by uid 99); 3 Jan 2020 14:44:06 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2020 14:44:06 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EB139E318D for ; Fri, 3 Jan 2020 14:44:03 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 2BE5D7823A5 for ; Fri, 3 Jan 2020 14:44:01 +0000 (UTC) Date: Fri, 3 Jan 2020 14:44:01 +0000 (UTC) From: "Nicolas Malin (Jira)" To: notifications@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OFBIZ-11007) REST: adding segmented URI support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)