cancel
Showing results for 
Search instead for 
Did you mean: 

Launching directly into a space

davidturner90
Champ in-the-making
Champ in-the-making
I am customising the existing 'out of the box' UI and would like to provide links from a 3rd party application that lauches the user into a particular folder space.

I know this is possible by calling the http://[domain]:[port]/[context path]/n/browse/workspace/SpacesStore/990c1661-07c9-11dd-9dbc-355e1e9aa365

This calls the org.alfresco.web.app.servlet.ExternalAccessServlet and it is here that I am looking to extend the functionality.

In this scenario the 3rd party app has to provide the link to launch into the space in Alfresco - however it will not know the space store location. What they will have is a unique id which they will pass in as a request param - this id could map to the description of the folder in Alfresco when it is initially created.

So I would like to search for all folders within Alfresco that have a description matching the id passed in the URL. If more than one then throw an error. If one is found check permissions and then display the browse page.

Has anybody has to integrate anything like this before and if so what approach did you take?
2 REPLIES 2

wabson
Star Contributor
Star Contributor
David,

I would write a short web script which takes as a parameter the description value, and performs a Lucene search to look for matching nodes. The script could either return a short piece of XML or some plain text containing the space URL which is then used by your application, or it could return some actual HTML which performs the redirection in the user's browser directly using JavaScript. Or both, as web scripts can support multiple response formats. Error handling is also supported OOTB.

One last thing - while using the description field is quite valid, you should really be using your own model to hold these external ID values so that they cannot be accidentally changed in the web client. You could also implement a custom constraint to force uniqueness.

Cheers,
Will.

davidturner90
Champ in-the-making
Champ in-the-making
Great post Will - very helpful.   Smiley Very Happy

I have one question - you say I should be using a custom model to hold the unique id rather than trying to force it into the description - I absolutely agree with you and would feel more comfortable doing it this way. Is there any information or guide on creating a custom model? Is it easy to do? and where would it be stored? For example, would I have to create my own DB table to hold this data?

Thanks,

David