public void validate() throws PackagingException {
        if (control == null || !control.isDirectory()) {
            throw new PackagingException("The 'control' attribute doesn't point to a directory. " + control);
        }

        if (changesIn != null) {

            if (changesIn.exists() && (!changesIn.isFile() || !changesIn.canRead())) {
                throw new PackagingException("The 'changesIn' setting needs to point to a readable file. " + changesIn + " was not found/readable.");
            }

            if (changesOut != null && !isWritableFile(changesOut)) {
                throw new PackagingException("Cannot write the output for 'changesOut' to " + changesOut);
            }

            if (changesSave != null && !isWritableFile(changesSave)) {
                throw new PackagingException("Cannot write the output for 'changesSave' to " + changesSave);
            }

        } else {
            if (changesOut != null || changesSave != null) {
                throw new PackagingException("The 'changesOut' or 'changesSave' settings may only be used when there is a 'changesIn' specified.");
            }
        }

        if (Compression.toEnum(compression) == null) {
            throw new PackagingException("The compression method '" + compression + "' is not supported (expected 'none', 'gzip', 'bzip2' or 'xz')");
        }

        if (deb == null) {
            throw new PackagingException("You need to specify where the deb file is supposed to be created.");
        }

        getDigestCode(digest);
    }
public void validate ( ) throws PackagingException { if ( control == null || ! control . isDirectory ( ) ) { throw new PackagingException ( "The 'control' attribute doesn't point to a directory. " + control ) ; } if ( changesIn != null ) { if ( changesIn . exists ( ) && ( ! changesIn . isFile ( ) || ! changesIn . canRead ( ) ) ) { throw new PackagingException ( "The 'changesIn' setting needs to point to a readable file. " + changesIn + " was not found/readable." ) ; } if ( changesOut != null && ! isWritableFile ( changesOut ) ) { throw new PackagingException ( "Cannot write the output for 'changesOut' to " + changesOut ) ; } if ( changesSave != null && ! isWritableFile ( changesSave ) ) { throw new PackagingException ( "Cannot write the output for 'changesSave' to " + changesSave ) ; } } else { if ( changesOut != null || changesSave != null ) { throw new PackagingException ( "The 'changesOut' or 'changesSave' settings may only be used when there is a 'changesIn' specified." ) ; } } if ( Compression . toEnum ( compression ) == null ) { throw new PackagingException ( "The compression method '" + compression + "' is not supported (expected 'none', 'gzip', 'bzip2' or 'xz')" ) ; } if ( deb == null ) { throw new PackagingException ( "You need to specify where the deb file is supposed to be created." ) ; } getDigestCode ( digest ) ; }
Validates the input parameters.