cancel
Showing results for 
Search instead for 
Did you mean: 

accessing a store other than the default

dongq
Champ in-the-making
Champ in-the-making
We are using alfresco's repository service to implement an image repository.  We want to store images for different department in different stores.

Alfresco's default store is SpacesStore. We can create new stores using the web service api.  I have two questions.

1. Is there a way to configure the alfresco web client to access a store other than SpacesStore? The only way I can see other stores is through the node browser.

2. The url for access a node in the default store is
http://hostname/alfresco/navigate/browse/workspace/SpacesStore/[node uuid]

what is the direct url for accessing a node in another store?

Thanks so much for your help!

Qing
4 REPLIES 4

kevinr
Star Contributor
Star Contributor
1. This can be done - but you require the same basic structure in the repo as the web-client expects in the default repository. i.e. a Company Home node, the Data Dictionary node structure etc. The web-client is designed to work against the repo with that particular structure.

2. Building the URLs is easy - the last 3 elements in the URL are simple the store protocol, store name and ID from the NodeRef for the node. So if your store is called 'mystore' then the URL might be:

http://hostname/alfresco/navigate/browse/workspace/mystore/uuid

Thanks,

Kevin

dongq
Champ in-the-making
Champ in-the-making
Kevin, thank you so much for your reply.
1. We will not have the same basic structure, but it is OK because we will build our own web client for the image repository.

2. The URL problem is more important. I did try to construct the url the way you suggested:
http://hostname/alfresco/navigate/browse/workspace/mystore/[uuid]
However, the web client gives me the following error:
The folder item referenced by Id: c356d367-d81d-11db-a2f9-cb61deb5e857 - has been deleted from the database. The system has changed your folder location as the folder you were in no longer exists.

Does my new store have to have the same basic structure as the default store for the urls to work?

Thanks!

Qing

kevinr
Star Contributor
Star Contributor
2. The URL problem is more important. I did try to construct the url the way you suggested:
http://hostname/alfresco/navigate/browse/workspace/mystore/[uuid]
However, the web client gives me the following error:
The folder item referenced by Id: c356d367-d81d-11db-a2f9-cb61deb5e857 - has been deleted from the database. The system has changed your folder location as the folder you were in no longer exists.

Does my new store have to have the same basic structure as the default store for the urls to work?

Appologies I thought you were trying to build URLs to access content directly i.e. if the content node was in a store you would use something like this:
http://hostname/alfresco/download/direct/workspace/mystore/[uuid]/filename.txt

Yes the web-client expects all the 'spaces' it is able to browse to be in the SpacesStore - as it is built like that. The web-client is not currently able to switch between two different stores for browsing - only for direct links to access content etc. like i mention above. You can use the various servlets when building your new UI as they can access nodes in any store i.e. the download content servlet (as above), the template processing servlet and the command servlet (for javascript api commands etc.)

Thanks,

Kevin

dongq
Champ in-the-making
Champ in-the-making
Thanks so much for your reply. The download and guestDownload servlets work perfectly in our case.  Thank you!

Qing