Coverage Report - javax.faces.validator.ValidatorException
 
Classes in this File Line Coverage Branch Coverage Complexity
ValidatorException
65%
11/17
N/A
1
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache 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.apache.org/licenses/LICENSE-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,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package javax.faces.validator;
 17  
 
 18  
 import javax.faces.FacesException;
 19  
 import javax.faces.application.FacesMessage;
 20  
 
 21  
 /**
 22  
  * @author shot
 23  
  */
 24  
 public class ValidatorException extends FacesException {
 25  
 
 26  
     private static final long serialVersionUID = 1L;
 27  
 
 28  51
     private FacesMessage facesMessage = null;
 29  
 
 30  
     private String messageId;
 31  
 
 32  
     private Object[] args;
 33  
 
 34  
     public ValidatorException(FacesMessage facesMessage) {
 35  51
         this(facesMessage, null);
 36  51
     }
 37  
 
 38  
     public ValidatorException(FacesMessage facesMessage, Throwable cause) {
 39  51
         super(facesMessage.getDetail(), cause);
 40  51
         this.facesMessage = facesMessage;
 41  51
     }
 42  
 
 43  
     public ValidatorException(FacesMessage facesMessage, String messageId,
 44  
             Object[] args) {
 45  32
         this(facesMessage);
 46  32
         this.messageId = messageId;
 47  32
         this.args = args;
 48  32
     }
 49  
 
 50  
     public ValidatorException(FacesMessage facesMessage, Throwable cause,
 51  
             String messageId, Object[] args) {
 52  0
         this(facesMessage, cause);
 53  0
         this.messageId = messageId;
 54  0
         this.args = args;
 55  0
     }
 56  
 
 57  
     public FacesMessage getFacesMessage() {
 58  34
         return facesMessage;
 59  
     }
 60  
 
 61  
     public String getMessageId() {
 62  0
         return messageId;
 63  
     }
 64  
 
 65  
     public Object[] getArgs() {
 66  0
         return args;
 67  
     }
 68  
 }