You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Carlo Sciolla <ca...@gmail.com> on 2013/08/21 13:15:43 UTC
Copying a document with the AtomPub binding
Hi chemists,
the AtomPub binding doesn't expose createDocumentFromSource, and the
current Chemistry client implementation throws an
exception<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L145>when
issuing document.copy() or session. createDocumentFromSource().
Is there any advised method to copy a document in a generic and reusable
way that will work regardless of the binding? And if not, what's the most
appropriate way for AtomPub?
Thanks,
c.
--
Carlo Sciolla
--==(A)==--
Linux User #372086
My personal blog: http://www.skuro.tk
Follow me on twitter: http://twitter.com/skuro
<http://twitter.com/skuro>Fork me on Github: http://github.com/skuro
<http://github.com/skuro>My LinkedIn profile:
http://nl.linkedin.com/in/carlosciolla
--==(A)==--
Product Lead at Backbase - Next Generation Portal Software for Financials &
Large Enterprises (http://www.backbase.com)
Re: Copying a document with the AtomPub binding
Posted by Carlo Sciolla <ca...@gmail.com>.
2013/8/21 Florian Müller <fm...@apache.org>
> I've opened an issue [1] for the Apache infrastructure team
thanks,
c.
--
Carlo Sciolla
--==(A)==--
Linux User #372086
My personal blog: http://www.skuro.tk
Follow me on twitter: http://twitter.com/skuro
<http://twitter.com/skuro>Fork me on Github: http://github.com/skuro
<http://github.com/skuro>My LinkedIn profile:
http://nl.linkedin.com/in/carlosciolla
--==(A)==--
Product Lead at Backbase - Next Generation Portal Software for Financials &
Large Enterprises (http://www.backbase.com)
Re: Copying a document with the AtomPub binding
Posted by Florian Müller <fm...@apache.org>.
Hi Carlo,
I've opened an issue [1] for the Apache infrastructure team to look
after the GitHub mirrors.
- Florian
[1] https://issues.apache.org/jira/browse/INFRA-6682
> Hi Florian,
>
> thanks, I can also port that code in my 0.6.0 based application until
> we
> can upgrade.
> By the way, is the staleness of the GitHub repo to be fixed anytime
> soon?
> Did Apache as a whole stop syncing its svn?
>
> c.
>
>
> 2013/8/21 Florian Müller <fm...@apache.org>
>
>> Hi Carlo,
>>
>> The GitHub mirror is outdated. Check the Apache SVN for the latest
>> code:
>>
>> http://svn.apache.org/viewvc/**chemistry/opencmis/trunk/**
>> chemistry-opencmis-client/**chemistry-opencmis-client-**
>> impl/src/main/java/org/apache/**chemistry/opencmis/client/**
>>
>> runtime/DocumentImpl.java?**view=markup#l127<http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java?view=markup#l127>
>>
>>
>> - Florian
>>
>>
>> Hi Florian,
>>>
>>> I'm currently still on 0.6.0, but looking at the current code it
>>> seems
>>> that the same flows exists in the latest trunk:
>>>
>>> DocumentImpl.copy() [1] -> SessionImpl.**createDocumentFromSource()
>>> [2]
>>> -> ObjectServiceImpl.**createDocumentFromSource() [3] -> new
>>>
>>> CmisNotSupportedException("**createDocumentFromSource is not
>>> supported
>>> by the AtomPub binding!")
>>>
>>> Am I missing something?
>>>
>>> c.
>>>
>>> 2013/8/21 Florian Müller
>>> Hi Carlo,
>>>
>>> Document.copy() should also work with the AtomPub binding. If it
>>> doesn't, we have to investigate.
>>> If createDocumentFromSource is not support either by the binding
>>> or
>>> the server, Document.copy() creates a new document and streams the
>>> content from the source document to the new document via the
>>> client.
>>> That is, the content is transmitted twice (to and from the client)
>>> over the wire. It's not great, but it's the best solution we could
>>> come up with.
>>>
>>> Florian
>>>
>>> Hi chemists,
>>>
>>> the AtomPub binding doesn't expose createDocumentFromSource, and
>>> the
>>> current Chemistry client implementation throws an
>>>
>>> exceptionwhen
>>>
>>>
>>> issuing document.copy() or session. createDocumentFromSource().
>>>
>>> Is there any advised method to copy a document in a generic and
>>> reusable
>>> way that will work regardless of the binding? And if not, what's
>>> the
>>> most
>>> appropriate way for AtomPub?
>>>
>>> Thanks,
>>> c.
>>>
>>> --
>>> Carlo Sciolla
>>>
>>> --==(A)==--
>>> Linux User #372086
>>> My personal blog: http://www.skuro.tk [6]
>>> Follow me on twitter: http://twitter.com/skuro [7]
>>> [8]Fork me on Github:
>>> http://github.com/**skuro<http://github.com/skuro>[9]
>>> [10]My LinkedIn profile:
>>> http://nl.linkedin.com/in/**carlosciolla<http://nl.linkedin.com/in/carlosciolla>[11]
>>>
>>> --==(A)==--
>>>
>>> Product Lead at Backbase - Next Generation Portal Software for
>>> Financials & Large Enterprises
>>> (http://www.**backbase.com<http://www.backbase.com>[12])
>>>
>>>
>>> Links:
>>> ------
>>> [1]
>>>
>>> https://github.com/apache/**chemistry-opencmis/blob/**
>>> android/chemistry-opencmis-**client/chemistry-opencmis-**
>>> client-impl/src/main/java/org/**apache/chemistry/opencmis/**
>>>
>>> client/runtime/DocumentImpl.**java#L131<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java#L131>
>>> [2]
>>>
>>> https://github.com/apache/**chemistry-opencmis/blob/**
>>> android/chemistry-opencmis-**client/chemistry-opencmis-**
>>> client-impl/src/main/java/org/**apache/chemistry/opencmis/**
>>>
>>> client/runtime/SessionImpl.**java#L729<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java#L729>
>>> [3]
>>>
>>> https://github.com/apache/**chemistry-opencmis/blob/**
>>> android/chemistry-opencmis-**client/chemistry-opencmis-**
>>> client-bindings/src/main/java/**org/apache/chemistry/opencmis/**
>>>
>>> client/bindings/spi/atompub/**ObjectServiceImpl.java#L142<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L142>
>>> [4] mailto:fmui@apache.org
>>> [5]
>>>
>>> https://github.com/apache/**chemistry-opencmis/blob/**
>>> android/chemistry-opencmis-**client/chemistry-opencmis-**
>>> client-bindings/src/main/java/**org/apache/chemistry/opencmis/**
>>>
>>> client/bindings/spi/atompub/**ObjectServiceImpl.java#L145<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L145>
>>> [6] http://www.skuro.tk
>>> [7] http://twitter.com/skuro
>>> [8] http://twitter.com/skuro
>>> [9] http://github.com/skuro
>>> [10] http://github.com/skuro
>>> [11]
>>> http://nl.linkedin.com/in/**carlosciolla<http://nl.linkedin.com/in/carlosciolla>
>>> [12] http://www.backbase.com
>>>
>>
>>
Re: Copying a document with the AtomPub binding
Posted by Carlo Sciolla <ca...@gmail.com>.
Hi Florian,
thanks, I can also port that code in my 0.6.0 based application until we
can upgrade.
By the way, is the staleness of the GitHub repo to be fixed anytime soon?
Did Apache as a whole stop syncing its svn?
c.
2013/8/21 Florian Müller <fm...@apache.org>
> Hi Carlo,
>
> The GitHub mirror is outdated. Check the Apache SVN for the latest code:
>
> http://svn.apache.org/viewvc/**chemistry/opencmis/trunk/**
> chemistry-opencmis-client/**chemistry-opencmis-client-**
> impl/src/main/java/org/apache/**chemistry/opencmis/client/**
> runtime/DocumentImpl.java?**view=markup#l127<http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java?view=markup#l127>
>
>
> - Florian
>
>
> Hi Florian,
>>
>> I'm currently still on 0.6.0, but looking at the current code it seems
>> that the same flows exists in the latest trunk:
>>
>> DocumentImpl.copy() [1] -> SessionImpl.**createDocumentFromSource() [2]
>> -> ObjectServiceImpl.**createDocumentFromSource() [3] -> new
>>
>> CmisNotSupportedException("**createDocumentFromSource is not supported
>> by the AtomPub binding!")
>>
>> Am I missing something?
>>
>> c.
>>
>> 2013/8/21 Florian Müller
>> Hi Carlo,
>>
>> Document.copy() should also work with the AtomPub binding. If it
>> doesn't, we have to investigate.
>> If createDocumentFromSource is not support either by the binding or
>> the server, Document.copy() creates a new document and streams the
>> content from the source document to the new document via the client.
>> That is, the content is transmitted twice (to and from the client)
>> over the wire. It's not great, but it's the best solution we could
>> come up with.
>>
>> Florian
>>
>> Hi chemists,
>>
>> the AtomPub binding doesn't expose createDocumentFromSource, and the
>> current Chemistry client implementation throws an
>>
>> exceptionwhen
>>
>>
>> issuing document.copy() or session. createDocumentFromSource().
>>
>> Is there any advised method to copy a document in a generic and
>> reusable
>> way that will work regardless of the binding? And if not, what's the
>> most
>> appropriate way for AtomPub?
>>
>> Thanks,
>> c.
>>
>> --
>> Carlo Sciolla
>>
>> --==(A)==--
>> Linux User #372086
>> My personal blog: http://www.skuro.tk [6]
>> Follow me on twitter: http://twitter.com/skuro [7]
>> [8]Fork me on Github: http://github.com/**skuro<http://github.com/skuro>[9]
>> [10]My LinkedIn profile: http://nl.linkedin.com/in/**carlosciolla<http://nl.linkedin.com/in/carlosciolla>[11]
>>
>> --==(A)==--
>>
>> Product Lead at Backbase - Next Generation Portal Software for
>> Financials & Large Enterprises (http://www.**backbase.com<http://www.backbase.com>[12])
>>
>>
>> Links:
>> ------
>> [1]
>>
>> https://github.com/apache/**chemistry-opencmis/blob/**
>> android/chemistry-opencmis-**client/chemistry-opencmis-**
>> client-impl/src/main/java/org/**apache/chemistry/opencmis/**
>> client/runtime/DocumentImpl.**java#L131<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java#L131>
>> [2]
>>
>> https://github.com/apache/**chemistry-opencmis/blob/**
>> android/chemistry-opencmis-**client/chemistry-opencmis-**
>> client-impl/src/main/java/org/**apache/chemistry/opencmis/**
>> client/runtime/SessionImpl.**java#L729<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java#L729>
>> [3]
>>
>> https://github.com/apache/**chemistry-opencmis/blob/**
>> android/chemistry-opencmis-**client/chemistry-opencmis-**
>> client-bindings/src/main/java/**org/apache/chemistry/opencmis/**
>> client/bindings/spi/atompub/**ObjectServiceImpl.java#L142<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L142>
>> [4] mailto:fmui@apache.org
>> [5]
>>
>> https://github.com/apache/**chemistry-opencmis/blob/**
>> android/chemistry-opencmis-**client/chemistry-opencmis-**
>> client-bindings/src/main/java/**org/apache/chemistry/opencmis/**
>> client/bindings/spi/atompub/**ObjectServiceImpl.java#L145<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L145>
>> [6] http://www.skuro.tk
>> [7] http://twitter.com/skuro
>> [8] http://twitter.com/skuro
>> [9] http://github.com/skuro
>> [10] http://github.com/skuro
>> [11] http://nl.linkedin.com/in/**carlosciolla<http://nl.linkedin.com/in/carlosciolla>
>> [12] http://www.backbase.com
>>
>
>
--
Carlo Sciolla
--==(A)==--
Linux User #372086
My personal blog: http://www.skuro.tk
Follow me on twitter: http://twitter.com/skuro
<http://twitter.com/skuro>Fork me on Github: http://github.com/skuro
<http://github.com/skuro>My LinkedIn profile:
http://nl.linkedin.com/in/carlosciolla
--==(A)==--
Product Lead at Backbase - Next Generation Portal Software for Financials &
Large Enterprises (http://www.backbase.com)
Re: Copying a document with the AtomPub binding
Posted by Florian Müller <fm...@apache.org>.
Hi Carlo,
The GitHub mirror is outdated. Check the Apache SVN for the latest
code:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java?view=markup#l127
- Florian
> Hi Florian,
>
> I'm currently still on 0.6.0, but looking at the current code it
> seems
> that the same flows exists in the latest trunk:
>
> DocumentImpl.copy() [1] -> SessionImpl.createDocumentFromSource() [2]
> -> ObjectServiceImpl.createDocumentFromSource() [3] -> new
> CmisNotSupportedException("createDocumentFromSource is not supported
> by the AtomPub binding!")
>
> Am I missing something?
>
> c.
>
> 2013/8/21 Florian Müller
> Hi Carlo,
>
> Document.copy() should also work with the AtomPub binding. If it
> doesn't, we have to investigate.
> If createDocumentFromSource is not support either by the binding or
> the server, Document.copy() creates a new document and streams the
> content from the source document to the new document via the client.
> That is, the content is transmitted twice (to and from the client)
> over the wire. It's not great, but it's the best solution we could
> come up with.
>
> Florian
>
> Hi chemists,
>
> the AtomPub binding doesn't expose createDocumentFromSource, and the
> current Chemistry client implementation throws an
>
> exceptionwhen
>
> issuing document.copy() or session. createDocumentFromSource().
>
> Is there any advised method to copy a document in a generic and
> reusable
> way that will work regardless of the binding? And if not, what's the
> most
> appropriate way for AtomPub?
>
> Thanks,
> c.
>
> --
> Carlo Sciolla
>
> --==(A)==--
> Linux User #372086
> My personal blog: http://www.skuro.tk [6]
> Follow me on twitter: http://twitter.com/skuro [7]
> [8]Fork me on Github: http://github.com/skuro [9]
> [10]My LinkedIn profile: http://nl.linkedin.com/in/carlosciolla [11]
> --==(A)==--
>
> Product Lead at Backbase - Next Generation Portal Software for
> Financials & Large Enterprises (http://www.backbase.com [12])
>
>
> Links:
> ------
> [1]
>
> https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java#L131
> [2]
>
> https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java#L729
> [3]
>
> https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L142
> [4] mailto:fmui@apache.org
> [5]
>
> https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L145
> [6] http://www.skuro.tk
> [7] http://twitter.com/skuro
> [8] http://twitter.com/skuro
> [9] http://github.com/skuro
> [10] http://github.com/skuro
> [11] http://nl.linkedin.com/in/carlosciolla
> [12] http://www.backbase.com
Re: Copying a document with the AtomPub binding
Posted by Carlo Sciolla <ca...@gmail.com>.
Hi Florian,
I'm currently still on 0.6.0, but looking at the current code it seems that
the same flows exists in the latest trunk:
DocumentImpl.copy()<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/DocumentImpl.java#L131>->
SessionImpl.createDocumentFromSource()<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java#L729>->
ObjectServiceImpl.createDocumentFromSource()<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L142>->
new CmisNotSupportedException("createDocumentFromSource is not
supported
by the AtomPub binding!")
Am I missing something?
c.
2013/8/21 Florian Müller <fm...@apache.org>
> Hi Carlo,
>
> Document.copy() should also work with the AtomPub binding. If it doesn't,
> we have to investigate.
> If createDocumentFromSource is not support either by the binding or the
> server, Document.copy() creates a new document and streams the content from
> the source document to the new document via the client. That is, the
> content is transmitted twice (to and from the client) over the wire. It's
> not great, but it's the best solution we could come up with.
>
>
> Florian
>
>
> Hi chemists,
>>
>> the AtomPub binding doesn't expose createDocumentFromSource, and the
>> current Chemistry client implementation throws an
>>
>> exception<https://github.com/**apache/chemistry-opencmis/**
>> blob/android/chemistry-**opencmis-client/chemistry-**
>> opencmis-client-bindings/src/**main/java/org/apache/**
>> chemistry/opencmis/client/**bindings/spi/atompub/**
>> ObjectServiceImpl.java#L145<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L145>
>> >**when
>>
>> issuing document.copy() or session. createDocumentFromSource().
>>
>> Is there any advised method to copy a document in a generic and reusable
>> way that will work regardless of the binding? And if not, what's the most
>> appropriate way for AtomPub?
>>
>> Thanks,
>> c.
>>
>
>
--
Carlo Sciolla
--==(A)==--
Linux User #372086
My personal blog: http://www.skuro.tk
Follow me on twitter: http://twitter.com/skuro
<http://twitter.com/skuro>Fork me on Github: http://github.com/skuro
<http://github.com/skuro>My LinkedIn profile:
http://nl.linkedin.com/in/carlosciolla
--==(A)==--
Product Lead at Backbase - Next Generation Portal Software for Financials &
Large Enterprises (http://www.backbase.com)
Re: Copying a document with the AtomPub binding
Posted by Florian Müller <fm...@apache.org>.
Hi Carlo,
Document.copy() should also work with the AtomPub binding. If it
doesn't, we have to investigate.
If createDocumentFromSource is not support either by the binding or the
server, Document.copy() creates a new document and streams the content
from the source document to the new document via the client. That is,
the content is transmitted twice (to and from the client) over the wire.
It's not great, but it's the best solution we could come up with.
Florian
> Hi chemists,
>
> the AtomPub binding doesn't expose createDocumentFromSource, and the
> current Chemistry client implementation throws an
>
> exception<https://github.com/apache/chemistry-opencmis/blob/android/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java#L145>when
> issuing document.copy() or session. createDocumentFromSource().
>
> Is there any advised method to copy a document in a generic and
> reusable
> way that will work regardless of the binding? And if not, what's the
> most
> appropriate way for AtomPub?
>
> Thanks,
> c.