本文整理了Java中org.pentaho.di.trans.steps.zipfile.ZipFileMeta.setDynamicSourceFileNameField()
方法的一些代码示例,展示了ZipFileMeta.setDynamicSourceFileNameField()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFileMeta.setDynamicSourceFileNameField()
方法的具体详情如下:
包路径:org.pentaho.di.trans.steps.zipfile.ZipFileMeta
类名称:ZipFileMeta
方法名:setDynamicSourceFileNameField
暂无
代码示例来源:origin: pentaho/pentaho-kettle
private void ok() {
if ( Utils.isEmpty( wStepname.getText() ) ) {
MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage( BaseMessages.getString( PKG, "System.Error.StepNameMissing.Message" ) );
mb.setText( BaseMessages.getString( PKG, "System.Error.StepNameMissing.Title" ) );
mb.open();
return;
}
input.setBaseFolderField( wBaseFolderField.getText() );
input.setDynamicSourceFileNameField( wSourceFileNameField.getText() );
input.setDynamicTargetFileNameField( wTargetFileNameField.getText() );
input.setaddTargetFileNametoResult( wAddResult.getSelection() );
input.setOverwriteZipEntry( wOverwriteZipEntry.getSelection() );
input.setCreateParentFolder( wCreateParentFolder.getSelection() );
input.setKeepSouceFolder( wKeepFolders.getSelection() );
input.setOperationType( ZipFileMeta.getOperationTypeByDesc( wOperation.getText() ) );
input.setMoveToFolderField( wMoveToFolderField.getText() );
stepname = wStepname.getText(); // return value
dispose();
}
代码示例来源:origin: pentaho/pentaho-kettle
@Test
public void testCheck() {
ZipFileMeta zipFileMeta = new ZipFileMeta();
zipFileMeta.setDefault();
TransMeta transMeta = mock( TransMeta.class );
StepMeta stepInfo = mock( StepMeta.class );
RowMetaInterface prev = mock( RowMetaInterface.class );
Repository repos = mock( Repository.class );
IMetaStore metastore = mock( IMetaStore.class );
RowMetaInterface info = mock( RowMetaInterface.class );
ArrayList<CheckResultInterface> remarks = new ArrayList<>();
zipFileMeta.check( remarks, transMeta, stepInfo, prev, new String[]{"input"}, new String[]{"output"}, info,
new Variables(), repos, metastore );
assertEquals( 2, remarks.size() );
assertEquals( "Source Filename field is missing!", remarks.get( 0 ).getText() );
assertEquals( "Step is receiving info from other steps.", remarks.get( 1 ).getText() );
remarks = new ArrayList<>();
zipFileMeta = new ZipFileMeta();
zipFileMeta.setDynamicSourceFileNameField( "sourceFileField" );
zipFileMeta.check( remarks, transMeta, stepInfo, prev, new String[0], new String[]{"output"}, info,
new Variables(), repos, metastore );
assertEquals( 2, remarks.size() );
assertEquals( "Target Filename field was specified", remarks.get( 0 ).getText() );
assertEquals( "No input received from other steps!", remarks.get( 1 ).getText() );
}
代码示例来源:origin: pentaho/pentaho-kettle
@Test
public void testGettersSetters() {
ZipFileMeta zipFileMeta = new ZipFileMeta();
zipFileMeta.setDynamicSourceFileNameField( SOURCE_FILENAME );
zipFileMeta.setDynamicTargetFileNameField( TARGET_FILENAME );
zipFileMeta.setBaseFolderField( BASE_FOLDER );
zipFileMeta.setOperationType( ZipFileMeta.getOperationTypeByDesc( OPERATION_TYPE ) );
zipFileMeta.setaddTargetFileNametoResult( ADD_RESULT_FILENAME );
zipFileMeta.setOverwriteZipEntry( OVERWRITE_ZIP_ENTRY );
zipFileMeta.setCreateParentFolder( CREATE_PARENT_FOLDER );
zipFileMeta.setKeepSouceFolder( KEEP_SOURCE_FOLDER );
zipFileMeta.setMoveToFolderField( MOVE_TO_FOLDER_FIELD );
assertEquals( SOURCE_FILENAME, zipFileMeta.getDynamicSourceFileNameField() );
assertEquals( TARGET_FILENAME, zipFileMeta.getDynamicTargetFileNameField() );
assertEquals( BASE_FOLDER, zipFileMeta.getBaseFolderField() );
assertEquals( ZipFileMeta.getOperationTypeByDesc( OPERATION_TYPE ), zipFileMeta.getOperationType() );
assertEquals( MOVE_TO_FOLDER_FIELD, zipFileMeta.getMoveToFolderField() );
assertTrue( zipFileMeta.isaddTargetFileNametoResult() );
assertTrue( zipFileMeta.isOverwriteZipEntry() );
assertTrue( zipFileMeta.isKeepSouceFolder() );
assertTrue( zipFileMeta.isCreateParentFolder() );
assertEquals( MOVE_TO_FOLDER_FIELD, zipFileMeta.getMoveToFolderField() );
assertNotNull( zipFileMeta.getStepData() );
assertTrue( zipFileMeta.supportsErrorHandling() );
}
内容来源于网络,如有侵权,请联系作者删除!