Coverage Report - org.kuali.student.enrollment.classI.lpr.service.LuiPersonRelationServiceDecorator
 
Classes in this File Line Coverage Branch Coverage Complexity
LuiPersonRelationServiceDecorator
0%
0/73
0%
0/40
2.935
 
 1  
 /*
 2  
  * Copyright 2011 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.osedu.org/licenses/ECL-2.0
 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.student.enrollment.classI.lpr.service;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 
 21  
 import org.kuali.student.enrollment.classI.lpr.dto.LuiPersonRelationInfo;
 22  
 import org.kuali.student.r2.common.datadictionary.dto.DictionaryEntryInfo;
 23  
 import org.kuali.student.r2.common.dto.ContextInfo;
 24  
 import org.kuali.student.r2.common.dto.CriteriaInfo;
 25  
 import org.kuali.student.r2.common.dto.StateInfo;
 26  
 import org.kuali.student.r2.common.dto.StatusInfo;
 27  
 import org.kuali.student.r2.common.dto.TypeInfo;
 28  
 import org.kuali.student.r2.common.dto.TypeTypeRelationInfo;
 29  
 import org.kuali.student.r2.common.dto.ValidationResultInfo;
 30  
 import org.kuali.student.r2.common.exceptions.AlreadyExistsException;
 31  
 import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
 32  
 import org.kuali.student.r2.common.exceptions.DisabledIdentifierException;
 33  
 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
 34  
 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
 35  
 import org.kuali.student.r2.common.exceptions.MissingParameterException;
 36  
 import org.kuali.student.r2.common.exceptions.OperationFailedException;
 37  
 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
 38  
 import org.kuali.student.r2.common.exceptions.ReadOnlyException;
 39  
 import org.kuali.student.r2.common.exceptions.VersionMismatchException;
 40  
 
 41  
 
 42  
 
 43  
 
 44  
 
 45  
 /**
 46  
  * The base decorator for the {@link LuiPersonRelationService}- Other sub classes of this decorator only have to override the methods to which we want to add additional functionality
 47  
  * 
 48  
  * @author nwright
 49  
  */
 50  0
 public abstract class LuiPersonRelationServiceDecorator implements LuiPersonRelationService{
 51  
 
 52  
 
 53  
         protected LuiPersonRelationService nextDecorator;
 54  
                     
 55  
     public LuiPersonRelationService getNextDecorator() {
 56  0
         return nextDecorator;
 57  
     }
 58  
    
 59  
     public void setNextDecorator(LuiPersonRelationService nextDecorator) {
 60  0
         this.nextDecorator = nextDecorator;
 61  0
     }
 62  
 
 63  
 
 64  
     @Override
 65  
     public List<ValidationResultInfo> validateLuiPersonRelation(String validationType, LuiPersonRelationInfo luiPersonRelationInfo, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 66  0
         if(null!= nextDecorator) {
 67  0
             return nextDecorator.validateLuiPersonRelation(validationType, luiPersonRelationInfo, context);
 68  
         } else {
 69  0
             throw new OperationFailedException("Decorators not properly configured");
 70  
         }        
 71  
     }
 72  
 
 73  
 
 74  
     @Override
 75  
     public LuiPersonRelationInfo updateLuiPersonRelation(String luiPersonRelationId, LuiPersonRelationInfo luiPersonRelationInfo, ContextInfo context) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, ReadOnlyException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
 76  0
             if(null!= nextDecorator) {
 77  0
             return nextDecorator.updateLuiPersonRelation(luiPersonRelationId, luiPersonRelationInfo, context);
 78  
         } else {
 79  0
             throw new OperationFailedException("Decorators not properly configured");
 80  
         }
 81  
     }
 82  
 
 83  
     @Override
 84  
     public List<String> searchForLuiPersonRelationIds(CriteriaInfo criteria, ContextInfo context) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 85  0
             if(null!= nextDecorator) {
 86  0
                     return nextDecorator.searchForLuiPersonRelationIds(criteria, context);
 87  
         } else {
 88  0
             throw new OperationFailedException("Decorators not properly configured");
 89  
         }
 90  
     
 91  
     }
 92  
 
 93  
     @Override
 94  
     public List<String> findPersonIdsRelatedToLui(String luiId, String luiPersonRelationTypeKey, String relationState, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 95  0
             if(null!= nextDecorator) {
 96  0
                 return nextDecorator.findPersonIdsRelatedToLui(luiId, luiPersonRelationTypeKey, relationState, context);
 97  
         } else {
 98  0
             throw new OperationFailedException("Decorators not properly configured");
 99  
         }
 100  
     }
 101  
 
 102  
     @Override
 103  
     public List<LuiPersonRelationInfo> findLuiPersonRelationsForPerson(String personId, ContextInfo context) throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 104  0
             if(null!= nextDecorator) {
 105  0
                     return nextDecorator.findLuiPersonRelationsForPerson(personId, context);
 106  
         } else {
 107  0
             throw new OperationFailedException("Decorators not properly configured");
 108  
         }
 109  
     }
 110  
 
 111  
     @Override
 112  
     public List<LuiPersonRelationInfo> findLuiPersonRelationsForLui(String luiId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 113  0
               if(null!= nextDecorator) {
 114  0
                 return nextDecorator.findLuiPersonRelationsForLui(luiId, context);
 115  
         } else {
 116  0
             throw new OperationFailedException("Decorators not properly configured");
 117  
         }
 118  
     }
 119  
 
 120  
     @Override
 121  
     public List<LuiPersonRelationInfo> findLuiPersonRelationsByIdList(List<String> luiPersonRelationIdList, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 122  0
                if(null!= nextDecorator) {
 123  0
                   return nextDecorator.findLuiPersonRelationsByIdList(luiPersonRelationIdList, context);
 124  
         } else {
 125  0
             throw new OperationFailedException("Decorators not properly configured");
 126  
         }
 127  
     }
 128  
 
 129  
     @Override
 130  
     public List<LuiPersonRelationInfo> findLuiPersonRelations(String personId, String luiId, ContextInfo context) throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 131  0
                if(null!= nextDecorator) {
 132  0
                        return nextDecorator.findLuiPersonRelations(personId, luiId, context);
 133  
         } else {
 134  0
             throw new OperationFailedException("Decorators not properly configured");
 135  
         }
 136  
             
 137  
     }
 138  
 
 139  
     @Override
 140  
     public List<String> findLuiPersonRelationIdsForLui(String luiId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 141  0
                if(null!= nextDecorator) {
 142  0
                        return nextDecorator.findLuiPersonRelationIdsForLui(luiId, context);
 143  
         } else {
 144  0
             throw new OperationFailedException("Decorators not properly configured");
 145  
         }
 146  
     }
 147  
 
 148  
     @Override
 149  
     public List<String> findLuiPersonRelationIds(String personId, String luiId, ContextInfo context) throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 150  0
                if(null!= nextDecorator) {
 151  0
                        return nextDecorator.findLuiPersonRelationIds(personId, luiId, context);
 152  
         } else {
 153  0
             throw new OperationFailedException("Decorators not properly configured");
 154  
         }
 155  
             
 156  
     }
 157  
 
 158  
     @Override
 159  
     public List<String> findLuiIdsRelatedToPerson(String personId, String luiPersonRelationTypeKey, String relationState, ContextInfo context) throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 160  0
                if(null!= nextDecorator) {
 161  0
                        return nextDecorator.findLuiIdsRelatedToPerson(personId, luiPersonRelationTypeKey, relationState, context);
 162  
         } else {
 163  0
             throw new OperationFailedException("Decorators not properly configured");
 164  
         }
 165  
     }
 166  
 
 167  
 
 168  
     @Override
 169  
     public List<String> findAllValidLuisForPerson(String personId, String luiPersonRelationTypeKey, String relationState, String atpId, ContextInfo context) throws DoesNotExistException, DisabledIdentifierException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 170  0
               if(null!= nextDecorator) {
 171  0
                          return nextDecorator.findAllValidLuisForPerson(personId, luiPersonRelationTypeKey, relationState, atpId, context);
 172  
         } else {
 173  0
             throw new OperationFailedException("Decorators not properly configured");
 174  
         }
 175  
     }
 176  
 
 177  
    
 178  
     @Override
 179  
     public StatusInfo deleteLuiPersonRelation(String luiPersonRelationId, ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 180  0
              if(null!= nextDecorator) {
 181  0
                         return nextDecorator.deleteLuiPersonRelation(luiPersonRelationId, context);
 182  
         } else {
 183  0
             throw new OperationFailedException("Decorators not properly configured");
 184  
         }
 185  
     }
 186  
 
 187  
     @Override
 188  
     public String createLuiPersonRelation(String personId, String luiId, String luiPersonRelationTypeKey, LuiPersonRelationInfo luiPersonRelationInfo, ContextInfo context)
 189  
       throws DataValidationErrorException, AlreadyExistsException, DoesNotExistException, DisabledIdentifierException, ReadOnlyException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 190  0
             if(null!= nextDecorator) {
 191  0
                     return nextDecorator.createLuiPersonRelation(personId, luiId, luiPersonRelationTypeKey, luiPersonRelationInfo, context);
 192  
         } else {
 193  0
             throw new OperationFailedException("Decorators not properly configured");
 194  
         }
 195  
     }
 196  
 
 197  
     @Override
 198  
     public List<String> createBulkRelationshipsForPerson(String personId, List<String> luiIdList, String relationState, String luiPersonRelationTypeKey, LuiPersonRelationInfo luiPersonRelationInfo, ContextInfo context) throws DataValidationErrorException, AlreadyExistsException, DoesNotExistException, DisabledIdentifierException, ReadOnlyException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 199  0
             if(null!= nextDecorator) {
 200  0
                 return nextDecorator.createBulkRelationshipsForPerson(personId, luiIdList, relationState, luiPersonRelationTypeKey, luiPersonRelationInfo, context);
 201  
         } else {
 202  0
             throw new OperationFailedException("Decorators not properly configured");
 203  
         }
 204  
     }
 205  
 
 206  
     @Override
 207  
     public List<String> createBulkRelationshipsForLui(String luiId,
 208  
       List<String> personIdList,
 209  
       String relationState, String luiPersonRelationTypeKey,
 210  
       LuiPersonRelationInfo luiPersonRelationInfo,
 211  
       ContextInfo context)
 212  
       throws DataValidationErrorException,
 213  
       AlreadyExistsException,
 214  
       DoesNotExistException,
 215  
       DisabledIdentifierException,
 216  
       ReadOnlyException,
 217  
       InvalidParameterException,
 218  
       MissingParameterException,
 219  
       OperationFailedException,
 220  
       PermissionDeniedException {
 221  0
                if(null!= nextDecorator) {
 222  0
             return nextDecorator.createBulkRelationshipsForLui(luiId, personIdList, relationState, luiPersonRelationTypeKey, luiPersonRelationInfo, context);
 223  
         } else {
 224  0
             throw new OperationFailedException("Decorators not properly configured");
 225  
         }
 226  
     }
 227  
 
 228  
     @Override
 229  
     public List<String> getDataDictionaryEntryKeys(ContextInfo context)
 230  
       throws OperationFailedException, MissingParameterException, PermissionDeniedException {
 231  0
                if(null!= nextDecorator) {
 232  0
                 return nextDecorator.getDataDictionaryEntryKeys(context);
 233  
                 } else {
 234  0
                         throw new OperationFailedException("Decorators not properly configured");
 235  
         }
 236  
 
 237  
 
 238  
     }
 239  
 
 240  
     @Override
 241  
     public DictionaryEntryInfo getDataDictionaryEntry(String entryKey, ContextInfo context) throws OperationFailedException, MissingParameterException, PermissionDeniedException, DoesNotExistException {
 242  
             
 243  0
             if(null!= nextDecorator) {
 244  0
                       return nextDecorator.getDataDictionaryEntry(entryKey, context);
 245  
         } else {
 246  0
                 throw new OperationFailedException("Decorators not properly configured");
 247  
         }
 248  
 
 249  
 
 250  
     }
 251  
     
 252  
     
 253  
     public List<TypeTypeRelationInfo> getTypeRelationsByOwnerType(String ownerTypeKey, String relationTypeKey,  ContextInfo context) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException{
 254  0
             if(null!= nextDecorator) {
 255  0
                     return nextDecorator.getTypeRelationsByOwnerType(ownerTypeKey, relationTypeKey, context);
 256  
         } else {
 257  0
                 throw new OperationFailedException("Decorators not properly configured");
 258  
         }
 259  
             
 260  
     }
 261  
     
 262  
     @Override
 263  
         public TypeInfo getType(String typeKey, ContextInfo context)
 264  
                         throws DoesNotExistException, InvalidParameterException,
 265  
                         MissingParameterException, OperationFailedException {
 266  
             
 267  0
             if(null!= nextDecorator) {
 268  0
                     return nextDecorator.getType(typeKey, context);
 269  
         } else {
 270  0
                 throw new OperationFailedException("Decorators not properly configured");
 271  
         }
 272  
     }
 273  
 
 274  
 
 275  
         @Override
 276  
         public List<TypeInfo> getTypesByRefObjectURI(String refObjectURI,
 277  
                         ContextInfo context) throws DoesNotExistException,
 278  
                         InvalidParameterException, MissingParameterException,
 279  
                         OperationFailedException {
 280  0
          return nextDecorator.getTypesByRefObjectURI(refObjectURI, context);
 281  
         }
 282  
 
 283  
 
 284  
         @Override
 285  
         public List<TypeInfo> getAllowedTypesForType(String ownerTypeKey,
 286  
                         String relatedRefObjectURI, ContextInfo context)
 287  
                         throws DoesNotExistException, InvalidParameterException,
 288  
                         MissingParameterException, OperationFailedException {
 289  0
                 return nextDecorator.getAllowedTypesForType(ownerTypeKey, relatedRefObjectURI, context);
 290  
                 }
 291  
 
 292  
         @Override
 293  
         public List<String> getProcessKeys(String typeKey, ContextInfo context)
 294  
                         throws DoesNotExistException, InvalidParameterException,
 295  
                         MissingParameterException, OperationFailedException {
 296  0
                 return nextDecorator.getProcessKeys(typeKey, context);
 297  
         }
 298  
 
 299  
         @Override
 300  
         public StateInfo getState(String processKey, String stateKey,
 301  
                         ContextInfo context) throws DoesNotExistException,
 302  
                         InvalidParameterException, MissingParameterException,
 303  
                         OperationFailedException {
 304  0
                 return nextDecorator.getState(processKey, stateKey, context); 
 305  
         }
 306  
 
 307  
         @Override
 308  
         public List<StateInfo> getStatesByProcess(String processKey,
 309  
                         ContextInfo context) throws DoesNotExistException,
 310  
                         InvalidParameterException, MissingParameterException,
 311  
                         OperationFailedException {
 312  0
                 return nextDecorator.getStatesByProcess(processKey, context);
 313  
         }
 314  
 
 315  
         @Override
 316  
         public List<StateInfo> getInitialValidStates(String processKey,
 317  
                         ContextInfo context) throws DoesNotExistException,
 318  
                         InvalidParameterException, MissingParameterException,
 319  
                         OperationFailedException {
 320  0
                 return nextDecorator.getInitialValidStates(processKey, context);
 321  
         }
 322  
 
 323  
         @Override
 324  
         public StateInfo getNextHappyState(String processKey,
 325  
                         String currentStateKey, ContextInfo context)
 326  
                         throws DoesNotExistException, InvalidParameterException,
 327  
                         MissingParameterException, OperationFailedException {
 328  0
                 return nextDecorator.getNextHappyState(processKey, currentStateKey, context);
 329  
         }
 330  
 
 331  
         @Override
 332  
         public LuiPersonRelationInfo fetchLuiPersonRelation(
 333  
                         String luiPersonRelationId, ContextInfo context)
 334  
                         throws DoesNotExistException, InvalidParameterException,
 335  
                         MissingParameterException, OperationFailedException,
 336  
                         PermissionDeniedException {
 337  0
                 return nextDecorator.fetchLuiPersonRelation(luiPersonRelationId, context);
 338  
         }
 339  
 
 340  
         @Override
 341  
         public List<String> findLuiPersonRelationIdsForPerson(String personId,
 342  
                         ContextInfo context) throws DoesNotExistException,
 343  
                         DisabledIdentifierException, InvalidParameterException,
 344  
                         MissingParameterException, OperationFailedException,
 345  
                         PermissionDeniedException {
 346  0
                 return nextDecorator.findLuiPersonRelationIdsForPerson(personId,context);
 347  
                 
 348  
         }
 349  
 
 350  
 }
 351