As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<bean id="searchCustomScript" parent="baseJavaScriptExtension" class="org.alfresco.sample.CustomSearch"> <property name="extensionName"> <value>customSearch</value> </property> </bean>
<property name="serviceRegistry"> <ref bean="ServiceRegistry"/> </property> <property name="storeUrl"> <value>${spaces.store}</value> </property>
With Cocoon which used, and still uses, a js rhino implementation (the same as Alfresco I think), it was possible to call java class directly from js code..
… // remove security issue related objects - this ensures the script may not access // unsecure java.* libraries or import any other classes for direct access - only // the configured root host objects will be available to the script writer this.secureScope.delete("Packages"); this.secureScope.delete("getClass"); this.secureScope.delete("java"); …