/** * {@inheritDoc} * * @see at.aschauer.commons.pentaho.plugin.PluginProperty#readFromPreferences(java.util.prefs.Preferences) */ public void readFromPreferences( final Preferences node ) { this.setValue( node.get( this.getKey(), this.getValue() ) ); }
/** * {@inheritDoc} * * @see at.aschauer.commons.pentaho.plugin.PluginProperty#readFromRepositoryStep(org.pentaho.di.repository.Repository, * long) */ public void readFromRepositoryStep( final Repository repository, final IMetaStore metaStore, final ObjectId stepId ) throws KettleException { final String value = repository.getStepAttributeString( stepId, this.getKey() ); this.setValue( value ); }
/** * {@inheritDoc} * * @see org.pentaho.di.trans.step.StepMetaInterface#setDefault() */ public void setDefault() { this.fastloadPath.setValue( DEFAULT_FASTLOAD_PATH ); this.dataFile.setValue( DEFAULT_DATA_FILE ); this.sessions.setValue( DEFAULT_SESSIONS ); this.errorLimit.setValue( DEFAULT_ERROR_LIMIT ); this.truncateTable.setValue( DEFAULT_TRUNCATETABLE ); this.variableSubstitution.setValue( DEFAULT_VARIABLE_SUBSTITUTION ); this.targetTable.setValue( DEFAULT_TARGET_TABLE ); this.useControlFile.setValue( true ); }
/** * {@inheritDoc} * * @see at.aschauer.commons.pentaho.plugin.PluginProperty#loadXml(org.w3c.dom.Node) */ public void loadXml( final Node node ) { final String value = XMLHandler.getTagValue( node, this.getKey() ); this.setValue( value ); }
/** * Ok clicked. */ public void ok() { this.stepname = this.wStepname.getText(); // return value this.meta.getUseControlFile().setValue( this.wUseControlFile.getSelection() ); this.meta.getVariableSubstitution().setValue( this.wVariableSubstitution.getSelection() ); this.meta.getControlFile().setValue( this.wControlFile.getText() ); this.meta.getFastloadPath().setValue( this.wFastLoadPath.getText() ); this.meta.getDataFile().setValue( this.wDataFile.getText() ); this.meta.getLogFile().setValue( this.wLogFile.getText() ); this.meta.getErrorLimit().setValue( Const.toInt( this.wErrLimit.getText(), TeraFastMeta.DEFAULT_ERROR_LIMIT ) ); this.meta.getSessions().setValue( Const.toInt( this.wSessions.getText(), TeraFastMeta.DEFAULT_SESSIONS ) ); this.meta.getTargetTable().setValue( this.wTable.getText() ); this.meta.getConnectionName().setValue( this.wConnection.getText() ); this.meta.getTruncateTable().setValue( this.wbTruncateTable.getSelection() && this.wbTruncateTable.getEnabled() ); this.meta.setDbMeta( this.transMeta.findDatabase( this.wConnection.getText() ) ); this.meta.getTableFieldList().getValue().clear(); this.meta.getStreamFieldList().getValue().clear(); int nrfields = this.wReturn.nrNonEmpty(); for ( int i = 0; i < nrfields; i++ ) { TableItem item = this.wReturn.getNonEmpty( i ); this.meta.getTableFieldList().getValue().add( item.getText( 1 ) ); this.meta.getStreamFieldList().getValue().add( item.getText( 2 ) ); } dispose(); }
this.meta.getTargetTable().setValue( this.wTable.getText() ); try { targetFields = this.meta.getRequiredFields( this.transMeta );