Hi Chetan

Yes... I am not too enthusiastic about changing the default implementation
and have it behave differently on let's say Oak 1.5.7 and previous versions
of Oak and Jackrabbit... that's IMHO breaking backwards compatibility of
an API that is potentially widely used and as such asking for nasty bugs.

We cannot expect that usage nt:resource and thus having a referenceable
node was always an (undesirable) side effect. There might be applications
that used the putFile method _because_ it created nt:resource and which
are relying on the jcr:content node to be referenceable.

So, I am fine either a variant of the simple putFile or the explicit way
as you proposed it... we may even end up with both... i don't have a strong
preference here. 

But changing putFile such as proposed by Justin is IMO not an option.

Kind regards
Angela



On 18/07/16 11:04, "Chetan Mehrotra" <[email protected]> wrote:

>Thanks for the feedback. Opened OAK-4567 to track the change
>
>
>On Mon, Jul 18, 2016 at 12:14 PM, Angela Schreiber <[email protected]>
>wrote:
>> Additionally or alternatively we could create a separate method (e.g.
>> putOakFile
>> or putOakResource or something explicitly mentioning the
>>non-referenceable
>> nature of the content) that uses 'oak:Resource' and state that it
>>requires
>> the
>> node type to be registered and will fail otherwise... that would be as
>>easy
>> to use as 'putFile', which is IMO important.
>
>@Angela - What about Justin's suggestion later around changing the
>current putFile implementation. Have it use oak:Resource is present
>otherwise fallback to nt:resource. This can lead to compatibility
>issue though as javadoc of putFile says it would use nt:resource
>
>Chetan Mehrotra

Reply via email to