1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.service.impl; |
17 | |
|
18 | |
import org.apache.commons.lang.StringUtils; |
19 | |
import org.kuali.rice.kim.api.responsibility.Responsibility; |
20 | |
import org.kuali.rice.kim.impl.responsibility.KimResponsibilityTypeService; |
21 | |
import org.kuali.rice.kim.util.KimConstants; |
22 | |
|
23 | |
import java.util.Iterator; |
24 | |
import java.util.List; |
25 | |
import java.util.Map; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | 0 | public class ReviewResponsibilityTypeServiceImpl extends DocumentTypeResponsibilityTypeServiceImpl implements KimResponsibilityTypeService { |
31 | |
{ |
32 | 0 | exactMatchStringAttributeName = KimConstants.AttributeConstants.ROUTE_NODE_NAME; |
33 | 0 | requiredAttributes.add( KimConstants.AttributeConstants.ROUTE_NODE_NAME ); |
34 | 0 | } |
35 | |
|
36 | |
@Override |
37 | |
protected List<Responsibility> performResponsibilityMatches( |
38 | |
Map<String, String> requestedDetails, |
39 | |
List<Responsibility> responsibilitiesList) { |
40 | |
|
41 | 0 | List<Responsibility> baseMatches = super.performResponsibilityMatches(requestedDetails, |
42 | |
responsibilitiesList); |
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | 0 | Iterator<Responsibility> respIter = baseMatches.iterator(); |
48 | 0 | while ( respIter.hasNext() ) { |
49 | 0 | Map<String, String> respDetails = respIter.next().getAttributes(); |
50 | 0 | if ( respDetails.containsKey( KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER ) && StringUtils.isNotBlank( respDetails.get(KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER) ) ) { |
51 | 0 | if ( !requestedDetails.containsKey( KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER ) |
52 | |
|| !StringUtils.equals( respDetails.get(KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER) |
53 | |
, requestedDetails.get(KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER))) { |
54 | 0 | respIter.remove(); |
55 | |
} |
56 | |
} |
57 | 0 | } |
58 | 0 | return baseMatches; |
59 | |
} |
60 | |
} |