cancel
Showing results for 
Search instead for 
Did you mean: 

How to extend a JavaScript-based repository webscript?

slsvcn
Champ in-the-making
Champ in-the-making
Hello.

I'm trying to extend org/alfresco/slingshot/search/search.get.js without success. I've seen this tutorial: https://www.alfresco.com/blogs/developer/2012/05/23/webscript-extensibility-on-the-alfresco-reposito... but it was intended for Alfresco 4.x. Please help for Alfresco 5.x version.

Thanks in advance.
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

unfortunately, in the 4.2. release train, Alfresco changed the class of the web script container for Repository which now makes it impossible to activate extensibility without sacrificing another feature of the container - multi-tenancy aware web script container. The guide advises you to replace the RepositoryContainer with the ExtensibilityContainer class, which was pretty much a straight-forward swap. Since 4.2, the default class is now the TenantRepositoryContainer and there is no direct alternative to it that can handle extensibility.

The way the TenantRepositoryContainer is hooked in also means that you can only override it in a custom-web-context.xml (in extension directory) and not with any other custom Spring XML file. If you do not use multi-tenancy it appears safe to activate extensibility that way…

We have written our own web script container that extends from the tenant-aware container so we don't have to choose between extensibility and multi-tenancy.

Regards
Axel