| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| BrokenMessageDeliverer |
|
| 1.2857142857142858;1.286 |
| 1 | /* | |
| 2 | * Copyright 2007-2008 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.kcb.deliverer.impl; | |
| 17 | ||
| 18 | import java.util.HashMap; | |
| 19 | import java.util.LinkedHashMap; | |
| 20 | ||
| 21 | import org.kuali.rice.kcb.bo.MessageDelivery; | |
| 22 | import org.kuali.rice.kcb.deliverer.MessageDeliverer; | |
| 23 | import org.kuali.rice.kcb.exception.ErrorList; | |
| 24 | import org.kuali.rice.kcb.exception.MessageDeliveryException; | |
| 25 | import org.kuali.rice.kcb.exception.MessageDismissalException; | |
| 26 | ||
| 27 | /** | |
| 28 | * A message deliverer that just throws runtime exceptions | |
| 29 | * | |
| 30 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 31 | */ | |
| 32 | 0 | public class BrokenMessageDeliverer implements MessageDeliverer { |
| 33 | ||
| 34 | /** | |
| 35 | * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#deliver(org.kuali.rice.kcb.bo.MessageDelivery) | |
| 36 | */ | |
| 37 | public void deliver(MessageDelivery messageDelivery) throws MessageDeliveryException { | |
| 38 | 0 | throw new RuntimeException("Intentional exception on deliver"); |
| 39 | } | |
| 40 | ||
| 41 | /** | |
| 42 | * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#dismiss(org.kuali.rice.kcb.bo.MessageDelivery, java.lang.String, java.lang.String) | |
| 43 | */ | |
| 44 | public void dismiss(MessageDelivery messageDelivery, String user, String cause) throws MessageDismissalException { | |
| 45 | 0 | throw new RuntimeException("Intentional exception on dismiss"); |
| 46 | } | |
| 47 | ||
| 48 | /** | |
| 49 | * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#getDescription() | |
| 50 | */ | |
| 51 | public String getDescription() { | |
| 52 | // TODO arh14 - THIS METHOD NEEDS JAVADOCS | |
| 53 | 0 | return null; |
| 54 | } | |
| 55 | ||
| 56 | /** | |
| 57 | * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#getName() | |
| 58 | */ | |
| 59 | public String getName() { | |
| 60 | 0 | return "BrokenMessageDeliverer"; |
| 61 | } | |
| 62 | ||
| 63 | /** | |
| 64 | * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#getPreferenceKeys() | |
| 65 | */ | |
| 66 | public LinkedHashMap<String, String> getPreferenceKeys() { | |
| 67 | 0 | return new LinkedHashMap<String, String>(0); |
| 68 | } | |
| 69 | ||
| 70 | /** | |
| 71 | * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#getTitle() | |
| 72 | */ | |
| 73 | public String getTitle() { | |
| 74 | 0 | return "Broken Message Deliverer"; |
| 75 | } | |
| 76 | ||
| 77 | /** | |
| 78 | * @see org.kuali.rice.kcb.deliverer.MessageDeliverer#validatePreferenceValues(java.util.HashMap) | |
| 79 | */ | |
| 80 | public void validatePreferenceValues(HashMap<String, String> prefs) throws ErrorList { | |
| 81 | 0 | } |
| 82 | } |