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

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

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

Repository.exists介绍

[英]See if a repository object exists in the repository
[中]查看存储库中是否存在存储库对象

代码示例

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

@Override
public boolean exists( String s, RepositoryDirectoryInterface repositoryDirectoryInterface, RepositoryObjectType repositoryObjectType ) throws KettleException {
 return getDelegate().exists( s, repositoryDirectoryInterface, repositoryObjectType );
}

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

/**
 * Checks if there is a duplicate file in a given directory (i.e. hidden file)
 *
 * @param path     - Path to directory in which we are saving
 * @param name     - Name of file to save
 * @param fileName - Possible duplicate file name
 * @param override - True is user wants override file, false otherwise
 * @return - true if a duplicate file is found, false otherwise
 */
private boolean hasDupeFile( String path, String name, String fileName, boolean override ) {
 try {
  RepositoryDirectoryInterface repositoryDirectoryInterface = getRepository().findDirectory( path );
  EngineMetaInterface meta = getSpoon().getActiveMeta();
  RepositoryObjectType type = "Trans".equals( meta.getFileType() )
   ? RepositoryObjectType.TRANSFORMATION : RepositoryObjectType.JOB;
  if ( getRepository().exists( name, repositoryDirectoryInterface, type ) ) {
   return !override || !name.equals( fileName );
  }
 } catch ( Exception e ) {
  System.out.println( e );
 }
 return false;
}

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

return rep.exists( lastUsedFile.getFilename(), rdi, fileType );
} catch ( final KettleException ke ) {

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

public void browseVersionHistory() {
 try {
  if ( spoon.rep.exists( transMeta.getName(), transMeta.getRepositoryDirectory(),
   RepositoryObjectType.TRANSFORMATION ) ) {
   RepositoryRevisionBrowserDialogInterface dialog =
    RepositoryExplorerDialog.getVersionBrowserDialog( shell, spoon.rep, transMeta );
   String versionLabel = dialog.open();
   if ( versionLabel != null ) {
    spoon.loadObjectFromRepository( transMeta.getName(), transMeta.getRepositoryElementType(), transMeta
     .getRepositoryDirectory(), versionLabel );
   }
  } else {
   modalMessageDialog( getString( "TransGraph.Sorry" ),
    getString( "TransGraph.VersionBrowser.CantFindInRepo" ), SWT.CLOSE | SWT.ICON_ERROR );
  }
 } catch ( Exception e ) {
  new ErrorDialog( shell, BaseMessages.getString( PKG, "TransGraph.VersionBrowserException.Title" ), BaseMessages
   .getString( PKG, "TransGraph.VersionBrowserException.Message" ), e );
 }
}

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

switch ( type ) {
 case JOB:
  if ( getRepository().exists( newName, repositoryDirectoryInterface, RepositoryObjectType.JOB ) ) {
   throw new KettleObjectExistsException();
  break;
 case TRANSFORMATION:
  if ( getRepository().exists( newName, repositoryDirectoryInterface, RepositoryObjectType.TRANSFORMATION ) ) {
   throw new KettleObjectExistsException();

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

boolean exists = spoon.rep.exists( exactJobname, repDir, RepositoryObjectType.JOB );
if ( !exists ) {
 launchJobMeta = new JobMeta();

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

if ( !rep.exists( lastUsedFile.getFilename(), rdi, fileType ) ) {

相关文章

Repository类方法