Configuring the controller for the web script
Once the Java controller is ready, it needs to be configured for the web script so that the web script framework in Alfresco can get to know that this Java class is the controller for the contentlocation
web script. This can be done by creating a spring context file and adding the entry for the Java class in it.
Create a file custom-example-webscripts-context.xml
that has the following content:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'> <beans> <bean id="webscript.example.contentlocation.get" class="com.example.content.ContentLocationWebScript" parent="webscript"> <property name="nodeService" ref="nodeService" /> <property name="permissionService" ref="permissionService" /> </bean> </beans>
We created a spring context file to associate the Java controller with the contentlocation
web...