Coverage Report - org.mockftpserver.fake.filesystem.FileSystemException
 
Classes in this File Line Coverage Branch Coverage Complexity
FileSystemException
42%
6/14
N/A
1
 
 1  
 /*
 2  
  * Copyright 2008 the original author or authors.
 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, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.mockftpserver.fake.filesystem;
 17  
 
 18  
 import org.mockftpserver.core.MockFtpServerException;
 19  
 
 20  
 /**
 21  
  * Represents an error that occurs while performing a FileSystem operation.
 22  
  *
 23  
  * @author Chris Mair
 24  
  * @version $Revision: 112 $ - $Date: 2008-09-07 18:52:37 -0400 (Sun, 07 Sep 2008) $
 25  
  */
 26  
 public class FileSystemException extends MockFtpServerException {
 27  
 
 28  
     /**
 29  
      * The path involved in the file system operation that caused the exception
 30  
      */
 31  
     private String path;
 32  
 
 33  
     /**
 34  
      * The message key for the exception message
 35  
      */
 36  
     private String messageKey;
 37  
 
 38  
     /**
 39  
      * Construct a new instance for the specified path and message key
 40  
      *
 41  
      * @param path       - the path involved in the file system operation that caused the exception
 42  
      * @param messageKey - the exception message key
 43  
      */
 44  
     public FileSystemException(String path, String messageKey) {
 45  83
         super(path);
 46  83
         this.path = path;
 47  83
         this.messageKey = messageKey;
 48  83
     }
 49  
 
 50  
     /**
 51  
      * @param path       - the path involved in the file system operation that caused the exception
 52  
      * @param messageKey - the exception message key
 53  
      * @param cause      - the exception cause, wrapped by this exception
 54  
      */
 55  
     public FileSystemException(String path, String messageKey, Throwable cause) {
 56  0
         super(path, cause);
 57  0
         this.path = path;
 58  0
         this.messageKey = messageKey;
 59  0
     }
 60  
 
 61  
     public String getPath() {
 62  58
         return path;
 63  
     }
 64  
 
 65  
     public void setPath(String path) {
 66  0
         this.path = path;
 67  0
     }
 68  
 
 69  
     public String getMessageKey() {
 70  76
         return messageKey;
 71  
     }
 72  
 
 73  
     public void setMessageKey(String messageKey) {
 74  0
         this.messageKey = messageKey;
 75  0
     }
 76  
 
 77  
 }