當前位置: 首頁>>代碼示例>>Java>>正文


Java Repository.loadJob方法代碼示例

本文整理匯總了Java中org.pentaho.di.repository.Repository.loadJob方法的典型用法代碼示例。如果您正苦於以下問題:Java Repository.loadJob方法的具體用法?Java Repository.loadJob怎麽用?Java Repository.loadJob使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.pentaho.di.repository.Repository的用法示例。


在下文中一共展示了Repository.loadJob方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getJobMeta

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
public JobMeta getJobMeta(Repository rep, VariableSpace space) throws KettleException {
  try {
    switch(specificationMethod) {
    case FILENAME:
      return new JobMeta((space != null ? space.environmentSubstitute(getFilename()) : getFilename()), rep, null);
    case REPOSITORY_BY_NAME:
      if (rep != null) {
        String realDirectory = environmentSubstitute(getDirectory());
        RepositoryDirectoryInterface repositoryDirectory = rep.loadRepositoryDirectoryTree().findDirectory(realDirectory);
        if (repositoryDirectory==null) {
          throw new KettleException("Unable to find repository directory ["+Const.NVL(realDirectory, "")+"]");
        }
        return rep.loadJob((space != null ? space.environmentSubstitute(getJobName()) : getJobName()), repositoryDirectory, null, null); // reads
      } else {
        throw new KettleException("Could not execute job specified in a repository since we're not connected to one");
      }
    case REPOSITORY_BY_REFERENCE:
      if (rep != null) {
        // Load the last version...
        //
        return rep.loadJob(jobObjectId, null);
      } else {
        throw new KettleException("Could not execute job specified in a repository since we're not connected to one");
      }
    default: 
      throw new KettleException("The specified object location specification method '"+specificationMethod+"' is not yet supported in this job entry.");
    }
  } catch (Exception e) {
    throw new KettleException("Unexpected error during job metadata load", e);
  }

}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:33,代碼來源:JobEntryJob.java

示例2: loadJob

import org.pentaho.di.repository.Repository; //導入方法依賴的package包/類
/**
 * loadTrans:加載作業. <br/>
 * @author jingma
 * @param jobname 作業名稱
 * @param directory 作業路徑
 * @param repository 資源庫
 * @return 作業元數據
 * @throws KettleException 
 * @since JDK 1.6
 */
public static JobMeta loadJob(String jobname, String directory,Repository repository) throws KettleException {
	RepositoryDirectoryInterface dir = repository.findDirectory(directory);
	return repository.loadJob(jobname,dir,null, null);
}
 
開發者ID:majinju,項目名稱:KettleEasyExpand,代碼行數:15,代碼來源:KettleUtils.java


注:本文中的org.pentaho.di.repository.Repository.loadJob方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。