You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Michael Dürig <md...@apache.org> on 2011/12/09 15:13:18 UTC
[j3 Microkernel] commit method
Hi,
Currently the commit method look like this:
String commit(String path, String jsonDiff, String revisionId, String
message)
The path argument has to be an absolute path and the paths of the
jsonDiff operations are relative paths. The target path of the
operations are determined by concatenating the path with the paths of
the jsonDiff operations.
To facilitate the usage of this API where only absolute paths are
involved, I suggest to expand the scope of the commit method such that
the empty string (or null?) is allowed for the path argument. In this
case all jsonDiff operations need to specify an absolute path.
Michael
Re: [j3 Microkernel] commit method
Posted by Michael Dürig <md...@apache.org>.
On 14.12.11 14:55, Stefan Guggisberg wrote:
>>> Currently the commit method look like this:
>>>
>>> String commit(String path, String jsonDiff, String revisionId, String
>>> message)
>>>
>>> The path argument has to be an absolute path and the paths of the jsonDiff
>>> operations are relative paths. The target path of the operations are
>>> determined by concatenating the path with the paths of the jsonDiff
>>> operations.
>>>
>>> To facilitate the usage of this API where only absolute paths are involved,
>>> I suggest to expand the scope of the commit method such that the empty
>>> string (or null?) is allowed for the path argument. In this case all
>>> jsonDiff operations need to specify an absolute path.
>>
>> sounds reasonable. probably easy to support, i'll check the current
>> implementation.
>
> implemented in svn r1214161.
Thanks! I'll try it out and let you know.
Michael
Re: [j3 Microkernel] commit method
Posted by Thomas Mueller <mu...@adobe.com>.
Hi,
>>sounds reasonable. probably easy to support, i'll check the current
>> implementation.
>
>implemented in svn r1214161.
Actually, I would prefer if you also implement at least one test case.
> Modified:
>
>jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Micr
>oKernelImpl.java
>
>jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/api/
>MicroKernel.java
>
>jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json
>/JsopTokenizer.java
>
>jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util
>/PathUtils.java
Implementing features without any test case is bad practice in my view.
Specially if it's changes in the API and changes in others peoples code.
Regards,
Thomas
Re: [j3 Microkernel] commit method
Posted by Stefan Guggisberg <st...@gmail.com>.
On Mon, Dec 12, 2011 at 10:36 AM, Stefan Guggisberg
<st...@gmail.com> wrote:
> On Fri, Dec 9, 2011 at 3:13 PM, Michael Dürig <md...@apache.org> wrote:
>>
>> Hi,
>>
>> Currently the commit method look like this:
>>
>> String commit(String path, String jsonDiff, String revisionId, String
>> message)
>>
>> The path argument has to be an absolute path and the paths of the jsonDiff
>> operations are relative paths. The target path of the operations are
>> determined by concatenating the path with the paths of the jsonDiff
>> operations.
>>
>> To facilitate the usage of this API where only absolute paths are involved,
>> I suggest to expand the scope of the commit method such that the empty
>> string (or null?) is allowed for the path argument. In this case all
>> jsonDiff operations need to specify an absolute path.
>
> sounds reasonable. probably easy to support, i'll check the current
> implementation.
implemented in svn r1214161.
cheers
stefan
>
> cheers
> stefan
>
>>
>> Michael
Re: [j3 Microkernel] commit method
Posted by Stefan Guggisberg <st...@gmail.com>.
On Fri, Dec 9, 2011 at 3:13 PM, Michael Dürig <md...@apache.org> wrote:
>
> Hi,
>
> Currently the commit method look like this:
>
> String commit(String path, String jsonDiff, String revisionId, String
> message)
>
> The path argument has to be an absolute path and the paths of the jsonDiff
> operations are relative paths. The target path of the operations are
> determined by concatenating the path with the paths of the jsonDiff
> operations.
>
> To facilitate the usage of this API where only absolute paths are involved,
> I suggest to expand the scope of the commit method such that the empty
> string (or null?) is allowed for the path argument. In this case all
> jsonDiff operations need to specify an absolute path.
sounds reasonable. probably easy to support, i'll check the current
implementation.
cheers
stefan
>
> Michael