1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package org.kuali.student.lum.kim.permission.type; |
20 | |
|
21 | |
import java.util.ArrayList; |
22 | |
import java.util.HashSet; |
23 | |
import java.util.List; |
24 | |
import java.util.Set; |
25 | |
|
26 | |
import org.kuali.rice.kim.bo.impl.KimAttributes; |
27 | |
import org.kuali.rice.kim.bo.types.dto.AttributeSet; |
28 | |
import org.kuali.rice.kns.service.impl.DocumentTypePermissionTypeServiceImpl; |
29 | |
import org.kuali.student.common.rice.StudentIdentityConstants; |
30 | |
import org.kuali.student.lum.kim.KimQualificationHelper; |
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | 0 | public class TranslatedDocumentTypePermissionTypeServiceImpl extends DocumentTypePermissionTypeServiceImpl { |
37 | |
|
38 | 0 | private static Set<List<String>> attributes = new HashSet<List<String>>(); |
39 | |
|
40 | |
{ |
41 | 0 | checkRequiredAttributes = true; |
42 | |
|
43 | 0 | List<String> listOne = new ArrayList<String>(); |
44 | 0 | listOne.add( KimAttributes.DOCUMENT_NUMBER ); |
45 | 0 | attributes.add(listOne); |
46 | |
|
47 | 0 | List<String> listTwo = new ArrayList<String>(); |
48 | 0 | listTwo.add( KimAttributes.DOCUMENT_TYPE_NAME ); |
49 | 0 | listTwo.add( StudentIdentityConstants.QUALIFICATION_KEW_OBJECT_ID ); |
50 | 0 | attributes.add(listTwo); |
51 | |
|
52 | 0 | for (String proposalReferenceType : StudentIdentityConstants.QUALIFICATION_PROPOSAL_ID_REF_TYPES) { |
53 | 0 | List<String> tempList = new ArrayList<String>(); |
54 | 0 | tempList.add( proposalReferenceType ); |
55 | 0 | attributes.add(tempList); |
56 | 0 | } |
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | 0 | } |
63 | |
|
64 | |
@Override |
65 | |
public AttributeSet translateInputAttributeSet(AttributeSet qualification) { |
66 | 0 | return KimQualificationHelper.translateInputAttributeSet(super.translateInputAttributeSet(qualification)); |
67 | |
} |
68 | |
|
69 | |
@Override |
70 | |
protected void validateRequiredAttributesAgainstReceived(AttributeSet receivedAttributes) { |
71 | |
|
72 | 0 | KimQualificationHelper.validateRequiredAttributesAgainstReceived(attributes, receivedAttributes, isCheckRequiredAttributes(), COMMA_SEPARATOR); |
73 | |
|
74 | 0 | super.validateRequiredAttributesAgainstReceived(receivedAttributes); |
75 | 0 | } |
76 | |
|
77 | |
} |