| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
package org.kuali.rice.kew.dto; |
| 18 |
|
|
| 19 |
|
import java.io.Serializable; |
| 20 |
|
import java.util.ArrayList; |
| 21 |
|
import java.util.List; |
| 22 |
|
|
| 23 |
|
import org.kuali.rice.kew.util.KEWConstants; |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
@author |
| 37 |
|
|
|
|
|
| 0% |
Uncovered Elements: 56 (56) |
Complexity: 22 |
Complexity Density: 0.71 |
|
| 38 |
|
public class DocumentContentDTO implements Serializable { |
| 39 |
|
|
| 40 |
|
private static final long serialVersionUID = -1008441110733007106L; |
| 41 |
|
private String attributeContent = ""; |
| 42 |
|
private String applicationContent = ""; |
| 43 |
|
private String searchableContent = ""; |
| 44 |
|
private List<WorkflowAttributeDefinitionDTO> attributeDefinitions = new ArrayList<WorkflowAttributeDefinitionDTO>(); |
| 45 |
|
private List<WorkflowAttributeDefinitionDTO> searchableDefinitions = new ArrayList<WorkflowAttributeDefinitionDTO>(); |
| 46 |
|
private Long routeHeaderId; |
| 47 |
|
|
| 48 |
|
private static final WorkflowAttributeDefinitionDTO[] ARRAY_TYPE = new WorkflowAttributeDefinitionDTO[0]; |
| 49 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 50 |
0
|
public DocumentContentDTO() {} ... |
| 51 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 52 |
0
|
public String getApplicationContent() {... |
| 53 |
0
|
return applicationContent; |
| 54 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 55 |
0
|
public void setApplicationContent(String applicationContent) {... |
| 56 |
0
|
this.applicationContent = applicationContent; |
| 57 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 58 |
0
|
public String getAttributeContent() {... |
| 59 |
0
|
return attributeContent; |
| 60 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 61 |
0
|
public void setAttributeContent(String attributeContent) {... |
| 62 |
0
|
this.attributeContent = attributeContent; |
| 63 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 64 |
0
|
public String getSearchableContent() {... |
| 65 |
0
|
return searchableContent; |
| 66 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 67 |
0
|
public void setSearchableContent(String searchableContent) {... |
| 68 |
0
|
this.searchableContent = searchableContent; |
| 69 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
|
| 70 |
0
|
public String getFullContent() {... |
| 71 |
0
|
StringBuffer fullContent = new StringBuffer(); |
| 72 |
0
|
fullContent.append("<").append(KEWConstants.DOCUMENT_CONTENT_ELEMENT).append(">"); |
| 73 |
0
|
if (!isEmpty(getApplicationContent())) { |
| 74 |
0
|
fullContent.append("<").append(KEWConstants.APPLICATION_CONTENT_ELEMENT).append(">"); |
| 75 |
0
|
fullContent.append(getApplicationContent()); |
| 76 |
0
|
fullContent.append("</").append(KEWConstants.APPLICATION_CONTENT_ELEMENT).append(">"); |
| 77 |
|
} |
| 78 |
0
|
fullContent.append(getAttributeContent()); |
| 79 |
0
|
fullContent.append(getSearchableContent()); |
| 80 |
0
|
fullContent.append("</").append(KEWConstants.DOCUMENT_CONTENT_ELEMENT).append(">"); |
| 81 |
0
|
return fullContent.toString(); |
| 82 |
|
} |
| 83 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 84 |
0
|
public WorkflowAttributeDefinitionDTO[] getAttributeDefinitions() {... |
| 85 |
0
|
return (WorkflowAttributeDefinitionDTO[])attributeDefinitions.toArray(ARRAY_TYPE); |
| 86 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 87 |
0
|
public void setAttributeDefinitions(WorkflowAttributeDefinitionDTO[] attributeDefinitions) {... |
| 88 |
0
|
this.attributeDefinitions = new ArrayList<WorkflowAttributeDefinitionDTO>(); |
| 89 |
0
|
for (int index = 0; index < attributeDefinitions.length; index++) { |
| 90 |
0
|
this.attributeDefinitions.add(attributeDefinitions[index]); |
| 91 |
|
} |
| 92 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 93 |
0
|
public WorkflowAttributeDefinitionDTO[] getSearchableDefinitions() {... |
| 94 |
0
|
return (WorkflowAttributeDefinitionDTO[])searchableDefinitions.toArray(ARRAY_TYPE); |
| 95 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 96 |
0
|
public void setSearchableDefinitions(WorkflowAttributeDefinitionDTO[] searchableDefinitions) {... |
| 97 |
0
|
this.searchableDefinitions = new ArrayList<WorkflowAttributeDefinitionDTO>(); |
| 98 |
0
|
for (int index = 0; index < searchableDefinitions.length; index++) { |
| 99 |
0
|
this.searchableDefinitions.add(searchableDefinitions[index]); |
| 100 |
|
} |
| 101 |
|
} |
| 102 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 103 |
0
|
public void addAttributeDefinition(WorkflowAttributeDefinitionDTO definition) {... |
| 104 |
0
|
attributeDefinitions.add(definition); |
| 105 |
|
} |
| 106 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 107 |
0
|
public void removeAttributeDefinition(WorkflowAttributeDefinitionDTO definition) {... |
| 108 |
0
|
attributeDefinitions.remove(definition); |
| 109 |
|
} |
| 110 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 111 |
0
|
public void addSearchableDefinition(WorkflowAttributeDefinitionDTO definition) {... |
| 112 |
0
|
searchableDefinitions.add(definition); |
| 113 |
|
} |
| 114 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 115 |
0
|
public void removeSearchableDefinition(WorkflowAttributeDefinitionDTO definition) {... |
| 116 |
0
|
searchableDefinitions.remove(definition); |
| 117 |
|
} |
| 118 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 119 |
0
|
public Long getRouteHeaderId() {... |
| 120 |
0
|
return routeHeaderId; |
| 121 |
|
} |
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 122 |
0
|
public void setRouteHeaderId(Long routeHeaderId) {... |
| 123 |
0
|
this.routeHeaderId = routeHeaderId; |
| 124 |
|
} |
| 125 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 126 |
0
|
private boolean isEmpty(String value) {... |
| 127 |
0
|
return value == null || value.trim().equals(""); |
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
} |