<bean id='webscript.my.web.script.get'
class='com.acme.MyWebScript'
parent='webscript'>
<constructor-arg index='0' ref='ServiceRegistry' />
</bean>
public class DelegatingWebScript
extends DeclarativeWebScript
{
private final DynamicDeclarativeWebScript dynamicWebScript;
public DelegatingWebScript(final DynamicDeclarativeWebScript dynamicWebScript)
{
this.dynamicWebScript = dynamicWebScript;
}
@Override
protected Map executeImpl(WebScriptRequest request, Status status, Cache cache)
{
return(dynamicWebScript.execute(request, status, cache));
}
}
public interface DynamicDeclarativeWebScript
{
Map execute(WebScriptRequest request, Status status, Cache cache);
}
<lang:groovy id='groovy.myWebScript'
refresh-check-delay='5000'
script-source='classpath:alfresco/extension/groovy/MyWebScript.groovy'>
<langroperty name='serviceRegistry' ref='ServiceRegistry' />
</lang:groovy>
<bean id='webscript.groovy.myWebScript'
class='org.alfresco.extension.webscripts.groovy.DynamicDelegatingWebScript'
parent='webscript'>
<constructor-arg index='0' ref='groovy.myWebScript' />
</bean>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.