3.2.4. Link Producer service

Link Producer service - a simple service, generates an .lnk file that is compatible with the Microsoft link file format. It is an extension of the REST Framework library and is included into the WebDav service. On dispatching a GET request, the service generates the content of an .lnk file, which points to a JCR resource via WebDav.

Link Producer has a simple configuration as described below:


When JRS is used, the resource can be addressed by WebDav reference (href) like http://host:port/rest/jcr/repository/workspace/somenode/somefile.extension. The link servlet must be called for this resource by several hrefs, like http://localhost:8080/rest/lnkproducer/openit.lnk?path=/repository/workspace/somenode/somefile.extension.


When using the portal mode the REST servlet is available using a reference (href) like http://localhost:8080/portal/rest/...

To have the best compatibility, the name of the .lnk file must be the same as that of the JCR resource.

Here is a step-by-step sample of a usecase of the link producer. First, type the valid reference to the resource using the link producer in your browser's address field:

Internet Explorer will give a dialog window requesting to Open a file or to Save it. Click the Open button.

In Windows system an .lnk file will be downloaded and opened with the application which is registered to open the files, which are pointed to by the .lnk file. In case of a .doc file, Windows opens Microsoft Office Word which will try to open a remote file (test0000.doc). Maybe, it will be necessary to enter USERNAME and PASSWORD.

Next, you will be able to edit the file in Microsoft Word.

The Link Producer is necessary for opening/editing and then saving the remote files in Microsoft Office Word without any further updates.

Also, the Link Producer can be referenced from an HTML page. If page contains a code snippet like:

<a href="http://localhost:8080/rest/lnkproducer/openit.lnk?path=/repository/workspace/somenode/somefile.extension">somefile.extention</a>

The somefile.extension file will be opened directly.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus