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

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

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

Repository.getObjectInformation介绍

[英]Get more information about a certain object ID in the form of the RepositoryObject
[中]以RepositoryObject的形式获取有关特定对象ID的更多信息

代码示例

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

@Override
public RepositoryObject getObjectInformation( ObjectId objectId, RepositoryObjectType repositoryObjectType ) throws KettleException {
 return getDelegate().getObjectInformation( objectId, repositoryObjectType );
}

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

try {
 RepositoryObject objectInformation =
  repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
 if ( objectInformation != null ) {
  transName = objectInformation.getName();

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

try {
 RepositoryObject objectInformation =
  repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
 if ( objectInformation != null ) {
  transName = objectInformation.getName();

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

try {
 RepositoryObject objectInformation =
  repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
 if ( objectInformation != null ) {
  transName = objectInformation.getName();

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

try {
 RepositoryObject objectInformation =
  rep.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
 if ( objectInformation != null ) {
  transname = objectInformation.getName();

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

try {
 RepositoryObject objectInformation =
  repository.getObjectInformation( jobObjectId, RepositoryObjectType.TRANSFORMATION );
 if ( objectInformation != null ) {
  jobName = objectInformation.getName();

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

RepositoryObject objectInformation = rep.getObjectInformation( jobObjectId, RepositoryObjectType.JOB );
if ( objectInformation != null ) {
 jobname = objectInformation.getName();

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

try {
 RepositoryObject objectInformation =
  repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
 if ( objectInformation != null ) {
  transName = objectInformation.getName();

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

private boolean renameRecent( String id, String type, String name ) {
 RepositoryObject repositoryObject = null;
 try {
  repositoryObject = getRepository().getObjectInformation( () -> id,
   ( type.equals( TRANSFORMATION ) ? RepositoryObjectType.TRANSFORMATION : RepositoryObjectType.JOB ) );
 } catch ( Exception e ) {
  return false;
 }
 if ( repositoryObject != null ) {
  Collection<List<LastUsedFile>> lastUsedRepoFiles = PropsUI.getInstance().getLastUsedRepoFiles().values();
  for ( List<LastUsedFile> lastUsedFiles : lastUsedRepoFiles ) {
   for ( LastUsedFile lastUsedFile : lastUsedFiles ) {
    if ( lastUsedFile.getDirectory().equals( repositoryObject.getRepositoryDirectory().getPath() ) && lastUsedFile
     .getFilename().equals( repositoryObject.getName() ) ) {
     lastUsedFile.setFilename( name );
     return true;
    }
   }
  }
 }
 return true;
}

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

DatabaseMeta dbMeta = repository.loadDatabaseMeta( dbId, null );
RepositoryElementMetaInterface repoMeta =
 repository.getObjectInformation( dbId, RepositoryObjectType.DATABASE );
UIDatabaseConnection conn = createUIConnection( dbMeta );
if ( conn != null ) {

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

private void getByReferenceData( ObjectId transObjectId ) {
  try {
   if ( repository == null ) {
    throw new KettleException( BaseMessages.getString(
     PKG, "MappingDialog.Exception.NotConnectedToRepository.Message" ) );
   }
   RepositoryObject transInf = repository.getObjectInformation( transObjectId, RepositoryObjectType.JOB );
   if ( transInf != null ) {
    getByReferenceData( transInf );
   }
  } catch ( KettleException e ) {
   new ErrorDialog( shell,
    BaseMessages.getString( PKG, "MappingDialog.Exception.UnableToReferenceObjectId.Title" ),
    BaseMessages.getString( PKG, "MappingDialog.Exception.UnableToReferenceObjectId.Message" ), e );
  }
 }
}

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

public void setName( String name, boolean renameHomeDirectories ) throws Exception {
 if ( getDirectory().getName().equalsIgnoreCase( name ) ) {
  return;
 }
 if ( rep instanceof RepositoryExtended ) {
  ( (RepositoryExtended) rep ).renameRepositoryDirectory( getDirectory().getObjectId(), null, name,
    renameHomeDirectories );
 } else {
  rep.renameRepositoryDirectory( getDirectory().getObjectId(), null, name );
 }
 // Update the object reference so the new name is displayed
 obj = rep.getObjectInformation( getObjectId(), getRepositoryElementType() );
 refresh();
}

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

private void getByReferenceData( ObjectId transObjectId ) {
 try {
  RepositoryObject transInf = repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
  String path = DialogUtils
   .getPath( transMeta.getRepositoryDirectory().getPath(), transInf.getRepositoryDirectory().getPath() );
  String fullPath =
   Const.NVL( path, "" ) + "/" + Const.NVL( transInf.getName(), "" );
  wPath.setText( fullPath );
 } catch ( KettleException e ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "JobEntryTransDialog.Exception.UnableToReferenceObjectId.Title" ),
   BaseMessages.getString( PKG, "JobEntryTransDialog.Exception.UnableToReferenceObjectId.Message" ), e );
 }
}

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

private void getByReferenceData( ObjectId referenceObjectId ) {
 try {
  RepositoryObject jobInf = rep.getObjectInformation( referenceObjectId, RepositoryObjectType.JOB );
  String path =
   DialogUtils.getPath( jobMeta.getRepositoryDirectory().getPath(), jobInf.getRepositoryDirectory().getPath() );
  String fullPath =
   Const.NVL( path, "" ) + "/" + Const.NVL( jobInf.getName(), "" );
  wPath.setText( fullPath );
 } catch ( KettleException e ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "JobEntryJobDialog.Exception.UnableToReferenceObjectId.Title" ),
   BaseMessages.getString( PKG, "JobEntryJobDialog.Exception.UnableToReferenceObjectId.Message" ), e );
 }
}

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

private void getByReferenceData( ObjectId transObjectId ) {
 try {
  RepositoryObject transInf = rep.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
  String path =
   DialogUtils.getPath( jobMeta.getRepositoryDirectory().getPath(), transInf.getRepositoryDirectory().getPath() );
  String fullPath =
   Const.NVL( path, "" ) + "/" + Const.NVL( transInf.getName(), "" );
  wPath.setText( fullPath );
 } catch ( KettleException e ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "JobEntryTransDialog.Exception.UnableToReferenceObjectId.Title" ),
   BaseMessages.getString( PKG, "JobEntryTransDialog.Exception.UnableToReferenceObjectId.Message" ), e );
 }
}

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

private void getByReferenceData( ObjectId jobObjectId ) {
 try {
  RepositoryObject jobInf = repository.getObjectInformation( jobObjectId, RepositoryObjectType.JOB );
  String path =
   DialogUtils.getPath( transMeta.getRepositoryDirectory().getPath(), jobInf.getRepositoryDirectory().getPath() );
  String fullPath =
   Const.NVL( path, "" ) + "/" + Const.NVL( jobInf.getName(), "" );
  wPath.setText( fullPath );
 } catch ( KettleException e ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "JobEntryJobDialog.Exception.UnableToReferenceObjectId.Title" ),
   BaseMessages.getString( PKG, "JobEntryJobDialog.Exception.UnableToReferenceObjectId.Message" ), e );
 }
}

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

private void getByReferenceData( ObjectId transObjectId ) {
 try {
  RepositoryObject transInf = repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
  String path = DialogUtils
   .getPath( transMeta.getRepositoryDirectory().getPath(), transInf.getRepositoryDirectory().getPath() );
  String fullPath =
   Const.NVL( path, "" ) + "/" + Const.NVL( transInf.getName(), "" );
  wPath.setText( fullPath );
 } catch ( KettleException e ) {
  new ErrorDialog( shell,
   BaseMessages.getString( PKG, "JobEntryTransDialog.Exception.UnableToReferenceObjectId.Title" ),
   BaseMessages.getString( PKG, "JobEntryTransDialog.Exception.UnableToReferenceObjectId.Message" ), e );
 }
}

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

private void getByReferenceData( ObjectId transObjectId ) {
 try {
  if ( repository == null ) {
   throw new KettleException( BaseMessages.getString(
    PKG, "MappingDialog.Exception.NotConnectedToRepository.Message" ) );
  }
  RepositoryObject transInf = repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
  String path = DialogUtils
   .getPath( transMeta.getRepositoryDirectory().getPath(), transInf.getRepositoryDirectory().getPath() );
  String fullPath =
   Const.NVL( path, "" ) + "/" + Const.NVL( transInf.getName(), "" );
  wPath.setText( fullPath );
 } catch ( KettleException e ) {
  new ErrorDialog( shell, BaseMessages.getString(
   PKG, "MappingDialog.Exception.UnableToReferenceObjectId.Title" ), BaseMessages.getString(
   PKG, "MappingDialog.Exception.UnableToReferenceObjectId.Message" ), e );
 }
}

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

private void getByReferenceData( ObjectId transObjectId ) {
 try {
  if ( repository == null ) {
   throw new KettleException( BaseMessages.getString(
    PKG, "SimpleMappingDialog.Exception.NotConnectedToRepository.Message" ) );
  }
  RepositoryObject transInf = repository.getObjectInformation( transObjectId, RepositoryObjectType.TRANSFORMATION );
  String path = DialogUtils
   .getPath( transMeta.getRepositoryDirectory().getPath(), transInf.getRepositoryDirectory().getPath() );
  String fullPath =
   Const.NVL( path, "" ) + "/" + Const.NVL( transInf.getName(), "" );
  wPath.setText( fullPath );
 } catch ( KettleException e ) {
  new ErrorDialog( shell, BaseMessages.getString(
   PKG, "SimpleMappingDialog.Exception.UnableToReferenceObjectId.Title" ), BaseMessages.getString(
   PKG, "SimpleMappingDialog.Exception.UnableToReferenceObjectId.Message" ), e );
 }
}

相关文章

Repository类方法