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

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

// /////////////////////////////////////////////////////////////////////////////
// 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.filesystem.FileHandle;
import org.refcodes.filesystem.FileHandleAccessor;
import org.refcodes.mixin.KeyAccessor;
import org.refcodes.mixin.NameAccessor;
import org.refcodes.mixin.PathAccessor;

public abstract class AbstractFileSystemException extends AbstractException {

	private static final long serialVersionUID = 1L;

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

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

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

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

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

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

	static abstract class AbstractWithFileException extends AbstractFileSystemException implements FileHandleAccessor {

		private static final long serialVersionUID = 1L;

		private FileHandle _file;


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


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


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


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


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


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

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

		static abstract class AbstractNoFileAccessException extends AbstractWithFileException {

			private static final long serialVersionUID = 1L;

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

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

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

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

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

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

		}
	}

	static abstract class AbstractNoFileSystemAccessException extends AbstractFileSystemException {

		private static final long serialVersionUID = 1L;


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


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


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


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


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


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

	static abstract class AbstractWithKeyException extends AbstractFileSystemException implements KeyAccessor {

		private static final long serialVersionUID = 1L;

		private String _key;


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


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


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


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


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


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

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

	static abstract class AbstractWithNameException extends AbstractFileSystemException implements NameAccessor {

		private static final long serialVersionUID = 1L;

		private String _name;


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


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


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


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


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


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

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

	static abstract class AbstractWithPathException extends AbstractFileSystemException implements PathAccessor {

		private static final long serialVersionUID = 1L;

		private String _path;


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


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


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


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


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


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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy