本文整理了Java中org.pentaho.di.repository.Repository.renameRepositoryDirectory
方法的一些代码示例,展示了Repository.renameRepositoryDirectory
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.renameRepositoryDirectory
方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:renameRepositoryDirectory
[英]Move / rename a repository directory
[中]
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public ObjectId renameRepositoryDirectory( ObjectId objectId, RepositoryDirectoryInterface repositoryDirectoryInterface, String s ) throws KettleException {
return getDelegate().renameRepositoryDirectory( objectId, repositoryDirectoryInterface, s );
}
代码示例来源:origin: pentaho/pentaho-kettle
public void setName( String name ) throws Exception {
if ( getDirectory().getName().equalsIgnoreCase( name ) ) {
return;
}
rep.renameRepositoryDirectory( getDirectory().getObjectId(), null, name );
// Update the object reference so the new name is displayed
obj = rep.findDirectory( getObjectId() );
getParent().refresh();
}
代码示例来源: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
public boolean renameDirectory( RepositoryDirectoryInterface repdir, String name, String newname ) {
boolean retval = false;
try {
if ( Utils.isEmpty( newname ) ) {
throw new KettleException( BaseMessages.getString(
PKG, "RepositoryExplorerDialog.Exception.NameCanNotBeEmpty" ) );
}
if ( !name.equals( newname ) ) {
repdir.setName( newname );
try {
rep.renameRepositoryDirectory( repdir.getObjectId(), repdir, newname );
retval = true;
} catch ( Exception exception ) {
retval = false;
new ErrorDialog(
shell,
BaseMessages.getString( PKG, "RepositoryExplorerDialog.Directory.Rename.UnexpectedError.Message1" )
+ name + "]" + Const.CR
+ BaseMessages.getString( PKG, "RepositoryExplorerDialog.Directory.Rename.UnexpectedError.Message2" ),
BaseMessages.getString( PKG, "RepositoryExplorerDialog.Directory.Rename.UnexpectedError.Title" ),
exception );
}
}
} catch ( KettleException e ) {
new ErrorDialog( shell,
BaseMessages.getString( PKG, "RepositoryExplorerDialog.Directory.Rename.UnexpectedError.Title" ),
BaseMessages.getString( PKG, "RepositoryExplorerDialog.Directory.Rename.UnexpectedError.Message" ), e );
}
return retval;
}
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public void move( UIRepositoryDirectory newParentDir ) throws Exception {
if ( newParentDir != null ) {
rep.renameRepositoryDirectory( obj.getObjectId(), newParentDir.getDirectory(), null );
// Try to make sure the directories are updated properly
if ( !newParentDir.equals( getParent() ) ) {
getParent().getChildren().remove( this );
newParentDir.getChildren().add( this );
getParent().refresh();
newParentDir.refresh();
}
}
}
代码示例来源:origin: pentaho/pentaho-kettle
dir.setName( newName );
try {
rep.renameRepositoryDirectory( dir.getObjectId(), dir.getParent(), newName );
ti.setText( newName );
wTree.setSelection( ti );
代码示例来源:origin: pentaho/pentaho-kettle
( (RepositoryExtended) getRepository() ).renameRepositoryDirectory( () -> id, null, newName, true );
} else {
objectId = getRepository().renameRepositoryDirectory( () -> id, null, newName );
内容来源于网络,如有侵权,请联系作者删除!