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 java.util.Iterator; |
19 | |
import java.util.List; |
20 | |
import java.util.Map; |
21 | |
|
22 | |
import org.apache.commons.lang.StringUtils; |
23 | |
import org.kuali.rice.core.util.AttributeSet; |
24 | |
import org.kuali.rice.kim.api.responsibility.Responsibility; |
25 | |
import org.kuali.rice.kim.impl.responsibility.KimResponsibilityTypeService; |
26 | |
import org.kuali.rice.kim.util.KimConstants; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | 0 | public class ReviewResponsibilityTypeServiceImpl extends DocumentTypeResponsibilityTypeServiceImpl implements KimResponsibilityTypeService { |
32 | |
{ |
33 | 0 | exactMatchStringAttributeName = KimConstants.AttributeConstants.ROUTE_NODE_NAME; |
34 | 0 | requiredAttributes.add( KimConstants.AttributeConstants.ROUTE_NODE_NAME ); |
35 | 0 | } |
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
@Override |
43 | |
protected List<Responsibility> performResponsibilityMatches( |
44 | |
AttributeSet requestedDetails, |
45 | |
List<Responsibility> responsibilitiesList) { |
46 | |
|
47 | 0 | List<Responsibility> baseMatches = super.performResponsibilityMatches(requestedDetails, |
48 | |
responsibilitiesList); |
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | 0 | Iterator<Responsibility> respIter = baseMatches.iterator(); |
54 | 0 | while ( respIter.hasNext() ) { |
55 | 0 | Map<String, String> respDetails = respIter.next().getAttributes().toMap(); |
56 | 0 | if ( respDetails.containsKey( KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER ) && StringUtils.isNotBlank( respDetails.get(KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER) ) ) { |
57 | 0 | if ( !requestedDetails.containsKey( KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER ) |
58 | |
|| !StringUtils.equals( respDetails.get(KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER) |
59 | |
, requestedDetails.get(KimConstants.AttributeConstants.QUALIFIER_RESOLVER_PROVIDED_IDENTIFIER))) { |
60 | 0 | respIter.remove(); |
61 | |
} |
62 | |
} |
63 | 0 | } |
64 | 0 | return baseMatches; |
65 | |
} |
66 | |
} |