06-26-2013 05:52 PM
package nl.mark.alfresco.myservice.webscript;
import java.util.HashMap;
import java.util.Map;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
public class GetFooTypes extends DeclarativeWebScript {
@Override
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status) {
Map<String, Object> model = new HashMap<String, Object>();
model.put("types", "[\"foo\", \"bar\"]");
return model;
}
}
<webscript>
<shortname>Retrieve a list of foo types associated to a bar type.</shortname>
<description>Returns an empty JSON array or a JSON array filled with foo types as Strings, named 'types'.</description>
<url>/mark/cacher/footype?typecode={code}</url>
<authentication>user</authentication>
<family>Mark cacher</family>
</webscript>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Java backed webscripts –>
<bean id="webscript.nl.mark.cacher.footype.get" class="nl.mark.alfresco.myservice.webscript.GetFooTypes"
parent="webscript">
</bean>
</beans>
06-27-2013 05:53 AM
06-27-2013 07:07 AM
<webscript>
<shortname>Retrieve a list of foo types associated to a bar type.</shortname>
<description>Returns an empty JSON array or a JSON array filled with foo types as Strings named 'types'.</description>
<url>/mark/ztccache/footype.json</url>
<authentication>user</authentication>
<format default="json">extension</format>
<family>mark myservice cacher</family>
</webscript>
${types?string}
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Java backed webscripts –>
<bean id="webscript.nl.mark.cacher.footype.get" class="nl.mark.alfresco.myservice.webscript.GetFooTypes"
parent="webscript">
</bean>
</beans>
06-27-2013 07:28 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.