Coverage Report - org.kuali.student.r2.common.messages.service.MessageServiceDecorator
 
Classes in this File Line Coverage Branch Coverage Complexity
MessageServiceDecorator
0%
0/14
0%
0/2
1.2
 
 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  
 package org.kuali.student.r2.common.messages.service;
 16  
 
 17  
 import org.kuali.student.r2.common.dto.ContextInfo;
 18  
 import org.kuali.student.r2.common.dto.LocaleInfo;
 19  
 import org.kuali.student.r2.common.dto.StatusInfo;
 20  
 import org.kuali.student.r2.common.exceptions.DoesNotExistException;
 21  
 import org.kuali.student.r2.common.exceptions.InvalidParameterException;
 22  
 import org.kuali.student.r2.common.exceptions.MissingParameterException;
 23  
 import org.kuali.student.r2.common.exceptions.OperationFailedException;
 24  
 import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
 25  
 import org.kuali.student.r2.common.exceptions.ReadOnlyException;
 26  
 import org.kuali.student.r2.common.exceptions.VersionMismatchException;
 27  
 import org.kuali.student.r2.common.messages.dto.MessageInfo;
 28  
 
 29  
 import javax.jws.WebParam;
 30  
 import java.util.List;
 31  
 
 32  
 /**
 33  
  * Refer to service contract javadoc
 34  
  *
 35  
  * @Version 2.0
 36  
  * @Author Sri komandur@uw.edu
 37  
  */
 38  0
 public class MessageServiceDecorator implements MessageService {
 39  
 
 40  
 
 41  
     private MessageService nextDecorator;
 42  
 
 43  
     public MessageService getNextDecorator() throws OperationFailedException {
 44  0
         if (null == nextDecorator) {
 45  0
             throw new OperationFailedException("Misconfigured application: nextDecorator is null");
 46  
         }
 47  0
         return nextDecorator;
 48  
     }
 49  
 
 50  
     public void setNextDecorator(MessageService nextDecorator) {
 51  0
         this.nextDecorator = nextDecorator;
 52  0
     }
 53  
     @Override
 54  
     public List<LocaleInfo> getLocales(@WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 55  0
         return getNextDecorator().getLocales(contextInfo);
 56  
     }
 57  
 
 58  
     @Override
 59  
     public List<String> getMessageGroupKeys(@WebParam(name = "contextInfo") ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 60  0
         return getNextDecorator().getMessageGroupKeys(contextInfo);
 61  
     }
 62  
 
 63  
     @Override
 64  
     public MessageInfo getMessage(@WebParam(name = "localeInfo") LocaleInfo localeInfo, @WebParam(name = "messageGroupKey") String messageGroupKey, @WebParam(name = "messageKey") String messageKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 65  0
         return getNextDecorator().getMessage(localeInfo, messageGroupKey, messageKey, contextInfo);
 66  
     }
 67  
 
 68  
     @Override
 69  
     public List<MessageInfo> getMessages(@WebParam(name = "localeInfo") LocaleInfo localeInfo, @WebParam(name = "messageGroupKey") String messageGroupKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 70  0
         return getNextDecorator().getMessages(localeInfo, messageGroupKey, contextInfo);
 71  
     }
 72  
 
 73  
     @Override
 74  
     public List<MessageInfo> getMessagesByGroups(@WebParam(name = "localeInfo") LocaleInfo localeInfo, @WebParam(name = "messageGroupKeys") List<String> messageGroupKeys, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 75  0
         return getNextDecorator().getMessagesByGroups(localeInfo, messageGroupKeys, contextInfo);
 76  
     }
 77  
 
 78  
     @Override
 79  
     public MessageInfo updateMessage(@WebParam(name = "localeInfo") LocaleInfo localeInfo, @WebParam(name = "messageKey") String messageKey, @WebParam(name = "messageInfo") MessageInfo messageInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException {
 80  0
         return getNextDecorator().updateMessage(localeInfo, messageKey, messageInfo, contextInfo);
 81  
     }
 82  
 
 83  
     @Override
 84  
     public StatusInfo deleteMessage(@WebParam(name = "localeInfo") LocaleInfo localeInfo, @WebParam(name = "messageKey") String messageKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 85  0
         return getNextDecorator().deleteMessage(localeInfo, messageKey, contextInfo);
 86  
     }
 87  
 
 88  
     @Override
 89  
     public StatusInfo addMessage(@WebParam(name = "localeInfo") LocaleInfo localeInfo, @WebParam(name = "messageGroupKey") String messageGroupKey, @WebParam(name = "messageInfo") MessageInfo messageInfo, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 90  0
         return getNextDecorator().addMessage(localeInfo, messageGroupKey, messageInfo, contextInfo);
 91  
     }
 92  
 }