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

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

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

Repository.getDirectoryNames介绍

[英]Returns the child directory names of a parent directory
[中]返回父目录的子目录名

代码示例

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

public void printRepositoryDirectories( Repository repository, RepositoryDirectoryInterface directory ) throws KettleException {
 String[] directories = repository.getDirectoryNames( directory.getObjectId() );
 if ( directories != null ) {
  for ( String dir :  directories ) {
   System.out.println( dir );
  }
 }
}

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

@Override
public String[] getDirectoryNames( ObjectId objectId ) throws KettleException {
 return getDelegate().getDirectoryNames( objectId );
}

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

/**
 * Check if a subdirectory already exists in the repository.
 * This is to help fix PDI-5202
 * Since the ui directories are case insensitive, we look for a repo directory with the same name ignoring case.
 * If we find an existing directory, we return the name so we can use that to get hold of the directory
 * as it is known in the repository.
 * If we don't find such a directory, we return null
 * @param name - the name of a subdirectory
 * @return null if the subdirectory does not exist, or the name of the subdirectory as it is known inside the repo.
 * @throws KettleException
 */
public String checkDirNameExistsInRepo( String name ) throws KettleException {
 String[] dirNames = rep.getDirectoryNames( getObjectId() );
 for ( String dirName : dirNames ) {
  if ( dirName.equalsIgnoreCase( name ) ) {
   return dirName;
  }
 }
 return null;
}

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

final String DUMMY_DIR_2 = "test-dir-2";
when( mockRepository.getDirectoryNames( anyObject() ) ).thenReturn( new String[]{ DUMMY_DIR_1, DUMMY_DIR_2 } );
when( mockRepository.loadRepositoryDirectoryTree() ).thenReturn( mockRepositoryDirectory );

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

final String DUMMY_DIR_2 = "test-dir-2";
when( mockRepository.getDirectoryNames( anyObject() ) ).thenReturn( new String[]{ DUMMY_DIR_1, DUMMY_DIR_2 } );
when( mockRepository.loadRepositoryDirectoryTree() ).thenReturn( mockRepositoryDirectory );

相关文章

Repository类方法