Coverage Report - org.kuali.rice.kew.impl.mail.ImmediateEmailReminderQueueImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
ImmediateEmailReminderQueueImpl
0%
0/13
0%
0/6
2.333
 
 1  
 /**
 2  
  * Copyright 2005-2011 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.kew.impl.mail;
 17  
 
 18  
 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
 19  
 import org.kuali.rice.kew.api.action.ActionItem;
 20  
 import org.kuali.rice.kew.api.mail.ImmediateEmailReminderQueue;
 21  
 import org.kuali.rice.kew.mail.service.ActionListEmailService;
 22  
 import org.kuali.rice.kew.service.KEWServiceLocator;
 23  
 
 24  
 /**
 25  
  * Reference implementation of an {@code ImmediateEmailReminderQueue}.
 26  
  * 
 27  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 28  
  */
 29  0
 public class ImmediateEmailReminderQueueImpl implements ImmediateEmailReminderQueue {
 30  
 
 31  0
     private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger
 32  
             .getLogger(ImmediateEmailReminderQueueImpl.class);
 33  
 
 34  
     private ActionListEmailService actionListEmailService;
 35  
 
 36  
     public void sendReminder(ActionItem actionItem, Boolean skipOnApprovals) {
 37  0
         if (actionItem == null) {
 38  0
                         throw new RiceIllegalArgumentException("actionItem was null");
 39  
                 }
 40  
 
 41  0
         if (skipOnApprovals == null) {
 42  0
             skipOnApprovals = false;
 43  
                 }
 44  
 
 45  0
         getActionListEmailService().sendImmediateReminder(actionItem, skipOnApprovals);
 46  0
     }
 47  
 
 48  
     private ActionListEmailService getActionListEmailService() {
 49  0
         if (actionListEmailService == null)
 50  0
             actionListEmailService = (ActionListEmailService) KEWServiceLocator.getService(KEWServiceLocator.ACTION_LIST_EMAIL_SERVICE);
 51  
     
 52  0
         return actionListEmailService;
 53  
     }
 54  
     
 55  
     /**
 56  
      * @param actionListEmailService the actionListEmailService to set
 57  
      */
 58  
     public void setActionListEmailService(ActionListEmailService actionListEmailService) {
 59  0
         this.actionListEmailService = actionListEmailService;
 60  0
     }
 61  
     
 62  
 }