Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-11007

REST: adding segmented URI support

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Branch
    • Component/s: framework
    • Labels:
    • Flags:
      Patch

      Description

      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 Mathieu Lirzin in OFBIZ-10438 , we are now able to provide RESTful APIs as follows:

      <request-map uri="foo/bar" method="get">
      ...
      <request-map uri="foo/bar/{baz}" method="get">
      ...
      <request-map uri="foo/bar/{baz}" method="post">
      ...
      

      After we matched a request-map having parametrized URI as in

      uri="foo/bar/{baz}"
      

      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.

        Attachments

        1. restful_URIs.patch
          10 kB
          Artemiy Rozovyk
        2. entitymaint_example.patch
          19 kB
          Artemiy Rozovyk

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                artemiy Artemiy Rozovyk
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: