cancel
Showing results for 
Search instead for 
Did you mean: 

Dowwnload version content

satishvarmadand
Champ in-the-making
Champ in-the-making
Hi,
  How can i download specific version's content?

Fo Ex:, a file abc.html has 3 versions, 1.0, 1.1, 1.2. Now i want to download each specific versions content. I tried to download similar to a regular file but i am getting some exception as Node does not found exception.

I am defining store as
Store storeRef = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
      
Somewhere i read that version specific contents should be downloaded from a different store something like Version Store
Store storeRef = new Store("versionStore", "version2Store");

But everytime i am getting excpetion

{http://www.alfresco.org/ws/service/content/1.0}ContentFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>Node does not exist: workspace://SpacesStore/f50d7cec-9db8-43a1-8399-535c59c57374</ns1:message>
    [junit]    {http://xml.apache.org/axis/}exceptionNameSmiley Surprisedrg.alfresco.repo.webservice.content.ContentFault
    [junit]    {http://xml.apache.org/axis/}stackTrace:
   

Can some one help me in finding out the correct way for defining store to download version specific content.

Thanks.
4 REPLIES 4

openpj
Elite Collaborator
Elite Collaborator
If you want to make a query to Alfresco repository for get versions of your contents you must use lightweightversionstore in this way:


private Store versionStore = new Store("versionStore", "lightWeightVersionStore");

Hope this helps.

satishvarmadand
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the reply. I tried your suggestion but still getting same exception (Node does not exist). I am defining my store as

   Store versionStore = new Store("versionStore", "lightWeightVersionStore");
 
I am getting the following exception:

{http://www.alfresco.org/ws/service/content/1.0}ContentFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>Node does not exist: workspace://lightWeightVersionStore/f50d7cec-9db8-43a1-8399-535c59c57374

Few questions:
1) When i specify as versionStore, somehow it is getting replaced by "WorkSpace". To try out i gave a wrong versionStore like "versionStore1" and it is not getting replaced. I get something like "Node does not exist: versionStore1://lightWeightVersionStore".

Just curious why it is replacing the versionStore with workspace.


I am using Alfresco-3c.
Any help would be greatly appreciated on how to define versionstore to download version specific contents

Thanks.

satishvarmadand
Champ in-the-making
Champ in-the-making
Hi,
  Finally… it has got resolved. The store that we need to specify is "Version2Strore" for downloading version specific contents (I found it from there DB, it also included in the downloaded URL).

Store versionStore = new Store(Constants.WORKSPACE_STORE, "version2Store");


-Satish

ashenoy
Champ in-the-making
Champ in-the-making
I have a similar need. However I cant seem to find any constructors for the class store that takes 2 paramaters. I am on version 2.2.2

Arvin