• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RepositoryObjectInterface类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.pentaho.di.repository.RepositoryObjectInterface的典型用法代码示例。如果您正苦于以下问题:Java RepositoryObjectInterface类的具体用法?Java RepositoryObjectInterface怎么用?Java RepositoryObjectInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

RepositoryObjectInterface类属于org.pentaho.di.repository包,在下文中一共展示了RepositoryObjectInterface类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: loadFiles

点赞 3

import org.pentaho.di.repository.RepositoryObjectInterface; //导入依赖的package包/类
public List<RepositoryFile> loadFiles( String id ) {
  try {
    List<RepositoryElementMetaInterface> repositoryElementMetaInterfaces =
      getRepository().getJobAndTransformationObjects( () -> id, false );
    List<RepositoryFile> repositoryFiles = new ArrayList<>();
    for ( RepositoryObjectInterface repositoryObject : repositoryElementMetaInterfaces ) {
      org.pentaho.di.repository.RepositoryObject ro = (org.pentaho.di.repository.RepositoryObject) repositoryObject;
      RepositoryFile repositoryFile = new RepositoryFile();
      repositoryFile.setObjectId( repositoryObject.getObjectId() );
      repositoryFile.setName( repositoryObject.getName() );
      repositoryFile.setType( ro.getObjectType().getTypeDescription() );
      repositoryFile.setExtension( ro.getObjectType().getExtension() );
      repositoryFile.setDate( ro.getModifiedDate() );
      repositoryFile.setObjectId( ro.getObjectId() );
      repositoryFile.setPath( ro.getRepositoryDirectory().getPath() );
      repositoryFiles.add( repositoryFile );
    }
    return repositoryFiles;
  } catch ( KettleException ke ) {
    return Collections.emptyList();
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:23,
代码来源:RepositoryBrowserController.java

示例2: getChildren

点赞 3

import org.pentaho.di.repository.RepositoryObjectInterface; //导入依赖的package包/类
@Override
public FileObject[] getChildren() throws FileSystemException {
  try {
    RepositoryDirectoryInterface dir = provider.getRepo().findDirectory( path );
    if ( dir == null ) {
      return null;
    }
    List<RepositoryObjectInterface> ch = new ArrayList<>();
    ch.addAll( dir.getChildren() );
    ch.addAll( dir.getRepositoryObjects() );

    FileObject[] result = new RepositoryVfsFileObject[ch.size()];
    for ( int i = 0; i < ch.size(); i++ ) {
      result[i] = new RepositoryVfsFileObject( provider, path + '/' + ch.get( i ).getName() );
    }
    return result;
  } catch ( Exception ex ) {
    throw new FileSystemException( ex );
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:21,
代码来源:RepositoryVfsFileObject.java

示例3: UIRepositoryObject

点赞 2

import org.pentaho.di.repository.RepositoryObjectInterface; //导入依赖的package包/类
public UIRepositoryObject(RepositoryObjectInterface obj) {
  this();
  this.obj = obj;
}
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:5,
代码来源:UIRepositoryObject.java

示例4: UIRepositoryObject

点赞 2

import org.pentaho.di.repository.RepositoryObjectInterface; //导入依赖的package包/类
public UIRepositoryObject( RepositoryObjectInterface obj ) {
  this();
  this.obj = obj;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:5,
代码来源:UIRepositoryObject.java

示例5: getRepositoryObject

点赞 2

import org.pentaho.di.repository.RepositoryObjectInterface; //导入依赖的package包/类
public RepositoryObjectInterface getRepositoryObject() {
  return repositoryObject;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:4,
代码来源:FileDialogOperation.java

示例6: setRepositoryObject

点赞 2

import org.pentaho.di.repository.RepositoryObjectInterface; //导入依赖的package包/类
public void setRepositoryObject( RepositoryObjectInterface repositoryObject ) {
  this.repositoryObject = repositoryObject;
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:4,
代码来源:FileDialogOperation.java

示例7: createRepositoryDirectory

点赞 2

import org.pentaho.di.repository.RepositoryObjectInterface; //导入依赖的package包/类
private void createRepositoryDirectory( RepositoryDirectoryInterface repositoryDirectoryInterface,
                                        List<RepositoryDirectory> repositoryDirectories, int depth,
                                        RepositoryDirectory parent, String filter ) {
  RepositoryDirectory repositoryDirectory = new RepositoryDirectory();
  repositoryDirectory.setName( repositoryDirectoryInterface.getName() );
  repositoryDirectory.setPath( repositoryDirectoryInterface.getPath() );
  repositoryDirectory.setObjectId( repositoryDirectoryInterface.getObjectId() );
  repositoryDirectory.setDepth( depth );
  repositoryDirectories.add( repositoryDirectory );
  if ( parent != null ) {
    repositoryDirectory.setParent( parent.getPath() );
    parent.addChild( repositoryDirectory );
  }
  if ( !Utils.isEmpty( repositoryDirectoryInterface.getChildren() ) ) {
    repositoryDirectory.setHasChildren( true );
    for ( RepositoryDirectoryInterface child : repositoryDirectoryInterface.getChildren() ) {
      createRepositoryDirectory( child, repositoryDirectories, depth + 1, repositoryDirectory, filter );
    }
  }
  List<RepositoryElementMetaInterface> repositoryElementMetaInterfaces = new ArrayList<>();
  if ( repositoryDirectoryInterface.getRepositoryObjects() == null ) {
    try {
      repositoryElementMetaInterfaces =
        getRepository().getJobAndTransformationObjects( repositoryDirectoryInterface.getObjectId(), false );
    } catch ( KettleException ke ) {
      // Ignore for now
    }
  } else {
    repositoryElementMetaInterfaces = repositoryDirectoryInterface.getRepositoryObjects();
  }
  Date latestDate = null;
  for ( RepositoryObjectInterface repositoryObject : repositoryElementMetaInterfaces ) {
    org.pentaho.di.repository.RepositoryObject ro = (org.pentaho.di.repository.RepositoryObject) repositoryObject;
    String extension = ro.getObjectType().getExtension();
    if ( !Util.isFiltered( extension, filter ) ) {
      RepositoryFile repositoryFile = new RepositoryFile();
      repositoryFile.setObjectId( repositoryObject.getObjectId() );
      repositoryFile.setName( repositoryObject.getName() );
      repositoryFile.setType( ro.getObjectType().getTypeDescription() );
      repositoryFile.setExtension( extension );
      repositoryFile.setDate( ro.getModifiedDate() );
      repositoryFile.setObjectId( ro.getObjectId() );
      repositoryFile.setPath( ro.getRepositoryDirectory().getPath() );
      repositoryDirectory.addChild( repositoryFile );
    }
    if ( latestDate == null || ro.getModifiedDate().after( latestDate ) ) {
      latestDate = ro.getModifiedDate();
    }
  }
  repositoryDirectory.setDate( latestDate );
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:52,
代码来源:RepositoryBrowserController.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)