public boolean isFieldDisabled( int rowNr ) { if ( rowNr >= 0 && rowNr < fields.size() ) { LogTableField field = fields.get( rowNr ); return field.isSubjectAllowed(); } else { return true; } } };
public boolean isFieldDisabled( int rowNr ) { if ( rowNr >= 0 && rowNr < fields.size() ) { LogTableField field = fields.get( rowNr ); return field.isSubjectAllowed(); } else { return true; } } };
public boolean isFieldDisabled( int rowNr ) { if ( rowNr >= 0 && rowNr < fields.size() ) { LogTableField field = fields.get( rowNr ); return field.isSubjectAllowed(); } else { return true; } } };
public boolean isFieldDisabled( int rowNr ) { if ( rowNr >= 0 && rowNr < fields.size() ) { LogTableField field = fields.get( rowNr ); return field.isSubjectAllowed(); } else { return true; } } };
public boolean isFieldDisabled( int rowNr ) { if ( rowNr >= 0 && rowNr < fields.size() ) { LogTableField field = fields.get( rowNr ); return field.isSubjectAllowed(); } else { return true; } } };
public boolean isFieldDisabled( int rowNr ) { if ( rowNr >= 0 && rowNr < fields.size() ) { LogTableField field = fields.get( rowNr ); return field.isSubjectAllowed(); } else { return true; } } };
public boolean isFieldDisabled( int rowNr ) { if ( rowNr >= 0 && rowNr < fields.size() ) { LogTableField field = fields.get( rowNr ); return !field.isSubjectAllowed(); } else { return true; } } };
protected String getFieldsXML() { StringBuilder retval = new StringBuilder(); for ( LogTableField field : fields ) { retval.append( " " ).append( XMLHandler.openTag( XML_TAG ) ).append( Const.CR ); retval.append( " " ).append( XMLHandler.addTagValue( "id", field.getId() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "enabled", field.isEnabled() ) ); retval.append( " " ).append( XMLHandler.addTagValue( "name", field.getFieldName() ) ); if ( field.isSubjectAllowed() ) { retval.append( " " ).append( XMLHandler.addTagValue( "subject", field.getSubject() == null ? null : field.getSubject().toString() ) ); } retval.append( " " ).append( XMLHandler.closeTag( XML_TAG ) ).append( Const.CR ); } return retval.toString(); }
public void loadFromRepository( RepositoryAttributeInterface attributeInterface ) throws KettleException { super.loadFromRepository( attributeInterface ); logInterval = attributeInterface.getAttributeString( getLogTableCode() + PROP_LOG_TABLE_INTERVAL ); logSizeLimit = attributeInterface.getAttributeString( getLogTableCode() + PROP_LOG_TABLE_SIZE_LIMIT ); for ( int i = 0; i < getFields().size(); i++ ) { String id = attributeInterface.getAttributeString( getLogTableCode() + PROP_LOG_TABLE_FIELD_ID + i ); // Only read further if the ID is available. // For backward compatibility, this might not be provided yet! // if ( id != null ) { LogTableField field = findField( id ); if ( field.isSubjectAllowed() ) { // BaseLogTable.loadFromRepository sets subject as a String // String stepname = (String) field.getSubject(); if ( !Utils.isEmpty( stepname ) ) { field.setSubject( StepMeta.findStep( steps, stepname ) ); } else { field.setSubject( null ); } } } } }
private void getTransLogTableOptions() { if ( previousLogTableIndex == LOG_INDEX_TRANS ) { // The connection... // transLogTable.setConnectionName( wLogconnection.getText() ); transLogTable.setSchemaName( wLogSchema.getText() ); transLogTable.setTableName( wLogTable.getText() ); transLogTable.setLogInterval( wLogInterval.getText() ); transLogTable.setLogSizeLimit( wLogSizeLimit.getText() ); transLogTable.setTimeoutInDays( wLogTimeout.getText() ); for ( int i = 0; i < transLogTable.getFields().size(); i++ ) { TableItem item = wOptionFields.table.getItem( i ); LogTableField field = transLogTable.getFields().get( i ); field.setEnabled( item.getChecked() ); field.setFieldName( item.getText( 1 ) ); if ( field.isSubjectAllowed() ) { field.setSubject( transMeta.findStep( item.getText( 2 ) ) ); } } } }
/** * Save this core information of the log table to the repository using the specified attribute interface. * * @param attributeInterface * The attribute interface to use to set attributes * @throws KettleException */ public void saveToRepository( RepositoryAttributeInterface attributeInterface ) throws KettleException { attributeInterface.setAttribute( getLogTableCode() + PROP_LOG_TABLE_CONNECTION_NAME, getConnectionName() ); attributeInterface.setAttribute( getLogTableCode() + PROP_LOG_TABLE_SCHEMA_NAME, getSchemaName() ); attributeInterface.setAttribute( getLogTableCode() + PROP_LOG_TABLE_TABLE_NAME, getTableName() ); attributeInterface.setAttribute( getLogTableCode() + PROP_LOG_TABLE_TIMEOUT_DAYS, getTimeoutInDays() ); // Store the fields too... // for ( int i = 0; i < getFields().size(); i++ ) { LogTableField field = getFields().get( i ); attributeInterface.setAttribute( getLogTableCode() + PROP_LOG_TABLE_FIELD_ID + i, field.getId() ); attributeInterface.setAttribute( getLogTableCode() + PROP_LOG_TABLE_FIELD_NAME + i, field.getFieldName() ); attributeInterface.setAttribute( getLogTableCode() + PROP_LOG_TABLE_FIELD_ENABLED + i, field.isEnabled() ); if ( field.isSubjectAllowed() ) { attributeInterface.setAttribute( getLogTableCode() + PROP_LOG_TABLE_FIELD_SUBJECT + i, field.getSubject() == null ? null : field .getSubject().toString() ); } } }
field.setEnabled( attributeInterface.getAttributeBoolean( getLogTableCode() + PROP_LOG_TABLE_FIELD_ENABLED + i ) ); if ( field.isSubjectAllowed() ) { field.setSubject( attributeInterface.getAttributeString( getLogTableCode() + PROP_LOG_TABLE_FIELD_SUBJECT + i ) );