Codota Logo
JobEntryCopyFiles
Code IndexAdd Codota to your IDE (free)

How to use
JobEntryCopyFiles
in
org.pentaho.di.job.entries.copyfiles

Best Java code snippets using org.pentaho.di.job.entries.copyfiles.JobEntryCopyFiles (Showing top 18 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: pentaho/pentaho-kettle

jobEntry.setName( wName.getText() );
jobEntry.setCopyEmptyFolders( wCopyEmptyFolders.getSelection() );
jobEntry.setoverwrite_files( wOverwriteFiles.getSelection() );
jobEntry.setIncludeSubfolders( wIncludeSubfolders.getSelection() );
jobEntry.setArgFromPrevious( wPrevious.getSelection() );
jobEntry.setRemoveSourceFiles( wRemoveSourceFiles.getSelection() );
jobEntry.setAddresultfilesname( wAddFileToResult.getSelection() );
jobEntry.setDestinationIsAFile( wDestinationIsAFile.getSelection() );
jobEntry.setCreateDestinationFolder( wCreateDestinationFolder.getSelection() );
 source = JobEntryCopyFiles.SOURCE_URL + i + "-" + source;
 dest = JobEntryCopyFiles.DEST_URL + i + "-" + dest;
 jobEntry.source_filefolder[i] = jobEntry.loadURL( source, sourceNc, getMetaStore(), sourceDestinationMappings );
 jobEntry.destination_filefolder[i] = jobEntry.loadURL( dest, destNc, getMetaStore(), sourceDestinationMappings );
 jobEntry.wildcard[i] = wild;
jobEntry.setConfigurationMappings( sourceDestinationMappings );
origin: pentaho/pentaho-kettle

if ( jobEntry.getName() != null ) {
 wName.setText( jobEntry.getName() );
  if ( jobEntry.source_filefolder[i] != null ) {
   String sourceUrl = jobEntry.source_filefolder[i];
   String clusterName = jobEntry.getConfigurationBy( sourceUrl );
   if ( clusterName != null ) {
    clusterName =
    sourceUrl =
      clusterName.equals( LOCAL_ENVIRONMENT ) || clusterName.equals( STATIC_ENVIRONMENT ) ? sourceUrl
        : jobEntry.getUrlPath( sourceUrl );
   String clusterName = jobEntry.getConfigurationBy( destinationURL );
   if ( clusterName != null ) {
    clusterName = clusterName.startsWith( JobEntryCopyFiles.LOCAL_DEST_FILE ) ? LOCAL_ENVIRONMENT : clusterName;
    destinationURL =
      clusterName.equals( LOCAL_ENVIRONMENT ) || clusterName.equals( STATIC_ENVIRONMENT ) ? destinationURL
        : jobEntry.getUrlPath( destinationURL );
origin: pentaho/pentaho-kettle

String[] vsourcefilefolder = preprocessfilefilder( source_filefolder );
String[] vdestinationfilefolder = preprocessfilefilder( destination_filefolder );
if ( source_filefolder != null ) {
 for ( int i = 0; i < source_filefolder.length; i++ ) {
  retval.append( "        <field>" ).append( Const.CR );
  saveSource( retval, source_filefolder[i] );
  saveDestination( retval, destination_filefolder[i] );
  if ( parentJobMeta != null ) {
   parentJobMeta.getNamedClusterEmbedManager().registerUrl( vsourcefilefolder[i] );
origin: pentaho/pentaho-kettle

public JobEntryCopyFilesDialog( Shell parent, JobEntryInterface jobEntryInt, Repository rep, JobMeta jobMeta ) {
 super( parent, jobEntryInt, rep, jobMeta );
 jobEntry = (JobEntryCopyFiles) jobEntryInt;
 if ( this.jobEntry.getName() == null ) {
  this.jobEntry.setName( BaseMessages.getString( PKG, "JobCopyFiles.Name.Default" ) );
 }
}
origin: pentaho/pentaho-kettle

protected String loadSourceRep( Repository rep, ObjectId id_jobentry, int a ) throws KettleException {
 String source_filefolder = rep.getJobEntryAttributeString( id_jobentry, a, SOURCE_FILE_FOLDER );
 String ncName = rep.getJobEntryAttributeString( id_jobentry, a, SOURCE_CONFIGURATION_NAME );
 return loadURL( source_filefolder, ncName, getMetaStore(), configurationMappings );
}
origin: pentaho/pentaho-kettle

if ( isBasic() ) {
 logBasic( BaseMessages.getString( PKG, "JobCopyFiles.Log.Starting" ) );
 String[] vsourcefilefolder = preprocessfilefilder( source_filefolder );
 String[] vdestinationfilefolder = preprocessfilefilder( destination_filefolder );
 String[] vwildcard = wildcard;
  if ( isDetailed() ) {
   logDetailed( BaseMessages.getString( PKG, "JobCopyFiles.Log.ArgFromPrevious.Found", ( rows != null ? rows
     .size() : 0 )
     + "" ) );
    if ( isDetailed() ) {
     logDetailed( BaseMessages.getString( PKG, "JobCopyFiles.Log.ProcessingRow",
      KettleVFS.getFriendlyURI( environmentSubstitute( vsourcefilefolder_previous ) ),
      KettleVFS.getFriendlyURI( environmentSubstitute( vdestinationfilefolder_previous ) ),
      vwildcard_previous ) );
    if ( !processFileFolder( vsourcefilefolder_previous, vdestinationfilefolder_previous, vwildcard_previous,
      parentJob, result ) ) {
    if ( isDetailed() ) {
     logDetailed( BaseMessages.getString( PKG, "JobCopyFiles.Log.IgnoringRow",
      KettleVFS.getFriendlyURI( environmentSubstitute( vsourcefilefolder[ iteration ] ) ),
      KettleVFS.getFriendlyURI( environmentSubstitute( vdestinationfilefolder[ iteration ] ) ),
      vwildcard[ iteration ] ) );
    if ( isBasic() ) {
     logBasic( BaseMessages.getString( PKG, "JobCopyFiles.Log.ProcessingRow",
origin: pentaho/pentaho-kettle

@Test
public void fileCopied() throws Exception {
 String srcPath = "path/to/file";
 String destPath = "path/to/dir";
 entry.source_filefolder = new String[] { srcPath };
 entry.destination_filefolder = new String[] { destPath };
 entry.wildcard = new String[] { EMPTY };
 Result result = entry.execute( new Result(), 0 );
 verify( entry ).processFileFolder( anyString(), anyString(),
   anyString(), any( Job.class ), any( Result.class ) );
 verify( entry, atLeast( 1 ) ).preprocessfilefilder( any( String[].class ) );
 assertFalse( result.getResult() );
 assertEquals( 1, result.getNrErrors() );
 verify( mockNamedClusterEmbedManager ).passEmbeddedMetastoreKey( anyObject(), anyString() );
}
origin: pentaho/pentaho-kettle

@Test
public void fileNotCopied() throws Exception {
 entry.source_filefolder = new String[] { EMPTY };
 entry.destination_filefolder = new String[] { EMPTY };
 entry.wildcard = new String[] { EMPTY };
 entry.execute( new Result(), 0 );
 verify( entry, never() ).processFileFolder( anyString(), anyString(),
   anyString(), any( Job.class ), any( Result.class ) );
}
origin: pentaho/pentaho-kettle

public void check( List<CheckResultInterface> remarks, JobMeta jobMeta, VariableSpace space,
 Repository repository, IMetaStore metaStore ) {
 boolean res = JobEntryValidatorUtils.andValidator().validate( this, "arguments", remarks, AndValidator.putValidators( JobEntryValidatorUtils.notNullValidator() ) );
 if ( !res ) {
  return;
 }
 ValidatorContext ctx = new ValidatorContext();
 AbstractFileValidator.putVariableSpace( ctx, getVariables() );
 AndValidator.putValidators( ctx, JobEntryValidatorUtils.notNullValidator(), JobEntryValidatorUtils.fileExistsValidator() );
 for ( int i = 0; i < source_filefolder.length; i++ ) {
  JobEntryValidatorUtils.andValidator().validate( this, "arguments[" + i + "]", remarks, ctx );
 }
}
origin: pentaho/big-data-plugin

 wFields.getActiveTableItem().setText( wFields.getActiveTableColumn() - 1, S3_ENVIRONMENT );
} else if ( namedClusterWidget != null && namedClusterWidget.getSelectedNamedCluster() != null ) {
 url = jobEntry.getUrlPath( url );
 wFields.getActiveTableItem().setText( wFields.getActiveTableColumn() - 1,
  namedClusterWidget.getSelectedNamedCluster().getName() );
origin: pentaho/pentaho-kettle

protected String loadDestinationRep( Repository rep, ObjectId id_jobentry, int a ) throws KettleException {
 String destination_filefolder = rep.getJobEntryAttributeString( id_jobentry, a, DESTINATION_FILE_FOLDER );
 String ncName = rep.getJobEntryAttributeString( id_jobentry, a, DESTINATION_CONFIGURATION_NAME );
 return loadURL( destination_filefolder, ncName, getMetaStore(), configurationMappings );
}
origin: pentaho/big-data-plugin

public JobEntryHadoopCopyFilesDialog( Shell parent, JobEntryInterface jobEntryInt, Repository rep, JobMeta jobMeta ) {
 super( parent, jobEntryInt, rep, jobMeta );
 jobEntry = (JobEntryCopyFiles) jobEntryInt;
 jobEntryHadoopCopyFiles = (JobEntryHadoopCopyFiles) jobEntry;
 namedClusterService = jobEntryHadoopCopyFiles.getNamedClusterService();
 runtimeTestActionService = jobEntryHadoopCopyFiles.getRuntimeTestActionService();
 runtimeTester = jobEntryHadoopCopyFiles.getRuntimeTester();
 if ( this.jobEntry.getName() == null ) {
  this.jobEntry.setName( BaseMessages.getString( BASE_PKG, "JobCopyFiles.Name.Default" ) );
 }
}
origin: pentaho/pentaho-kettle

@Test
public void filesCopied() throws Exception {
 String[] srcPath = new String[] { "path1", "path2", "path3" };
 String[] destPath = new String[] { "dest1", "dest2", "dest3" };
 entry.source_filefolder = srcPath;
 entry.destination_filefolder = destPath;
 entry.wildcard = new String[] { EMPTY, EMPTY, EMPTY };
 Result result = entry.execute( new Result(), 0 );
 verify( entry, times( srcPath.length ) ).processFileFolder( anyString(), anyString(),
   anyString(), any( Job.class ), any( Result.class ) );
 assertFalse( result.getResult() );
 assertEquals( 3, result.getNrErrors() );
}
origin: pentaho/big-data-plugin

@VisibleForTesting
@Override protected VariableSpace getVariables() {
 return super.getVariables();
}
origin: pentaho/big-data-plugin

jobEntry.setName( wName.getText() );
jobEntry.setCopyEmptyFolders( wCopyEmptyFolders.getSelection() );
jobEntry.setoverwrite_files( wOverwriteFiles.getSelection() );
jobEntry.setIncludeSubfolders( wIncludeSubfolders.getSelection() );
jobEntry.setArgFromPrevious( wPrevious.getSelection() );
jobEntry.setRemoveSourceFiles( wRemoveSourceFiles.getSelection() );
jobEntry.setAddresultfilesname( wAddFileToResult.getSelection() );
jobEntry.setDestinationIsAFile( wDestinationIsAFile.getSelection() );
jobEntry.setCreateDestinationFolder( wCreateDestinationFolder.getSelection() );
 dest = JobEntryCopyFiles.DEST_URL + i + "-" + dest;
 jobEntry.source_filefolder[i] = jobEntry.loadURL( source, sourceNc, getMetaStore(), namedClusterURLMappings );
 jobEntry.destination_filefolder[i] = jobEntry.loadURL( dest, destNc, getMetaStore(), namedClusterURLMappings );
 jobEntry.wildcard[i] = wild;
jobEntry.setConfigurationMappings( namedClusterURLMappings );
dispose();
origin: pentaho/big-data-plugin

if ( jobEntry.getName() != null ) {
 wName.setText( jobEntry.getName() );
  if ( jobEntry.source_filefolder[i] != null ) {
   String sourceUrl = jobEntry.source_filefolder[i];
   String clusterName = jobEntry.getConfigurationBy( sourceUrl );
   if ( clusterName != null ) {
    clusterName =
    sourceUrl =
      clusterName.equals( LOCAL_ENVIRONMENT ) || clusterName.equals( STATIC_ENVIRONMENT )
       || clusterName.equals( S3_ENVIRONMENT ) ? sourceUrl : jobEntry.getUrlPath(
        sourceUrl.replace( JobEntryCopyFiles.SOURCE_URL + i + "-", "" ) );
   String clusterName = jobEntry.getConfigurationBy( destinationURL );
   if ( clusterName != null ) {
    clusterName =
    destinationURL =
      clusterName.equals( LOCAL_ENVIRONMENT ) || clusterName.equals( STATIC_ENVIRONMENT )
       || clusterName.equals( S3_ENVIRONMENT ) ? destinationURL : jobEntry.getUrlPath(
        destinationURL.replace( JobEntryCopyFiles.DEST_URL + i + "-", "" ) );
origin: pentaho/pentaho-kettle

protected String loadDestination( Node fnode ) {
 String destination_filefolder = XMLHandler.getTagValue( fnode, DESTINATION_FILE_FOLDER );
 String ncName = XMLHandler.getTagValue( fnode, DESTINATION_CONFIGURATION_NAME );
 return loadURL( destination_filefolder, ncName, getMetaStore(), configurationMappings );
}
origin: pentaho/pentaho-kettle

protected String loadSource( Node fnode ) {
 String source_filefolder = XMLHandler.getTagValue( fnode, SOURCE_FILE_FOLDER );
 String ncName = XMLHandler.getTagValue( fnode, SOURCE_CONFIGURATION_NAME );
 return loadURL( source_filefolder, ncName, getMetaStore(), configurationMappings );
}
org.pentaho.di.job.entries.copyfilesJobEntryCopyFiles

Javadoc

This defines a 'copy files' job entry.

Most used methods

  • loadURL
  • getConfigurationBy
  • getName
  • getUrlPath
  • getVariables
  • preprocessfilefilder
  • processFileFolder
  • setAddresultfilesname
  • setArgFromPrevious
  • setConfigurationMappings
  • setCopyEmptyFolders
  • setCreateDestinationFolder
  • setCopyEmptyFolders,
  • setCreateDestinationFolder,
  • setDestinationIsAFile,
  • setIncludeSubfolders,
  • setName,
  • setRemoveSourceFiles,
  • setoverwrite_files,
  • <init>,
  • CreateDestinationFolder,
  • allocate

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
  • onCreateOptionsMenu (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • JTextField (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now