1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.routeheader;
18
19 import org.kuali.rice.core.util.xml.XmlException;
20 import org.kuali.rice.kew.rule.WorkflowAttribute;
21 import org.kuali.rice.kew.rule.web.RoutingReportAction;
22 import org.kuali.rice.kew.util.KEWConstants;
23
24 import java.util.Iterator;
25 import java.util.List;
26
27
28
29
30
31
32
33
34
35
36
37
38 public class AttributeDocumentContent extends StandardDocumentContent {
39
40 private static final long serialVersionUID = 6789132279492877000L;
41
42 public AttributeDocumentContent(List attributes) throws XmlException {
43 super(generateDocContent(attributes));
44 }
45
46 private static String generateDocContent(List attributes) {
47 StringBuffer buffer = new StringBuffer();
48 buffer.append("<").append(KEWConstants.DOCUMENT_CONTENT_ELEMENT).append(">");
49 buffer.append("<").append(KEWConstants.ATTRIBUTE_CONTENT_ELEMENT).append(">");
50 for (Iterator iterator = attributes.iterator(); iterator.hasNext();) {
51 WorkflowAttribute attribute = (WorkflowAttribute) iterator.next();
52 buffer.append(attribute.getDocContent());
53 }
54 buffer.append("</").append(KEWConstants.ATTRIBUTE_CONTENT_ELEMENT).append(">");
55 buffer.append("</").append(KEWConstants.DOCUMENT_CONTENT_ELEMENT).append(">");
56 return buffer.toString();
57 }
58
59 }