<Data> <External> <Parameters> <Datum Exposed="false" ID="SpringBeanName" Name="SpringBeanName" Type="String">MyBean</Datum> <Datum Exposed="false" ID="SpringBeanMethod" Name="SpringBeanMethod" Type="String">myMethod</Datum> </Parameters> <Object Scope="local">com.em4444.LiveSiteSpringAdapter</Object> <Method>handleRequest</Method> </External> </Data>
public org.dom4j.Document handleRequest(com.interwoven.livesite.runtime.RequestContext context) { // get or create the spring application context ApplicationContext springContext = ...; // use the component parameters to determine which bean and method to call String beanName = context.getParameterString("SpringBeanName"); String beanMethod = context.getParameterString("SpringBeanMethod"); Object bean = springContext.getBean(beanName); try { // call the method ... } catch (Exception e) { // log/handle errors ... } }
1) do all external methods have to be static? i don't see how else you could invoke them.
2) is there an API with which you can get content from the repository in those external methods? I can't find anything like this in the documentation.
$URL_PREFIX
$PAGE_LINK