All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.refcodes.filesystem.FileSystemException Maven / Gradle / Ivy

There is a newer version: 3.3.9
Show newest version
// /////////////////////////////////////////////////////////////////////////////
// REFCODES.ORG
// =============================================================================
// This code is copyright (c) by Siegfried Steiner, Munich, Germany and licensed
// under the following (see "http://en.wikipedia.org/wiki/Multi-licensing")
// licenses:
// =============================================================================
// GNU General Public License, v3.0 ("http://www.gnu.org/licenses/gpl-3.0.html")
// together with the GPL linking exception applied; as being applied by the GNU
// Classpath ("http://www.gnu.org/software/classpath/license.html")
// =============================================================================
// Apache License, v2.0 ("http://www.apache.org/licenses/LICENSE-2.0")
// =============================================================================
// Please contact the copyright holding author(s) of the software artifacts in
// question for licensing issues not being covered by the above listed licenses,
// also regarding commercial licensing models or regarding the compatibility
// with other open source licenses.
// /////////////////////////////////////////////////////////////////////////////

package org.refcodes.filesystem;

import org.refcodes.exception.AbstractException;
import org.refcodes.mixin.KeyAccessor;
import org.refcodes.mixin.NameAccessor;
import org.refcodes.mixin.PathAccessor;

public abstract class FileSystemException extends AbstractException {

	private static final long serialVersionUID = 1L;

	public FileSystemException( String aMessage, String aErrorCode ) {
		super( aMessage, aErrorCode );
	}

	public FileSystemException( String aMessage, Throwable aCause, String aErrorCode ) {
		super( aMessage, aCause, aErrorCode );
	}

	public FileSystemException( String message, Throwable cause ) {
		super( message, cause );
	}

	public FileSystemException( String message ) {
		super( message );
	}

	public FileSystemException( Throwable aCause, String aErrorCode ) {
		super( aCause, aErrorCode );
	}

	public FileSystemException( Throwable cause ) {
		super( cause );
	}

	static abstract class FileSystemFileException extends FileSystemException implements FileHandleAccessor {

		private static final long serialVersionUID = 1L;

		private FileHandle _file;


		public FileSystemFileException( FileHandle aFile, String aMessage, String aErrorCode ) {
			super( aMessage, aErrorCode );
			_file = aFile;
		}


		public FileSystemFileException( FileHandle aFile, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aMessage, aCause, aErrorCode );
			_file = aFile;
		}


		public FileSystemFileException( FileHandle aFile, String message, Throwable cause ) {
			super( message, cause );
			_file = aFile;
		}


		public FileSystemFileException( FileHandle aFile, String message ) {
			super( message );
			_file = aFile;
		}


		public FileSystemFileException( FileHandle aFile, Throwable aCause, String aErrorCode ) {
			super( aCause, aErrorCode );
			_file = aFile;
		}


		public FileSystemFileException( FileHandle aFile, Throwable cause ) {
			super( cause );
			_file = aFile;
		}

		@Override
		public FileHandle getFile() {
			return _file;
		}

		static abstract class FileSystemNoFileAccessException extends FileSystemFileException {

			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			public FileSystemNoFileAccessException( FileHandle aFile, String aMessage, String aErrorCode ) {
				super( aFile, aMessage, aErrorCode );
			}

			/**
			 * {@inheritDoc}
			 */
			public FileSystemNoFileAccessException( FileHandle aFile, String aMessage, Throwable aCause, String aErrorCode ) {
				super( aFile, aMessage, aCause, aErrorCode );
			}

			/**
			 * {@inheritDoc}
			 */
			public FileSystemNoFileAccessException( FileHandle aFile, String message, Throwable cause ) {
				super( aFile, message, cause );
			}

			/**
			 * {@inheritDoc}
			 */
			public FileSystemNoFileAccessException( FileHandle aFile, String message ) {
				super( aFile, message );
			}

			/**
			 * {@inheritDoc}
			 */
			public FileSystemNoFileAccessException( FileHandle aFile, Throwable aCause, String aErrorCode ) {
				super( aFile, aCause, aErrorCode );
			}

			/**
			 * {@inheritDoc}
			 */
			public FileSystemNoFileAccessException( FileHandle aFile, Throwable cause ) {
				super( aFile, cause );
			}

		}
	}

	static abstract class FileSystemNoFileSystemAccessException extends FileSystemException {

		private static final long serialVersionUID = 1L;


		public FileSystemNoFileSystemAccessException( String aMessage, String aErrorCode ) {
			super( aMessage, aErrorCode );
		}


		public FileSystemNoFileSystemAccessException( String aMessage, Throwable aCause, String aErrorCode ) {
			super( aMessage, aCause, aErrorCode );
		}


		public FileSystemNoFileSystemAccessException( String message, Throwable cause ) {
			super( message, cause );
		}


		public FileSystemNoFileSystemAccessException( String message ) {
			super( message );
		}


		public FileSystemNoFileSystemAccessException( Throwable aCause, String aErrorCode ) {
			super( aCause, aErrorCode );
		}


		public FileSystemNoFileSystemAccessException( Throwable cause ) {
			super( cause );
		}
	}

	static abstract class FileSystemKeyException extends FileSystemException implements KeyAccessor {

		private static final long serialVersionUID = 1L;

		private String _key;


		public FileSystemKeyException( String aKey, String aMessage, String aErrorCode ) {
			super( aMessage, aErrorCode );
			_key = aKey;
		}


		public FileSystemKeyException( String aKey, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aMessage, aCause, aErrorCode );
			_key = aKey;
		}


		public FileSystemKeyException( String aKey, String message, Throwable cause ) {
			super( message, cause );
			_key = aKey;
		}


		public FileSystemKeyException( String aKey, String message ) {
			super( message );
			_key = aKey;
		}


		public FileSystemKeyException( String aKey, Throwable aCause, String aErrorCode ) {
			super( aCause, aErrorCode );
			_key = aKey;
		}


		public FileSystemKeyException( String aKey, Throwable cause ) {
			super( cause );
			_key = aKey;
		}

		@Override
		public String getKey() {
			return _key;
		}
	}

	static abstract class FileSystemNameException extends FileSystemException implements NameAccessor {

		private static final long serialVersionUID = 1L;

		private String _name;


		public FileSystemNameException( String aName, String aMessage, String aErrorCode ) {
			super( aMessage, aErrorCode );
			_name = aName;
		}


		public FileSystemNameException( String aName, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aMessage, aCause, aErrorCode );
			_name = aName;
		}


		public FileSystemNameException( String aName, String message, Throwable cause ) {
			super( message, cause );
			_name = aName;
		}


		public FileSystemNameException( String aName, String message ) {
			super( message );
			_name = aName;
		}


		public FileSystemNameException( String aName, Throwable aCause, String aErrorCode ) {
			super( aCause, aErrorCode );
			_name = aName;
		}


		public FileSystemNameException( String aName, Throwable cause ) {
			super( cause );
			_name = aName;
		}

		@Override
		public String getName() {
			return _name;
		}
	}

	static abstract class FileSystemPathException extends FileSystemException implements PathAccessor {

		private static final long serialVersionUID = 1L;

		private String _path;


		public FileSystemPathException( String aPath, String aMessage, String aErrorCode ) {
			super( aMessage, aErrorCode );
			_path = aPath;
		}


		public FileSystemPathException( String aPath, String aMessage, Throwable aCause, String aErrorCode ) {
			super( aMessage, aCause, aErrorCode );
			_path = aPath;
		}


		public FileSystemPathException( String aPath, String message, Throwable cause ) {
			super( message, cause );
			_path = aPath;
		}


		public FileSystemPathException( String aPath, String message ) {
			super( message );
			_path = aPath;
		}


		public FileSystemPathException( String aPath, Throwable aCause, String aErrorCode ) {
			super( aCause, aErrorCode );
			_path = aPath;
		}


		public FileSystemPathException( String aPath, Throwable cause ) {
			super( cause );
			_path = aPath;
		}

		@Override
		public String getPath() {
			return _path;
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy