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