1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
package mocks; |
18 |
|
|
19 |
|
import java.io.InputStream; |
20 |
|
import java.util.Collection; |
21 |
|
import java.util.HashMap; |
22 |
|
import java.util.List; |
23 |
|
import java.util.Map; |
24 |
|
|
25 |
|
import org.jdom.Element; |
26 |
|
import org.kuali.rice.core.api.impex.ExportDataSet; |
27 |
|
import org.kuali.rice.kew.doctype.bo.DocumentType; |
28 |
|
import org.kuali.rice.kew.doctype.service.DocumentTypeService; |
29 |
|
import org.kuali.rice.kew.dto.DocumentTypeDTO; |
30 |
|
import org.kuali.rice.kew.postprocessor.PostProcessor; |
31 |
|
import org.kuali.rice.kew.rule.bo.RuleAttribute; |
32 |
|
|
33 |
|
|
|
|
| 0% |
Uncovered Elements: 67 (67) |
Complexity: 34 |
Complexity Density: 1.03 |
|
34 |
|
public class MockDocumentTypeServiceImpl implements DocumentTypeService { |
35 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
36 |
0
|
public DocumentType setDocumentTypeVersion(DocumentType documentType, boolean currentInd) {... |
37 |
0
|
return null; |
38 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
39 |
0
|
public DocumentType getMostRecentDocType(String docTypeName) {... |
40 |
0
|
return null; |
41 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
42 |
0
|
public boolean isLockedForRouting(DocumentType documentType) {... |
43 |
0
|
return false; |
44 |
|
} |
45 |
|
private Map documentsById = new HashMap(); |
46 |
|
private Map documentsByName = new HashMap(); |
47 |
|
private Map postProcessors = new HashMap(); |
48 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
0
|
public void makeCurrent(List documentTypes) {... |
50 |
0
|
throw new UnsupportedOperationException("not yet implmeneted"); |
51 |
|
} |
52 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
53 |
0
|
public void addDocumentType(DocumentType documentType, PostProcessor postProcessor) {... |
54 |
0
|
documentsById.put(documentType.getDocumentTypeId(), documentType); |
55 |
0
|
documentsByName.put(documentType.getName(), documentType); |
56 |
0
|
postProcessors.put(documentType.getDocumentTypeId(), postProcessor); |
57 |
|
} |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
0
|
public DocumentType findByDocumentId(Long documentId) {... |
60 |
0
|
throw new UnsupportedOperationException("not yet implemented"); |
61 |
|
} |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
0
|
public Integer getMaxVersionNumber(String name){... |
64 |
0
|
return new Integer(0); |
65 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
66 |
0
|
public DocumentType findById(Long documentTypeId) {... |
67 |
0
|
return (DocumentType) documentsById.get(documentTypeId); |
68 |
|
} |
69 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
0
|
public DocumentType findByName(String name) {... |
71 |
0
|
return (DocumentType) documentsByName.get(name); |
72 |
|
} |
73 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
0
|
public DocumentType findByNameCaseInsensitive(String name) {... |
75 |
0
|
return (DocumentType) documentsByName.get(name); |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0
|
public void versionAndSave(DocumentType documentType) {... |
79 |
0
|
addDocumentType(documentType, new MockPostProcessor(true)); |
80 |
|
} |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0
|
public PostProcessor getPostProcessor(Long documentTypeId) {... |
83 |
0
|
return (PostProcessor) postProcessors.get(documentTypeId); |
84 |
|
} |
85 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
86 |
0
|
public Collection findRouteLevels(Long documentTypeId) {... |
87 |
0
|
return (Collection) ((DocumentType)documentsById.get(documentTypeId)).getRouteLevels(); |
88 |
|
} |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
90 |
0
|
public Collection find(DocumentType documentType, String docGroupName, boolean climbHiearchy) {... |
91 |
0
|
throw new UnsupportedOperationException("not implemented in MockDocumentTypeServiceImpl"); |
92 |
|
} |
93 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
94 |
0
|
public void delete(DocumentType documentType) {... |
95 |
0
|
documentsById.remove(documentType.getDocumentTypeId()); |
96 |
0
|
documentsByName.remove(documentType.getName()); |
97 |
|
} |
98 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
0
|
public List findByRouteHeaderId(Long routeHeaderId) {... |
100 |
0
|
throw new UnsupportedOperationException("not implemented in MockDocumentTypeServiceImpl"); |
101 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
102 |
0
|
public void makeCurrent(Long routeHeaderId) {... |
103 |
0
|
throw new UnsupportedOperationException("not implemented in MockDocumentTypeServiceImpl"); |
104 |
|
} |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
0
|
public List findAllCurrentRootDocuments() {... |
107 |
0
|
return null; |
108 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
109 |
0
|
public DocumentType getMostRecentDocType(Long documentTypeId) {... |
110 |
0
|
return null; |
111 |
|
} |
112 |
|
|
113 |
|
@see |
114 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
115 |
0
|
public DocumentTypeDTO getDocumentTypeVO(Long documentTypeId) {... |
116 |
0
|
return null; |
117 |
|
} |
118 |
|
|
119 |
|
@see |
120 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
121 |
0
|
public DocumentTypeDTO getDocumentTypeVO(String documentTypeName) {... |
122 |
0
|
return null; |
123 |
|
} |
124 |
|
|
125 |
|
@see |
126 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
127 |
0
|
public DocumentType findRootDocumentType(DocumentType docType) {... |
128 |
0
|
return null; |
129 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
130 |
0
|
public void loadXml(InputStream inputStream, String principalId) {... |
131 |
0
|
throw new UnsupportedOperationException("Mock document type service can't load xml"); |
132 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
133 |
0
|
public Element export(ExportDataSet dataSet) {... |
134 |
0
|
return null; |
135 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
136 |
0
|
@Override... |
137 |
|
public boolean supportPrettyPrint() { |
138 |
0
|
return true; |
139 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
140 |
0
|
public List findAllCurrent() {... |
141 |
0
|
return null; |
142 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
143 |
0
|
public List getChildDocumentTypes(Long documentTypeId) {... |
144 |
0
|
return null; |
145 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
146 |
0
|
public DocumentType findByNameIgnoreCache(Long documentTypeId) {... |
147 |
0
|
return null; |
148 |
|
} |
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
149 |
0
|
public void save(DocumentType documentType) {... |
150 |
|
|
151 |
|
} |
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
152 |
0
|
public void save(DocumentType documentType, boolean flushCache) {... |
153 |
|
|
154 |
|
} |
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
155 |
0
|
public void flushCache() {... |
156 |
|
|
157 |
|
} |
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
158 |
0
|
public void clearCacheForAttributeUpdate(RuleAttribute ruleAttribute) {... |
159 |
|
|
160 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
161 |
0
|
public Integer getDocumentTypeCount() {... |
162 |
0
|
return null; |
163 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
164 |
0
|
public List<DocumentType> findPreviousInstances(String documentTypeName) {... |
165 |
0
|
return null; |
166 |
|
} |
167 |
|
|
168 |
|
} |