Coverage Report - org.kuali.student.lum.kim.permission.type.TranslatedDocumentTypePermissionTypeServiceImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
TranslatedDocumentTypePermissionTypeServiceImpl
0%
0/19
0%
0/2
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 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.Map;
 25  
 import java.util.Set;
 26  
 
 27  
 import org.kuali.rice.kim.api.KimConstants;
 28  
 import org.kuali.rice.krad.kim.DocumentTypePermissionTypeServiceImpl;
 29  
 import org.kuali.student.common.rice.StudentIdentityConstants;
 30  
 import org.kuali.student.lum.kim.KimQualificationHelper;
 31  
 
 32  
 /**
 33  
  * Permission Type to be used for
 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  
                 // add document number as one required attribute set
 42  0
                 List<String> listOne = new ArrayList<String>();
 43  0
                 listOne.add( KimConstants.AttributeConstants.DOCUMENT_NUMBER );
 44  0
                 attributes.add(listOne);
 45  
                 // add document type name and KEW application id as one required attribute set
 46  0
                 List<String> listTwo = new ArrayList<String>();
 47  0
                 listTwo.add( KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME );
 48  0
                 listTwo.add( StudentIdentityConstants.QUALIFICATION_KEW_OBJECT_ID );
 49  0
                 attributes.add(listTwo);
 50  
                 // add each proposal reference type as a required attribute set
 51  0
                 for (String proposalReferenceType : StudentIdentityConstants.QUALIFICATION_PROPOSAL_ID_REF_TYPES) {
 52  0
                 List<String> tempList = new ArrayList<String>();
 53  0
                 tempList.add( proposalReferenceType );
 54  0
                 attributes.add(tempList);
 55  0
         }
 56  
 //                List<String> listFour = new ArrayList<String>();
 57  
 //                listFour.add( StudentIdentityConstants.QUALIFICATION_KEW_OBJECT_ID );
 58  
 //                listFour.add( StudentIdentityConstants.QUALIFICATION_KEW_OBJECT_TYPE );
 59  
 //                attributes.add(listFour);
 60  
 
 61  0
         }
 62  
 
 63  
 //        @Override
 64  
     public Map<String,String> translateInputAttributeSet(Map<String,String> qualification) {
 65  0
                 return KimQualificationHelper.translateInputAttributeSet(qualification);
 66  
         }
 67  
 
 68  
         @Override
 69  
     protected void validateRequiredAttributesAgainstReceived(Map<String,String> receivedAttributes) {
 70  
                 // first check KS required attributes
 71  0
             KimQualificationHelper.validateRequiredAttributesAgainstReceived(attributes, receivedAttributes, isCheckRequiredAttributes(), COMMA_SEPARATOR);
 72  
             // if required KS attributes pass... test parent class required attributes
 73  0
             super.validateRequiredAttributesAgainstReceived(receivedAttributes);
 74  0
     }
 75  
 
 76  
 }