private void patchJobEntries(JobMeta jobMeta) {
   for (JobEntryCopy copy : jobMeta.getJobCopies()) {
     if (copy.isTransformation()) {
       JobEntryTrans entry = (JobEntryTrans) copy.getEntry();
       if (entry.getSpecificationMethod()
           == ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME) {
         if (transDirOverride != null) {
           entry.setDirectory(transDirOverride);
           continue;
         }
         String entryPath = resolvePath(baseDirectory.getPath(), entry.getDirectory());
         entry.setDirectory(entryPath);
       }
     }
     if (copy.isJob()) {
       JobEntryJob entry = (JobEntryJob) copy.getEntry();
       if (entry.getSpecificationMethod()
           == ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME) {
         if (jobDirOverride != null) {
           entry.setDirectory(jobDirOverride);
           continue;
         }
         String entryPath = resolvePath(baseDirectory.getPath(), entry.getDirectory());
         entry.setDirectory(entryPath);
       }
     }
   }
 }
  public void getUsedArguments(
      JobMeta jobMeta, String[] commandLineArguments, IMetaStore metaStore) {

    for (JobEntryCopy jobEntryCopy : jobMeta.jobcopies) {
      if (jobEntryCopy.isTransformation()) {
        JobEntryTrans jobEntryTrans = (JobEntryTrans) jobEntryCopy.getEntry();
        try {
          TransMeta transMeta = jobEntryTrans.getTransMeta(repository, metaStore, jobMeta);
          Map<String, String> map = transMeta.getUsedArguments(commandLineArguments);
          for (String key : map.keySet()) {
            String value = map.get(key);
            if (!arguments.containsKey(key)) {
              arguments.put(key, value);
            }
          }
        } catch (KettleException ke) {
          log.logBasic(ke.getMessage(), ke);
        }
      }
    }
  }