1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.edl.impl;
17
18 import java.io.StringReader;
19
20 import javax.xml.parsers.DocumentBuilderFactory;
21 import javax.xml.xpath.XPathExpressionException;
22
23 import org.kuali.rice.edl.framework.workflow.EDocLitePostProcessor;
24 import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue;
25 import org.w3c.dom.Document;
26 import org.xml.sax.InputSource;
27
28
29
30
31
32
33
34
35 public class TestEDocLitePostProcessor extends EDocLitePostProcessor {
36
37 public static final String CONTEXT_NAME = "/edl-test";
38
39 public static String getURL(Document edlDoc) throws XPathExpressionException {
40 return System.getProperty("basedir") + CONTEXT_NAME;
41 }
42
43 public static Document getEDLContent(DocumentRouteHeaderValue routeHeader) throws Exception {
44 String content = "<content><data>yahoo</data></content>";
45 Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(content)));
46 return doc;
47 }
48
49 }