org.pentaho.di.repository.Repository.createRepositoryDirectory()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(170)

本文整理了Java中org.pentaho.di.repository.Repository.createRepositoryDirectory方法的一些代码示例,展示了Repository.createRepositoryDirectory的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.createRepositoryDirectory方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:createRepositoryDirectory

Repository.createRepositoryDirectory介绍

[英]Create a new directory, possibly by creating several sub-directies of / at the same time.
[中]创建一个新目录,可以同时创建/的多个子目录。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public RepositoryDirectoryInterface createRepositoryDirectory( RepositoryDirectoryInterface repositoryDirectoryInterface, String s ) throws KettleException {
 return getDelegate().createRepositoryDirectory( repositoryDirectoryInterface, s );
}

代码示例来源:origin: pentaho/pentaho-kettle

private RepositoryDirectoryInterface getTargetDirectory( String directoryPath, String dirOverride,
  RepositoryImportFeedbackInterface feedback ) throws KettleException {
 if ( directoryPath.isEmpty() ) {
  return baseDirectory;
 }
 RepositoryDirectoryInterface targetDirectory = null;
 if ( dirOverride != null ) {
  targetDirectory = rep.findDirectory( directoryPath );
  if ( targetDirectory == null ) {
   feedback.addLog( BaseMessages.getString( PKG, "RepositoryImporter.CreateDir.Log", directoryPath,
     getRepositoryRoot().toString() ) );
   targetDirectory = rep.createRepositoryDirectory( getRepositoryRoot(), directoryPath );
  }
 } else {
  targetDirectory = baseDirectory.findDirectory( directoryPath );
  if ( targetDirectory == null ) {
   feedback.addLog( BaseMessages.getString( PKG, "RepositoryImporter.CreateDir.Log", directoryPath, baseDirectory
     .toString() ) );
   targetDirectory = rep.createRepositoryDirectory( baseDirectory, directoryPath );
  }
 }
 return targetDirectory;
}

代码示例来源:origin: pentaho/pentaho-kettle

directory = getRepository().createRepositoryDirectory( new RepositoryDirectory( null, "/" ), dirPath );

代码示例来源:origin: pentaho/pentaho-kettle

public RepositoryDirectory create( String parent, String name ) {
 if ( hasDupeFolder( parent, name ) ) {
  return null;
 }
 try {
  RepositoryDirectoryInterface repositoryDirectoryInterface =
   getRepository().createRepositoryDirectory( findDirectory( parent ), name );
  RepositoryDirectory repositoryDirectory = new RepositoryDirectory();
  repositoryDirectory.setName( repositoryDirectoryInterface.getName() );
  repositoryDirectory.setPath( repositoryDirectoryInterface.getPath() );
  repositoryDirectory.setObjectId( repositoryDirectoryInterface.getObjectId() );
  repositoryDirectory.setParent( parent );
  return repositoryDirectory;
 } catch ( Exception e ) {
  return null;
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public UIRepositoryDirectory createFolder( String name ) throws Exception {
 RepositoryDirectoryInterface thisDir = getDirectory();
 RepositoryDirectoryInterface dir;
 //PDI-5202: the directory might exist already. If so, don't create a new one.
 String dirName = checkDirNameExistsInRepo( name );
 if ( dirName == null ) {
  dir = rep.createRepositoryDirectory( thisDir, name );
 } else {
  dir = rep.findDirectory( thisDir.getPath() + "/" + dirName );
 }
 UIRepositoryDirectory newDir = null;
 try {
  newDir = UIObjectRegistry.getInstance().constructUIRepositoryDirectory( dir, this, rep );
 } catch ( UIObjectCreationException uoe ) {
  newDir = new UIRepositoryDirectory( dir, this, rep );
 }
 UIRepositoryDirectories directories = getChildren();
 if ( !contains( directories, newDir ) ) {
  directories.add( newDir );
 } else {
  throw new KettleException( "Unable to create folder with the same name [" + name + "]" );
 }
 kidElementCache = null; // rebuild the element cache for correct positioning.
 return newDir;
}

相关文章

Repository类方法