Clover Coverage Report - kew-test 2.0.0-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../img/srcFileCovDistChart0.png 0% of files have more coverage
33   168   34   0.97
0   120   1.03   34
34     1  
1    
 
  MockDocumentTypeServiceImpl       Line # 34 33 0% 34 67 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2005-2008 The Kuali Foundation
3    *
4    *
5    * Licensed under the Educational Community License, Version 2.0 (the "License");
6    * you may not use this file except in compliance with the License.
7    * You may obtain a copy of the License at
8    *
9    * http://www.opensource.org/licenses/ecl2.php
10    *
11    * Unless required by applicable law or agreed to in writing, software
12    * distributed under the License is distributed on an "AS IS" BASIS,
13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    * See the License for the specific language governing permissions and
15    * limitations under the License.
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   
 
34    public class MockDocumentTypeServiceImpl implements DocumentTypeService {
35   
 
36  0 toggle public DocumentType setDocumentTypeVersion(DocumentType documentType, boolean currentInd) {
37  0 return null;
38    }
 
39  0 toggle public DocumentType getMostRecentDocType(String docTypeName) {
40  0 return null;
41    }
 
42  0 toggle 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   
 
49  0 toggle public void makeCurrent(List documentTypes) {
50  0 throw new UnsupportedOperationException("not yet implmeneted");
51    }
52   
 
53  0 toggle 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   
 
59  0 toggle public DocumentType findByDocumentId(Long documentId) {
60  0 throw new UnsupportedOperationException("not yet implemented");
61    }
62   
 
63  0 toggle public Integer getMaxVersionNumber(String name){
64  0 return new Integer(0);
65    }
 
66  0 toggle public DocumentType findById(Long documentTypeId) {
67  0 return (DocumentType) documentsById.get(documentTypeId);
68    }
69   
 
70  0 toggle public DocumentType findByName(String name) {
71  0 return (DocumentType) documentsByName.get(name);
72    }
73   
 
74  0 toggle public DocumentType findByNameCaseInsensitive(String name) {
75  0 return (DocumentType) documentsByName.get(name);
76    }
77   
 
78  0 toggle public void versionAndSave(DocumentType documentType) {
79  0 addDocumentType(documentType, new MockPostProcessor(true));
80    }
81   
 
82  0 toggle public PostProcessor getPostProcessor(Long documentTypeId) {
83  0 return (PostProcessor) postProcessors.get(documentTypeId);
84    }
85   
 
86  0 toggle public Collection findRouteLevels(Long documentTypeId) {
87  0 return (Collection) ((DocumentType)documentsById.get(documentTypeId)).getRouteLevels();
88    }
89   
 
90  0 toggle public Collection find(DocumentType documentType, String docGroupName, boolean climbHiearchy) {
91  0 throw new UnsupportedOperationException("not implemented in MockDocumentTypeServiceImpl");
92    }
93   
 
94  0 toggle public void delete(DocumentType documentType) {
95  0 documentsById.remove(documentType.getDocumentTypeId());
96  0 documentsByName.remove(documentType.getName());
97    }
98   
 
99  0 toggle public List findByRouteHeaderId(Long routeHeaderId) {
100  0 throw new UnsupportedOperationException("not implemented in MockDocumentTypeServiceImpl");
101    }
 
102  0 toggle public void makeCurrent(Long routeHeaderId) {
103  0 throw new UnsupportedOperationException("not implemented in MockDocumentTypeServiceImpl");
104    }
105   
 
106  0 toggle public List findAllCurrentRootDocuments() {
107  0 return null;
108    }
 
109  0 toggle public DocumentType getMostRecentDocType(Long documentTypeId) {
110  0 return null;
111    }
112    /* (non-Javadoc)
113    * @see org.kuali.rice.kew.doctype.DocumentTypeService#getDocumentTypeVO(java.lang.Long)
114    */
 
115  0 toggle public DocumentTypeDTO getDocumentTypeVO(Long documentTypeId) {
116  0 return null;
117    }
118    /* (non-Javadoc)
119    * @see org.kuali.rice.kew.doctype.DocumentTypeService#getDocumentTypeVO(java.lang.String)
120    */
 
121  0 toggle public DocumentTypeDTO getDocumentTypeVO(String documentTypeName) {
122  0 return null;
123    }
124    /* (non-Javadoc)
125    * @see org.kuali.rice.kew.doctype.DocumentTypeService#getRootDocumentType(org.kuali.rice.kew.doctype.DocumentType)
126    */
 
127  0 toggle public DocumentType findRootDocumentType(DocumentType docType) {
128  0 return null;
129    }
 
130  0 toggle public void loadXml(InputStream inputStream, String principalId) {
131  0 throw new UnsupportedOperationException("Mock document type service can't load xml");
132    }
 
133  0 toggle public Element export(ExportDataSet dataSet) {
134  0 return null;
135    }
 
136  0 toggle @Override
137    public boolean supportPrettyPrint() {
138  0 return true;
139    }
 
140  0 toggle public List findAllCurrent() {
141  0 return null;
142    }
 
143  0 toggle public List getChildDocumentTypes(Long documentTypeId) {
144  0 return null;
145    }
 
146  0 toggle public DocumentType findByNameIgnoreCache(Long documentTypeId) {
147  0 return null;
148    }
 
149  0 toggle public void save(DocumentType documentType) {
150   
151    }
 
152  0 toggle public void save(DocumentType documentType, boolean flushCache) {
153   
154    }
 
155  0 toggle public void flushCache() {
156   
157    }
 
158  0 toggle public void clearCacheForAttributeUpdate(RuleAttribute ruleAttribute) {
159   
160    }
 
161  0 toggle public Integer getDocumentTypeCount() {
162  0 return null;
163    }
 
164  0 toggle public List<DocumentType> findPreviousInstances(String documentTypeName) {
165  0 return null;
166    }
167   
168    }