OpenSearch

- comply with atom feed validators
- addition of xmldate and urlencode freemarker methods

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4750 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2007-01-08 12:36:17 +00:00
parent c026a18591
commit f9e9d0b808
2 changed files with 22 additions and 16 deletions

View File

@@ -23,6 +23,8 @@ import java.util.Map;
import javax.servlet.ServletContext;
import org.alfresco.repo.template.ISO8601DateFormatMethod;
import org.alfresco.repo.template.UrlEncodeMethod;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.TemplateService;
import org.alfresco.service.descriptor.DescriptorService;
@@ -170,6 +172,8 @@ public abstract class APIServiceImpl implements BeanNameAware, APIService, APICo
protected Map<String, Object> createTemplateModel(APIRequest req, APIResponse res)
{
Map<String, Object> model = new HashMap<String, Object>(7, 1.0f);
model.put("xmldate", new ISO8601DateFormatMethod());
model.put("urlencode", new UrlEncodeMethod());
model.put("date", new Date());
model.put("agent", descriptorService.getServerDescriptor());
model.put("request", req);