public FileInputList getDynamicFolderList( VariableSpace space, String[] folderName, String[] folderRequired) { return FileInputList.createFolderList(space, folderName, folderRequired); }
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev, String input[], String output[], RowMetaInterface info) { CheckResult cr; // See if we get input... if (isFoldernameDynamic) { if (input.length > 0) cr = new CheckResult( CheckResultInterface.TYPE_RESULT_OK, Messages.getString("GetSubFoldersMeta.CheckResult.InputOk"), stepinfo); else cr = new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, Messages.getString("GetSubFoldersMeta.CheckResult.InputErrorKo"), stepinfo); remarks.add(cr); if (Const.isEmpty(dynamicFoldernameField)) cr = new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, Messages.getString("GetSubFoldersMeta.CheckResult.FolderFieldnameMissing"), stepinfo); else cr = new CheckResult( CheckResultInterface.TYPE_RESULT_OK, Messages.getString("GetSubFoldersMeta.CheckResult.FolderFieldnameOk"), stepinfo); remarks.add(cr); } else { if (input.length > 0) cr = new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, Messages.getString("GetSubFoldersMeta.CheckResult.NoInputError"), stepinfo); else cr = new CheckResult( CheckResultInterface.TYPE_RESULT_OK, Messages.getString("GetSubFoldersMeta.CheckResult.NoInputOk"), stepinfo); remarks.add(cr); // check specified folder names FileInputList fileList = getFolderList(transMeta); if (fileList.nrOfFiles() == 0) { cr = new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, Messages.getString("GetSubFoldersMeta.CheckResult.ExpectedFoldersError"), stepinfo); remarks.add(cr); } else { cr = new CheckResult( CheckResultInterface.TYPE_RESULT_OK, Messages.getString( "GetSubFoldersMeta.CheckResult.ExpectedFilesOk", "" + fileList.nrOfFiles()), stepinfo); remarks.add(cr); } } }
public FileInputList getFolderList(VariableSpace space) { return FileInputList.createFolderList(space, folderName, folderRequired); }