Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ResponsibilityChangeProcessor |
|
| 2.0;2 |
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.responsibility; | |
17 | ||
18 | import java.util.HashSet; | |
19 | import java.util.Set; | |
20 | ||
21 | import org.kuali.rice.kew.messaging.ParameterTranslator; | |
22 | import org.kuali.rice.kew.service.KEWServiceLocator; | |
23 | import org.kuali.rice.ksb.messaging.service.KSBXMLService; | |
24 | ||
25 | /** | |
26 | * This is a description of what this class does - Garey don't forget to fill this in. | |
27 | * | |
28 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
29 | * | |
30 | */ | |
31 | 0 | public class ResponsibilityChangeProcessor implements KSBXMLService { |
32 | ||
33 | /** | |
34 | * This overridden method ... | |
35 | * | |
36 | * @see org.kuali.rice.ksb.messaging.service.KSBXMLService#invoke(java.lang.String) | |
37 | */ | |
38 | public void invoke(String message) throws Exception { | |
39 | 0 | ParameterTranslator translator = new ParameterTranslator(message); |
40 | 0 | String[] parameters = translator.getParameters(); |
41 | ||
42 | 0 | Set<Long> respIds = new HashSet<Long>(); |
43 | ||
44 | 0 | for(String parameter: parameters){ |
45 | 0 | respIds.add(new Long(parameter)); |
46 | } | |
47 | ||
48 | 0 | KEWServiceLocator.getActionRequestService().updateActionRequestsForResponsibilityChange(respIds); |
49 | ||
50 | 0 | } |
51 | ||
52 | public static String getResponsibilityChangeContents(Set<String> responsibilities){ | |
53 | 0 | ParameterTranslator translator = new ParameterTranslator(); |
54 | 0 | for(String resp: responsibilities){ |
55 | 0 | translator.addParameter(resp); |
56 | } | |
57 | 0 | return translator.getUntranslatedString(); |
58 | } | |
59 | ||
60 | ||
61 | } |