本文整理汇总了Java中org.pentaho.di.repository.RepositoryDirectoryInterface.addSubdirectory方法的典型用法代码示例。如果您正苦于以下问题:Java RepositoryDirectoryInterface.addSubdirectory方法的具体用法?Java RepositoryDirectoryInterface.addSubdirectory怎么用?Java RepositoryDirectoryInterface.addSubdirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.repository.RepositoryDirectoryInterface
的用法示例。
在下文中一共展示了RepositoryDirectoryInterface.addSubdirectory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadRepositoryDirectoryTree
import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
public RepositoryDirectoryInterface loadRepositoryDirectoryTree(RepositoryDirectoryInterface root) throws KettleException {
try {
synchronized(repository){
root.clear();
ObjectId subids[] = repository.getSubDirectoryIDs(root.getObjectId());
for (int i = 0; i < subids.length; i++) {
RepositoryDirectory subdir = new RepositoryDirectory();
loadRepositoryDirectory(subdir, subids[i]);
root.addSubdirectory(subdir);
}
}
return root;
} catch (Exception e) {
throw new KettleException("An error occured loading the directory tree from the repository", e);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:KettleDatabaseRepositoryDirectoryDelegate.java
示例2: createRepositoryDirectory
import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
public RepositoryDirectoryInterface createRepositoryDirectory(RepositoryDirectoryInterface parentDirectory, String directoryPath) throws KettleException {
String folder = calcDirectoryName(parentDirectory);
String newFolder = folder;
if (folder.endsWith("/")) newFolder+=directoryPath; else newFolder+="/"+directoryPath;
FileObject parent = KettleVFS.getFileObject(newFolder);
try {
parent.createFolder();
} catch (FileSystemException e) {
throw new KettleException("Unable to create folder "+newFolder, e);
}
// Incremental change of the directory structure...
//
RepositoryDirectory newDir = new RepositoryDirectory(parentDirectory, directoryPath);
parentDirectory.addSubdirectory(newDir);
newDir.setObjectId(new StringObjectId(newDir.toString()));
return newDir;
}
示例3: loadRepositoryDirectoryTree
import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
public RepositoryDirectoryInterface loadRepositoryDirectoryTree(RepositoryDirectoryInterface dir) throws KettleException {
try {
String folderName = calcDirectoryName(dir);
FileObject folder = KettleVFS.getFileObject(folderName);
for (FileObject child : folder.getChildren()) {
if (child.getType().equals(FileType.FOLDER)) {
if (!child.isHidden() || !repositoryMeta.isHidingHiddenFiles()) {
RepositoryDirectory subDir = new RepositoryDirectory(dir, child.getName().getBaseName());
subDir.setObjectId(new StringObjectId(calcObjectId(subDir)));
dir.addSubdirectory(subDir);
loadRepositoryDirectoryTree(subDir);
}
}
}
return dir;
}
catch(Exception e) {
throw new KettleException("Unable to load the directory tree from this file repository", e);
}
}