@Override public List<ImportValidationFeedback> verifyRule( Object subject ) { List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>(); if ( !isEnabled() ) { return feedback; } if ( !( subject instanceof JobMeta ) ) { return feedback; } JobMeta jobMeta = (JobMeta) subject; if ( jobMeta.nrNotes() == 0 ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "There is not even a single note in the job." ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "At least one not is present in the job." ) ); } return feedback; }
@Override public List<ImportValidationFeedback> verifyRule( Object subject ) { List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>(); if ( !isEnabled() ) { return feedback; } if ( !( subject instanceof TransMeta ) ) { return feedback; } TransMeta transMeta = (TransMeta) subject; if ( transMeta.nrNotes() == 0 ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "There is not even a single note in the transformation." ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "At least one not is present in the transformation." ) ); } return feedback; }
@Override public List<ImportValidationFeedback> verifyRule( Object subject ) { List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>(); if ( !isEnabled() ) { return feedback; } if ( !( subject instanceof JobMeta ) ) { return feedback; } JobMeta transMeta = (JobMeta) subject; String description = transMeta.getDescription(); if ( description != null && description.length() > minLength ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "A description is present" ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "A description is not present or too short" ) ); } return feedback; }
@Override public List<ImportValidationFeedback> verifyRule( Object subject ) { List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>(); if ( !isEnabled() ) { return feedback; } if ( !( subject instanceof TransMeta ) ) { return feedback; } TransMeta transMeta = (TransMeta) subject; String description = transMeta.getDescription(); if ( Utils.isEmpty( description ) || ( minLength > 0 && description.length() < minLength ) ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "A description is not present or is too short." ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "A description is present" ) ); } return feedback; }
@Override public List<ImportValidationFeedback> verifyRule( Object subject ) { List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>(); if ( !isEnabled() ) { return feedback; } if ( !( subject instanceof TransMeta ) ) { return feedback; } TransMeta transMeta = (TransMeta) subject; for ( int i = 0; i < transMeta.nrTransHops(); i++ ) { TransHopMeta hop = transMeta.getTransHop( i ); if ( !hop.isEnabled() ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "There is a disabled hop in the transformation." ) ); } } if ( feedback.isEmpty() ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "All hops are enabled in this transformation." ) ); } return feedback; }
@Override public List<ImportValidationFeedback> verifyRule( Object subject ) { List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>(); if ( !isEnabled() ) { return feedback; } if ( !( subject instanceof JobMeta ) ) { return feedback; } JobMeta jobMeta = (JobMeta) subject; for ( int i = 0; i < jobMeta.nrJobHops(); i++ ) { JobHopMeta hop = jobMeta.getJobHop( i ); if ( !hop.isEnabled() ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "There is a disabled hop in the job." ) ); } } if ( feedback.isEmpty() ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "All hops are enabled in this job." ) ); } return feedback; }
feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The logging table is not defined" ) ); } else { if ( !Utils.isEmpty( schemaName ) ) { if ( schemaName.equals( transLogTable.getSchemaName() ) ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "The schema name is set to: " + schemaName ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The schema name is not set to: " + schemaName ) ); feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "The table name is set to: " + tableName ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The table name is not set to: " + tableName ) ); feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "The database connection used for logging is: " + connectionName ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The database connection used for logging is not: " + connectionName ) ); feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "The logging table is correctly defined" ) );
feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The logging table is not defined" ) ); } else { if ( !Utils.isEmpty( schemaName ) ) { if ( schemaName.equals( jobLogTable.getSchemaName() ) ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "The schema name is set to: " + schemaName ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The schema name is not set to: " + schemaName ) ); feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "The table name is set to: " + tableName ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The table name is not set to: " + tableName ) ); feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "The database connection used for logging is: " + connectionName ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The database connection used for logging is not: " + connectionName ) ); feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "The logging table is correctly defined" ) );
feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "This rule contains no database to validate against." ) ); return feedback; feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The name of the database is not set to the expected value '" + databaseMeta.getDatabaseName() + "'." ) ); if ( !databaseMeta.getHostname().equals( verify.getHostname() ) ) { feedback .add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The host name of the database is not set to the expected value '" feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The database port of the database is not set to the expected value '" if ( !databaseMeta.getUsername().equals( verify.getUsername() ) ) { feedback .add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The username of the database is not set to the expected value '" feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "The password of the database is not set to the expected value." ) ); feedback.add( new ImportValidationFeedback(