Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RoutingRuleDelegationMaintainableBusRule |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2007-2009 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.document; | |
17 | ||
18 | import org.kuali.rice.kew.rule.RuleBaseValues; | |
19 | import org.kuali.rice.kew.rule.RuleDelegation; | |
20 | import org.kuali.rice.kns.document.MaintenanceDocument; | |
21 | ||
22 | /** | |
23 | * This is a description of what this class does - Garey don't forget to fill this in. | |
24 | * | |
25 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
26 | * | |
27 | */ | |
28 | 0 | public class RoutingRuleDelegationMaintainableBusRule extends RoutingRuleMaintainableBusRule |
29 | { | |
30 | ||
31 | // Name of the section in the xml file. | |
32 | protected static final String PERSON_RESP_SECTION = "delegationRuleBaseValues.personResponsibilities"; | |
33 | // Name of the section in the xml file. | |
34 | protected static final String GROUP_RESP_SECTION = "delegationRuleBaseValues.groupResponsibilities"; | |
35 | ||
36 | /** | |
37 | * Returns the new RuleBaseValues business object. Overrides the base | |
38 | * class method. This business object has a different location | |
39 | * of the RuleBaseValues. | |
40 | */ | |
41 | protected RuleBaseValues getRuleBaseValues(MaintenanceDocument document) { | |
42 | 0 | return this.getBusObject(document).getDelegationRuleBaseValues(); |
43 | } | |
44 | ||
45 | protected RuleDelegation getBusObject(MaintenanceDocument document){ | |
46 | 0 | return (RuleDelegation)document.getNewMaintainableObject().getBusinessObject(); |
47 | } | |
48 | ||
49 | /** | |
50 | * Returns the old RuleBaseValues business object. Overrides the base | |
51 | * class method. This business object has a different location | |
52 | * of the RuleBaseValues. | |
53 | */ | |
54 | protected RuleBaseValues getOldRuleBaseValues(MaintenanceDocument document) { | |
55 | 0 | return this.getOldBusObject(document).getDelegationRuleBaseValues(); |
56 | } | |
57 | ||
58 | protected RuleDelegation getOldBusObject(MaintenanceDocument document){ | |
59 | 0 | return (RuleDelegation)document.getOldMaintainableObject().getBusinessObject(); |
60 | } | |
61 | ||
62 | /** | |
63 | * This overridden method returns the person section name for the delegation doc | |
64 | * | |
65 | * @see org.kuali.rice.kew.document.RoutingRuleMaintainableBusRule#getPersonSectionName() | |
66 | */ | |
67 | @Override | |
68 | protected String getPersonSectionName() { | |
69 | 0 | return PERSON_RESP_SECTION; |
70 | } | |
71 | ||
72 | /** | |
73 | * This overridden method returns the group section name for the delegation doc | |
74 | * | |
75 | * @see org.kuali.rice.kew.document.RoutingRuleMaintainableBusRule#getGroupSectionName() | |
76 | */ | |
77 | @Override | |
78 | protected String getGroupSectionName() { | |
79 | 0 | return GROUP_RESP_SECTION; |
80 | } | |
81 | ||
82 | } |