Coverage Report - org.kuali.student.r2.core.document.service.DocumentServiceDecorator
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentServiceDecorator
0%
0/24
0%
0/2
1.1
 
 1  
 /*
 2  
  * Copyright 2011 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  
 package org.kuali.student.r2.core.document.service;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.ContextInfo;
 19  
 import org.kuali.student.r2.common.dto.StatusInfo;
 20  
 import org.kuali.student.r2.common.dto.ValidationResultInfo;
 21  
 import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
 22  
 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
 23  
 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
 24  
 import org.kuali.student.r2.common.exceptions.MissingParameterException;
 25  
 import org.kuali.student.r2.common.exceptions.OperationFailedException;
 26  
 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
 27  
 import org.kuali.student.r2.common.exceptions.ReadOnlyException;
 28  
 import org.kuali.student.r2.common.exceptions.VersionMismatchException;
 29  
 import org.kuali.student.r2.core.document.dto.DocumentCategoryInfo;
 30  
 import org.kuali.student.r2.core.document.dto.DocumentInfo;
 31  
 import org.kuali.student.r2.core.document.dto.RefDocRelationInfo;
 32  
 
 33  
 import javax.jws.WebParam;
 34  
 import java.util.List;
 35  
 
 36  
 /**
 37  
  * Refer to service contract javadoc
 38  
  *
 39  
  * @Version 2.0
 40  
  * @Author Sri komandur@uw.edu
 41  
  *
 42  
  */
 43  0
 public class DocumentServiceDecorator implements DocumentService {
 44  
 
 45  
     private DocumentService nextDecorator;
 46  
 
 47  
     public DocumentService getNextDecorator() throws OperationFailedException {
 48  0
         if (null == nextDecorator) {
 49  0
             throw new OperationFailedException("Misconfigured application: nextDecorator is null");
 50  
         }
 51  0
         return nextDecorator;
 52  
     }
 53  
 
 54  
     public void setNextDecorator(DocumentService nextDecorator) {
 55  0
         this.nextDecorator = nextDecorator;
 56  0
     }
 57  
 
 58  
     @Override
 59  
     public DocumentInfo getDocument(@WebParam(name = "documentId") String documentId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 60  0
         return getNextDecorator().getDocument(documentId, contextInfo);
 61  
     }
 62  
 
 63  
     @Override
 64  
     public List<DocumentInfo> getDocumentsByIds(@WebParam(name = "documentIds") List<String> documentIds, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 65  0
         return getNextDecorator().getDocumentsByIds(documentIds, contextInfo);
 66  
     }
 67  
 
 68  
     @Override
 69  
     public List<ValidationResultInfo> validateDocument(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "documentInfo") DocumentInfo documentInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 70  0
         return getNextDecorator().validateDocument(validationTypeKey, documentInfo, contextInfo);
 71  
     }
 72  
 
 73  
     @Override
 74  
     public DocumentInfo createDocument(@WebParam(name = "documentTypeKey") String documentTypeKey, @WebParam(name = "documentCategoryKey") String documentCategoryKey, @WebParam(name = "documentInfo") DocumentInfo documentInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException {
 75  0
         return getNextDecorator().createDocument(documentTypeKey, documentCategoryKey, documentInfo, contextInfo);
 76  
     }
 77  
 
 78  
     @Override
 79  
     public DocumentInfo updateDocument(@WebParam(name = "documentId") String documentId, @WebParam(name = "documentInfo") DocumentInfo documentInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException {
 80  0
         return getNextDecorator().updateDocument(documentId, documentInfo, contextInfo);
 81  
     }
 82  
 
 83  
     @Override
 84  
     public StatusInfo deleteDocument(@WebParam(name = "documentId") String documentId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 85  0
         return getNextDecorator().deleteDocument(documentId, contextInfo);
 86  
     }
 87  
 
 88  
     @Override
 89  
     public DocumentCategoryInfo getDocumentCategory(@WebParam(name = "documentCategoryKey") String documentCategoryKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 90  0
         return getNextDecorator().getDocumentCategory(documentCategoryKey, contextInfo);
 91  
     }
 92  
 
 93  
     @Override
 94  
     public List<DocumentCategoryInfo> getDocumentCategories(@WebParam(name = "contextInfo") ContextInfo contextInfo) throws OperationFailedException {
 95  0
         return getNextDecorator().getDocumentCategories(contextInfo);
 96  
     }
 97  
 
 98  
     @Override
 99  
     public List<DocumentCategoryInfo> getDocumentCategoriesByDocumentId(@WebParam(name = "documentId") String documentId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 100  0
         return getNextDecorator().getDocumentCategoriesByDocumentId(documentId, contextInfo);
 101  
     }
 102  
 
 103  
     @Override
 104  
     public StatusInfo removeDocumentCategoryFromDocument(@WebParam(name = "documentId") String documentId, @WebParam(name = "documentCategoryKey") String documentCategoryKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 105  0
         return getNextDecorator().removeDocumentCategoryFromDocument(documentId, documentCategoryKey, contextInfo);
 106  
     }
 107  
 
 108  
     @Override
 109  
     public StatusInfo addDocumentCategoryToDocument(@WebParam(name = "documentId") String documentId, @WebParam(name = "documentCategoryKey") String documentCategoryKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
 110  0
         return getNextDecorator().addDocumentCategoryToDocument(documentId, documentCategoryKey, contextInfo);
 111  
     }
 112  
 
 113  
     @Override
 114  
     public RefDocRelationInfo getRefDocRelation(@WebParam(name = "refDocRelationId") String refDocRelationId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 115  0
         return getNextDecorator().getRefDocRelation(refDocRelationId, contextInfo);
 116  
     }
 117  
 
 118  
     @Override
 119  
     public List<RefDocRelationInfo> getRefDocRelationsByDocument(@WebParam(name = "documentId") String documentId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 120  0
         return getNextDecorator().getRefDocRelationsByDocument(documentId, contextInfo);
 121  
     }
 122  
 
 123  
     @Override
 124  
     public List<RefDocRelationInfo> getRefDocRelationsByRef(@WebParam(name = "refObjectTypeKey") String refObjectTypeKey, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 125  0
         return getNextDecorator().getRefDocRelationsByRef(refObjectTypeKey, refObjectId, contextInfo);
 126  
     }
 127  
 
 128  
     @Override
 129  
     public List<ValidationResultInfo> validateRefDocRelation(@WebParam(name = "validationTypeKey") String validationTypeKey, @WebParam(name = "refDocRelationInfo") RefDocRelationInfo refDocRelationInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 130  0
         return getNextDecorator().validateRefDocRelation(validationTypeKey, refDocRelationInfo, contextInfo);
 131  
     }
 132  
 
 133  
     @Override
 134  
     public RefDocRelationInfo createRefDocRelation(@WebParam(name = "refObjectTypeKey") String refObjectTypeKey, @WebParam(name = "refObjectId") String refObjectId, @WebParam(name = "documentId") String documentId, @WebParam(name = "refDocRelationTypeKey") String refDocRelationTypeKey, @WebParam(name = "refDocRelationInfo") RefDocRelationInfo refDocRelationInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException {
 135  0
         return getNextDecorator().createRefDocRelation(refObjectTypeKey, refObjectId, documentId, refDocRelationTypeKey, refDocRelationInfo, contextInfo);
 136  
     }
 137  
 
 138  
     @Override
 139  
     public RefDocRelationInfo updateRefDocRelation(@WebParam(name = "refDocRelationId") String refDocRelationId, @WebParam(name = "refDocRelationInfo") RefDocRelationInfo refDocRelationInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
 140  0
         return getNextDecorator().updateRefDocRelation(refDocRelationId, refDocRelationInfo, contextInfo);
 141  
     }
 142  
 
 143  
     @Override
 144  
     public StatusInfo deleteRefDocRelation(@WebParam(name = "refDocRelationId") String refDocRelationId, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 145  0
         return getNextDecorator().deleteRefDocRelation(refDocRelationId, contextInfo);
 146  
     }
 147  
 
 148  
 }