/** * Checks configured properties. * * @throws PropertyException for illegal property values. */ private void assertValidProperties() { final int defaultFormat = this.getDefaultFormat(); if ( defaultFormat != FORMAT_DISK && defaultFormat != FORMAT_TAPE ) { throw new PropertyException( "defaultFormat", new Integer( defaultFormat ) ); } }
/** * Creates a new instance of {@code PropertyException} taking a property * name, the invalid value and a causing throwable. * * @param name the name of the property with invalid value. * @param value the invalid value of the property with name {@code name}. * @param cause the causing throwable. */ public PropertyException( final String name, final Object value, final Throwable cause ) { super( PropertyExceptionBundle.getInstance(). getPropertyExceptionMessage( Locale.getDefault(), name, value.toString() ) ); this.initCause( cause ); this.name = name; this.value = value; }
/** * Checks configured properties. * * @throws PropertyException if properties hold invalid values. */ private void assertValidProperties() { if ( this.getReloadIntervalMillis() < 0L ) { throw new PropertyException( "reloadIntervalMillis", Long.toString( this.getReloadIntervalMillis() ) ); } if ( this.getMonitoringThreshold() < 0L ) { throw new PropertyException( "monitoringThreshold", Long.toString( this.getMonitoringThreshold() ) ); } }
/** * Checks configured properties. * * @throws PropertyException for invalid property values. */ private void assertValidProperties() { if ( this.getFormat() != Kontonummer.ELECTRONIC_FORMAT && this.getFormat() != Kontonummer.LETTER_FORMAT ) { throw new PropertyException( "format", Integer.toString( this.getFormat() ) ); } }
/** * Checks configured properties. * * @throws PropertyException for illegal property values. */ protected void assertValidProperties() { if(this.getMaxDescriptions() < 0) { throw new PropertyException("maxDescription", Integer.valueOf(this.getMaxDescriptions())); } if(this.getMaxTransactions() < 0) { throw new PropertyException("maxTransactions", Integer.valueOf(this.getMaxTransactions())); } }
/** * Checks configured properties. * * @throws PropertyException for properties with invalid values. * @throws ImplementationException if the configuration cannot be used. */ protected void assertValidProperties() { if(this.getConfigurationBundle() == null) { throw new PropertyException("configurationBundle", null); } this.getConfiguration(null); }
/** * Checks configured properties. * * @throws PropertyException for invalid property values. */ private void assertValidProperties() { if ( this.getFormat() != Referenznummer10.ELECTRONIC_FORMAT && this.getFormat() != Referenznummer10.LETTER_FORMAT ) { throw new PropertyException( "format", Integer.toString( this.getFormat() ) ); } }
/** * Checks configured properties. * * @throws PropertyException for invalid property values. */ private void assertValidProperties() { if ( this.getFormat() != Bankleitzahl.ELECTRONIC_FORMAT && this.getFormat() != Bankleitzahl.LETTER_FORMAT ) { throw new PropertyException( "format", Integer.toString( this.getFormat() ) ); } }
/** * Checks configured properties. * * @throws PropertyException for invalid property values. */ private void assertValidProperties() { if ( this.getFormat() != Referenznummer11.ELECTRONIC_FORMAT && this.getFormat() != Referenznummer11.LETTER_FORMAT ) { throw new PropertyException( "format", Integer.toString( this.getFormat() ) ); } }
/** * Checks configured properties. * * @throws PropertyException for illegal property values. */ protected void assertValidProperties() { if(this.getFileExtension() == null || this.getFileExtension().length() <= 0) { throw new PropertyException("fileExtension", this.getFileExtension()); } }
/** * Checks configured properties. * * @throws PropertyException for illegal property values. */ protected void assertValidProperties() { if(this.getFileExtension() == null || this.getFileExtension().length() <= 0) { throw new PropertyException("fileExtension", this.getFileExtension()); } }
/** * Checks configured properties. * * @throws PropertyException if properties hold invalid values. */ private void assertValidProperties() { if ( this.getClasspathLocation() == null ) { throw new PropertyException( "classpathLocation", this.getClasspathLocation() ); } if ( this.getPropertiesResourceName() == null || this.getPropertiesResourceName().length() <= 0 ) { throw new PropertyException( "propertiesResourceName", this.getPropertiesResourceName() ); } }
/** * Checks configured properties. * * @throws PropertyException for invalid property values. * * @deprecated Removed without replacement. */ protected void assertValidProperties() { if ( this.getDefaultLanguage() == null || this.getDefaultLanguage().length() <= 0 ) { throw new PropertyException( "defaultLanguage", this.getDefaultLanguage() ); } }
/** * Checks configured properties. * * @throws PropertyException for invalid property values. */ private void assertValidProperties() { if ( this.getEncoding() == null || this.getEncoding().length() == 0 ) { throw new PropertyException( "encoding", this.getEncoding() ); } try { "".getBytes( this.getEncoding() ); } catch ( final UnsupportedEncodingException e ) { throw new PropertyException( "encoding", this.getEncoding(), e ); } }
/** * Checks configured properties. * * @throws PropertyException for illegal property values. */ private void assertValidProperties() { if ( this.getMinDateMillis() < 0L ) { throw new PropertyException( "minDateMillis", Long.toString( this.getMinDateMillis() ) ); } if ( this.getMaxDateMillis() < 0L || this.getMinDateMillis() > this.getMaxDateMillis() ) { throw new PropertyException( "maxDateMillis", Long.toString( this.getMaxDateMillis() ) ); } if ( this.getMaxScheduleDays() < 0 ) { throw new PropertyException( "maxScheduleDays", Integer.toString( this.getMaxScheduleDays() ) ); } }
/** * Checks configured properties. * * @throws PropertyException for illegal property values. */ private void assertValidProperties() { if ( this.getMinAmount() < 0L ) { throw new PropertyException( "minAmount", Long.toString( this.getMinAmount() ) ); } if ( this.getMaxAmount() < 0L || this.getMinAmount() > this.getMaxAmount() ) { throw new PropertyException( "maxAmount", Long.toString( this.getMaxAmount() ) ); } if ( this.getMinDescriptions() < 0 ) { throw new PropertyException( "minDescriptions", Integer.toString( this.getMinDescriptions() ) ); } if ( this.getMaxDescriptions() < 0 || this.getMinDescriptions() > this.getMaxDescriptions() ) { throw new PropertyException( "maxDescriptions", Integer.toString( this.getMaxDescriptions() ) ); } }
/** * Checks configured properties. * * @throws PropertyException if configured properties hold invalid values. */ private void assertValidProperties() { if ( this.getReloadIntervalMillis() < 0L ) { throw new PropertyException( "reloadIntervalMillis", Long.toString( this.getReloadIntervalMillis() ) ); } if ( this.getDateOfExpirationText() == null || this.getDateOfExpirationText().length() == 0 ) { throw new PropertyException( "dateOfExpirationText", this.getDateOfExpirationText() ); } if ( this.getDateOfExpirationPattern() == null || this.getDateOfExpirationPattern().length() == 0 ) { throw new PropertyException( "dateOfExpirationPattern", this.getDateOfExpirationPattern() ); } try { final DateFormat dateFormat = new SimpleDateFormat( this.getDateOfExpirationPattern() ); dateFormat.parse( this.getDateOfExpirationText() ); } catch ( final ParseException e ) { throw new PropertyException( "dateOfExpirationText", this.getDateOfExpirationText(), e ); } }
this.getBinDirectoryName().length() == 0) throw new PropertyException("binDirectoryName", null); throw new PropertyException("configDirectoryName", null); throw new PropertyException("dataDirectoryName", null); throw new PropertyException("stateDirectoryName", null); this.getDirectoryName().length() <= 0) throw new PropertyException("directoryName", this.getDirectoryName()); this.getLogfileName().length() <= 0) throw new PropertyException("logfileName", this.getLogfileName()); this.getPropertiesFileName().length() <= 0) throw new PropertyException("propertiesFileName", this.getPropertiesFileName());