Coverage Report - org.kuali.rice.krad.workflow.service.impl.KualiWorkflowInfoImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
KualiWorkflowInfoImpl
0%
0/23
0%
0/2
1.077
 
 1  
 /*
 2  
  * Copyright 2005-2007 The Kuali Foundation
 3  
  * 
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  * 
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  * 
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.krad.workflow.service.impl;
 17  
 
 18  
 import java.rmi.RemoteException;
 19  
 import java.util.ArrayList;
 20  
 import java.util.List;
 21  
 
 22  
 import org.apache.log4j.Logger;
 23  
 import org.kuali.rice.kew.dto.ActionItemDTO;
 24  
 import org.kuali.rice.kew.dto.ActionRequestDTO;
 25  
 import org.kuali.rice.kew.dto.ActionTakenDTO;
 26  
 import org.kuali.rice.kew.dto.DocumentSearchCriteriaDTO;
 27  
 import org.kuali.rice.kew.dto.DocumentSearchResultDTO;
 28  
 import org.kuali.rice.kew.dto.ReportCriteriaDTO;
 29  
 import org.kuali.rice.kew.exception.WorkflowException;
 30  
 import org.kuali.rice.kew.service.WorkflowInfo;
 31  
 import org.kuali.rice.kew.util.KEWConstants;
 32  
 import org.kuali.rice.krad.workflow.service.KualiWorkflowInfo;
 33  
 import org.springframework.transaction.annotation.Transactional;
 34  
 
 35  
 
 36  
 @SuppressWarnings("deprecation")
 37  
 @Transactional
 38  
 public class KualiWorkflowInfoImpl implements KualiWorkflowInfo {
 39  
 
 40  0
     private static final Logger LOG = Logger.getLogger(KualiWorkflowInfoImpl.class);
 41  
     
 42  
     private WorkflowInfo workflowInfo;
 43  
 
 44  0
     public KualiWorkflowInfoImpl() {
 45  0
         workflowInfo = new WorkflowInfo();
 46  0
     }
 47  
 
 48  
     private WorkflowInfo getWorkflowUtility() {
 49  0
         return workflowInfo;
 50  
     }
 51  
 
 52  
     public String getNewResponsibilityId() throws WorkflowException {
 53  0
             return getWorkflowUtility().getNewResponsibilityId();
 54  
     }
 55  
 
 56  
     public ActionRequestDTO[] getActionRequests(String documentId) throws WorkflowException {
 57  0
             return getWorkflowUtility().getActionRequests(documentId);
 58  
     }
 59  
 
 60  
     public ActionRequestDTO[] getActionRequests(String documentId, String nodeName, String principalId) throws WorkflowException {
 61  0
             return getWorkflowUtility().getActionRequests(documentId, nodeName, principalId);
 62  
     }
 63  
 
 64  
     public ActionTakenDTO[] getActionsTaken(String documentId) throws WorkflowException {
 65  0
             return getWorkflowUtility().getActionsTaken(documentId);
 66  
     }
 67  
   
 68  
     public void reResolveRoleByDocTypeName(String documentTypeName, String roleName, String qualifiedRoleNameLabel) throws WorkflowException {
 69  0
             getWorkflowUtility().reResolveRoleByDocTypeName(documentTypeName, roleName, qualifiedRoleNameLabel);
 70  0
     }
 71  
 
 72  
     public void reResolveRoleByDocumentId(String documentId, String roleName, String qualifiedRoleNameLabel) throws WorkflowException {
 73  0
             getWorkflowUtility().reResolveRoleByDocumentId(documentId, roleName, qualifiedRoleNameLabel);
 74  0
     }
 75  
         
 76  
     /**
 77  
      * @deprecated
 78  
      * @see org.kuali.rice.krad.workflow.service.KualiWorkflowInfo#documentWillHaveAtLeastOneActionRequest(org.kuali.rice.kew.dto.ReportCriteriaDTO, java.lang.String[])
 79  
      */
 80  
     public boolean documentWillHaveAtLeastOneActionRequest(ReportCriteriaDTO reportCriteriaDTO, String[] actionRequestedCodes) throws WorkflowException {
 81  0
         return documentWillHaveAtLeastOneActionRequest(reportCriteriaDTO, actionRequestedCodes, false);
 82  
     }
 83  
 
 84  
     /**
 85  
      * @see org.kuali.rice.krad.workflow.service.KualiWorkflowInfo#documentWillHaveAtLeastOneActionRequest(org.kuali.rice.kew.dto.ReportCriteriaDTO, java.lang.String[], boolean)
 86  
      */
 87  
     public boolean documentWillHaveAtLeastOneActionRequest(ReportCriteriaDTO reportCriteriaDTO, String[] actionRequestedCodes, boolean ignoreCurrentlyActiveRequests) throws WorkflowException {
 88  0
             return getWorkflowUtility().documentWillHaveAtLeastOneActionRequest(reportCriteriaDTO, actionRequestedCodes, ignoreCurrentlyActiveRequests);
 89  
     }
 90  
     
 91  
     /**
 92  
      * @see org.kuali.rice.krad.workflow.service.KualiWorkflowInfo#getApprovalRequestedUsers(java.lang.String)
 93  
      */
 94  
     public List<String> getApprovalRequestedUsers(String documentId) throws WorkflowException {
 95  0
             ActionItemDTO[] actionItemVOs = getWorkflowUtility().getActionItems(documentId, new String[]{KEWConstants.ACTION_REQUEST_COMPLETE_REQ, KEWConstants.ACTION_REQUEST_APPROVE_REQ});
 96  0
             List<String> users = new ArrayList<String>();
 97  0
             for (int i = 0; i < actionItemVOs.length; i++) {
 98  0
                     ActionItemDTO actionItemVO = actionItemVOs[i];
 99  0
                     users.add(actionItemVO.getPrincipalId());
 100  
             }
 101  0
             return users;
 102  
     }
 103  
 
 104  
     public DocumentSearchResultDTO performDocumentSearch(DocumentSearchCriteriaDTO criteriaVO) throws WorkflowException {
 105  0
             return getWorkflowUtility().performDocumentSearch(criteriaVO);
 106  
     }
 107  
 
 108  
     public DocumentSearchResultDTO performDocumentSearch(String principalId, DocumentSearchCriteriaDTO criteriaVO) throws RemoteException, WorkflowException {
 109  0
             return getWorkflowUtility().performDocumentSearch(principalId, criteriaVO);
 110  
     }
 111  
     
 112  
 }