@Test public void testExportResources() throws Exception { XMLOutputMeta xmlOutputMeta = new XMLOutputMeta(); xmlOutputMeta.setDefault(); ResourceNamingInterface resourceNamingInterface = mock( ResourceNamingInterface.class ); Variables space = new Variables(); when( resourceNamingInterface.nameResource( any( FileObject.class ), eq( space ), eq( true ) ) ).thenReturn( "exportFile" ); xmlOutputMeta.exportResources( space, null, resourceNamingInterface, null, null ); assertEquals( "exportFile", xmlOutputMeta.getFileName() ); }
public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { if ( !Utils.isEmpty( fileName ) ) { FileObject fileObject = KettleVFS.getFileObject( space.environmentSubstitute( fileName ), space ); fileName = resourceNamingInterface.nameResource( fileObject, space, true ); } return null; } catch ( Exception e ) { throw new KettleException( e ); } }
XMLOutputMeta extends BaseStepMeta implements StepMetaInterface { public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { if ( !Utils.isEmpty( fileName ) ) { FileObject fileObject = KettleVFS.getFileObject( space.environmentSubstitute( fileName ), space ); fileName = resourceNamingInterface.nameResource( fileObject, space, true ); } return null; } catch ( Exception e ) { throw new KettleException( e ); } } }
XMLOutputMeta extends BaseStepMeta implements StepMetaInterface { public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { if ( !Utils.isEmpty( fileName ) ) { FileObject fileObject = KettleVFS.getFileObject( space.environmentSubstitute( fileName ), space ); fileName = resourceNamingInterface.nameResource( fileObject, space, true ); } return null; } catch ( Exception e ) { throw new KettleException( e ); } } XMLOutputMeta(); }
XMLOutputMeta extends BaseStepMeta implements StepMetaInterface { public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { if ( !Utils.isEmpty( fileName ) ) { FileObject fileObject = KettleVFS.getFileObject( space.environmentSubstitute( fileName ), space ); fileName = resourceNamingInterface.nameResource( fileObject, space, true ); } return null; } catch ( Exception e ) { throw new KettleException( e ); } } XMLOutputMeta(); boolean isDateInFilename(); void setDateInFilename( boolean dateInFilename ); String getExtension(); void setExtension( String extension ); boolean isDoNotOpenNewFileInit(); void setDoNotOpenNewFileInit( boolean doNotOpenNewFileInit ); String getFileName(); void setFileName( String fileName ); int getSplitEvery(); void setSplitEvery( int splitEvery ); boolean isStepNrInFilename(); void setStepNrInFilename( boolean stepNrInFilename ); boolean isTimeInFilename(); void setTimeInFilename( boolean timeInFilename ); boolean isAddToResultFiles(); void setAddToResultFiles( boolean addtoresultfilenamesin ); boolean isSpecifyFormat(); void setSpecifyFormat( boolean SpecifyFormat ); String getDateTimeFormat(); void setDateTimeFormat( String date_time_format ); boolean isZipped(); void setZipped( boolean zipped ); XMLField[] getOutputFields(); void setOutputFields( XMLField[] outputFields ); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void allocate( int nrfields ); Object clone(); String getNewLine( String fformat ); void setDefault(); String[] getFiles( VariableSpace space ); String buildFilename( VariableSpace space, int stepnr, int splitnr, boolean ziparchive ); void getFields( RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); RowMetaInterface getRequiredFields( VariableSpace space ); String getXML(); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta,
      Trans trans ); StepDataInterface getStepData(); String getEncoding(); void setEncoding( String encoding ); String getMainElement(); void setMainElement( String mainElement ); String getRepeatElement(); void setRepeatElement( String repeatElement ); String getNameSpace(); void setNameSpace( String nameSpace ); void setOmitNullValues( boolean omitNullValues ); boolean isOmitNullValues(); boolean isServletOutput(); void setServletOutput( boolean servletOutput ); String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
      ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ); boolean passDataToServletOutput(); }
XMLOutputMeta extends BaseStepMeta implements StepMetaInterface { public String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ) throws KettleException { try { if ( !Utils.isEmpty( fileName ) ) { FileObject fileObject = KettleVFS.getFileObject( space.environmentSubstitute( fileName ), space ); fileName = resourceNamingInterface.nameResource( fileObject, space, true ); } return null; } catch ( Exception e ) { throw new KettleException( e ); } } XMLOutputMeta(); boolean isDateInFilename(); void setDateInFilename( boolean dateInFilename ); String getExtension(); void setExtension( String extension ); boolean isDoNotOpenNewFileInit(); void setDoNotOpenNewFileInit( boolean doNotOpenNewFileInit ); String getFileName(); void setFileName( String fileName ); int getSplitEvery(); void setSplitEvery( int splitEvery ); boolean isStepNrInFilename(); void setStepNrInFilename( boolean stepNrInFilename ); boolean isTimeInFilename(); void setTimeInFilename( boolean timeInFilename ); boolean isAddToResultFiles(); void setAddToResultFiles( boolean addtoresultfilenamesin ); boolean isSpecifyFormat(); void setSpecifyFormat( boolean SpecifyFormat ); String getDateTimeFormat(); void setDateTimeFormat( String date_time_format ); boolean isZipped(); void setZipped( boolean zipped ); XMLField[] getOutputFields(); void setOutputFields( XMLField[] outputFields ); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void allocate( int nrfields ); Object clone(); String getNewLine( String fformat ); void setDefault(); String[] getFiles( VariableSpace space ); String buildFilename( VariableSpace space, int stepnr, int splitnr, boolean ziparchive ); void getFields( RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); RowMetaInterface getRequiredFields( VariableSpace space ); String getXML(); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta,
      Trans trans ); StepDataInterface getStepData(); String getEncoding(); void setEncoding( String encoding ); String getMainElement(); void setMainElement( String mainElement ); String getRepeatElement(); void setRepeatElement( String repeatElement ); String getNameSpace(); void setNameSpace( String nameSpace ); void setOmitNullValues( boolean omitNullValues ); boolean isOmitNullValues(); boolean isServletOutput(); void setServletOutput( boolean servletOutput ); String exportResources( VariableSpace space, Map<String, ResourceDefinition> definitions,
      ResourceNamingInterface resourceNamingInterface, Repository repository, IMetaStore metaStore ); boolean passDataToServletOutput();  }