data versioning with the Server side Java embedding API

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

data versioning with the Server side Java embedding API

jteh
Hi,
I am using the Java embedded forms API to embed forms into a Java web application on the server side. This interacts with a crud REST api on top of the MarkLogic persistence layer.

In our persistence layer, we have implemented data versioning by having the version in the urls of our data documents e.g. for data document with uid 12345 with 3 versions, we have the uris:

/orbeon/erdf/procurement-register/data/12345/data.xml
/orbeon/erdf/procurement-register/data/12345/1/data.xml
/orbeon/erdf/procurement-register/data/12345/2/data.xml

Note the version number after the uid.

Is there any kind of support for data versioning in the Java embedding API? I can't seem to find anything in the documentation.

If not, is there any way to pass a custom parameter to the crud REST api on top of our persistence layer? In the Java embedding API call

API.embedFormJava(
            request,    
            out,      
            app,
            form,
            action,
            doc,
            queryString,      
            headers)

I see 2 optional parameters - query string and headers. Passing values into either of these does not seem to result in them arriving at the REST api. Is there any way to pass custom parameters to the REST api? I was hoping to pass version information in the request so I could retrieve the data version I require.

Thankyou.


Reply | Threaded
Open this post in threaded view
|

Re: data versioning with the Server side Java embedding API

Erik Bruchez
Administrator
> Is there any kind of support for data versioning in the Java embedding API?

There is no support at all for data versioning in Orbeon Forms, if you except that the relational persistence layer keeps version for auditing purposes.

Versioning is only for form form definitions, and the data is associated with a particular form definition.

Do you mean that you have data versioning independently from form definition versioning? That is, that if you save data multiple times, you get multiple versions of the data?

Just trying to understand so we can make a reasonable recommendation.

-Erik