本文整理了Java中org.pentaho.di.repository.Repository.getName
方法的一些代码示例,展示了Repository.getName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getName
方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:getName
暂无
代码示例来源:origin: pentaho/pentaho-kettle
public boolean isConnected( String name ) {
if ( spoonSupplier.get().rep != null ) {
return spoonSupplier.get().rep.getName().equals( name );
}
return false;
}
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public String getName() {
return getDelegate().getName();
}
代码示例来源:origin: pentaho/pentaho-kettle
@SuppressWarnings( "unchecked" )
public String getRepositories() {
String connected = null;
if ( spoonSupplier.get() != null && spoonSupplier.get().rep != null ) {
connected = spoonSupplier.get().rep.getName();
}
List<JSONObject> list = new ArrayList<>();
if ( repositoriesMeta != null ) {
for ( int i = 0; i < repositoriesMeta.nrRepositories(); i++ ) {
RepositoryMeta repositoryMeta = repositoriesMeta.getRepository( i );
JSONObject repoJson = repositoryMeta.toJSONObject();
if ( connected != null && repositoryMeta.getName().equals( connected ) ) {
repoJson.put( "connected", true );
}
list.add( repoJson );
}
}
return list.toString();
}
代码示例来源:origin: pentaho/pentaho-kettle
public RepositoryName getCurrentRepo() {
return new RepositoryName( getRepository().getName() );
}
代码示例来源:origin: pentaho/pentaho-kettle
xml.append( XMLHandler.addTagValue( "name", repository.getName() ) );
代码示例来源:origin: pentaho/pentaho-kettle
xml.append( XMLHandler.addTagValue( "name", repository.getName() ) );
代码示例来源:origin: pentaho/pentaho-kettle
String repoAndUser = Spoon.getInstance().rep.getName() + ":" + ( userInfo != null ? userInfo.getLogin() : "" );
List<LastUsedFile> lastUsedFiles =
props.getLastUsedRepoFiles().getOrDefault( repoAndUser, Collections.emptyList() );
.equals( Spoon.getInstance().rep.getName() ) ) {
RepositoryFile repositoryFile = new RepositoryFile();
final String index = String.valueOf( i );
代码示例来源:origin: pentaho/pentaho-kettle
public void init() {
bf = new SwtBindingFactory();
bf.setDocument( this.getXulDomContainer().getDocumentRoot() );
createBindings();
if ( dialog != null && repository != null ) {
dialog.setTitle( BaseMessages.getString( PKG, "RepositoryExplorerDialog.DevTitle", repository.getName() ) );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
private void loadLastUsedFiles() {
if ( props.openLastFile() ) {
if ( log.isDetailed() ) {
// "Trying to open the last file used."
log.logDetailed( BaseMessages.getString( PKG, "Spoon.Log.TryingOpenLastUsedFile" ) );
}
List<LastUsedFile> lastUsedFiles = props.getOpenTabFiles();
for ( LastUsedFile lastUsedFile : lastUsedFiles ) {
try {
if ( !lastUsedFile.isSourceRepository()
|| lastUsedFile.isSourceRepository() && rep != null
&& rep.getName().equals( lastUsedFile.getRepositoryName() ) ) {
loadLastUsedFileAtStartup( lastUsedFile, rep == null ? null : rep.getName() );
}
} catch ( Exception e ) {
hideSplash();
new ErrorDialog(
shell, BaseMessages.getString( PKG, "Spoon.LoadLastUsedFile.Exception.Title" ), BaseMessages
.getString( PKG, "Spoon.LoadLastUsedFile.Exception.Message", lastUsedFile.toString() ), e );
}
}
}
}
代码示例来源:origin: pentaho/pentaho-kettle
&& ( rep == null || !rep.getName().equalsIgnoreCase( lastUsedFile.getRepositoryName() ) ) ) {
loadLastUsedFile( lastUsedFile, rep == null ? null : rep.getName() );
addMenuLast();
} catch ( KettleException ke ) {
代码示例来源:origin: pentaho/pentaho-kettle
if ( !lastUsedFile.isSourceRepository() || !rep.getName().equalsIgnoreCase( lastUsedFile.getRepositoryName() ) ) {
return false;
代码示例来源:origin: pentaho/pentaho-kettle
public void setRepository( Repository rep ) {
this.rep = rep;
this.repositoryName = rep != null ? rep.getName() : null;
try {
} else {
log.logBasic( "No metastore found in the repository : "
+ rep.getName() + ", connected? " + rep.isConnected() );
代码示例来源:origin: pentaho/pentaho-kettle
if ( !Reponame.equals( rep.getName() ) ) {
logError( BaseMessages.getString(
PKG, "JobEntryConnectedToRepository.Error.DiffRep", rep.getName(), Reponame ) );
return result;
logDetailed( BaseMessages.getString( PKG, "JobEntryConnectedToRepository.Log.Connected", rep.getName(), rep
.getUserInfo() != null ? rep.getUserInfo().getLogin() : "" ) );
代码示例来源:origin: pentaho/pentaho-kettle
@Override public void callExtensionPoint( LogChannelInterface logChannelInterface, Object o ) throws KettleException {
FileDialogOperation fileDialogOperation = (FileDialogOperation) o;
PropsUI propsUI = propsUISupplier.get();
String startingDir = null;
if ( fileDialogOperation.getRepository() == null ) {
String username = getRepository().getUserInfo() != null ? getRepository().getUserInfo().getLogin() : "";
String repoAndUser = getRepository().getName() + ":" + username;
List<LastUsedFile> lastUsedFileList =
propsUI.getLastUsedRepoFiles().getOrDefault( repoAndUser, Collections.emptyList() );
startingDir = getStartingDir( fileDialogOperation, lastUsedFileList );
} else {
startingDir = fileDialogOperation.getStartDir();
}
RepositoryOpenSaveDialog repositoryOpenSaveDialog =
new RepositoryOpenSaveDialog( spoonSupplier.get().getShell(), WIDTH, HEIGHT );
repositoryOpenSaveDialog.open( fileDialogOperation.getRepository(), startingDir, fileDialogOperation.getCommand(),
fileDialogOperation.getTitle(), fileDialogOperation.getFilter(), fileDialogOperation.getOrigin(),
fileDialogOperation.getFilename(), fileDialogOperation.getFileType() );
if ( !Utils.isEmpty( repositoryOpenSaveDialog.getObjectName() ) ) {
RepositoryObject repositoryObject = new RepositoryObject();
repositoryObject.setObjectId( repositoryOpenSaveDialog::getObjectId );
repositoryObject.setName( repositoryOpenSaveDialog.getObjectName() );
repositoryObject
.setRepositoryDirectory( getRepository().findDirectory( repositoryOpenSaveDialog.getObjectDirectory() ) );
repositoryObject.setObjectType(
repositoryOpenSaveDialog.getObjectType().equals( TRANSFORMATION ) ? RepositoryObjectType.TRANSFORMATION
: RepositoryObjectType.JOB );
fileDialogOperation.setRepositoryObject( repositoryObject );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
fileType, filename, directory, rep != null, rep != null ? rep.getName() : null, openType );
代码示例来源:origin: pentaho/pentaho-kettle
private void openRepository( String repositoryId ) throws KettleException {
try {
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
repositoriesMeta.readData();
repositoryMeta = repositoriesMeta.findRepository( repositoryId );
if ( repositoryMeta == null ) {
throw new KettleException( "Unable to find repository: " + repositoryId );
}
PluginRegistry registry = PluginRegistry.getInstance();
repository = registry.loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );
repository.init( repositoryMeta );
repository.connect( repositoryUsername, repositoryPassword );
// Add the repository MetaStore to the delegation as well.
// Set this one as active with the highest priority
//
if ( repository.getMetaStore() != null ) {
metaStore.addMetaStore( 0, repository.getMetaStore() );
metaStore.setActiveMetaStoreName( repository.getMetaStore().getName() );
}
LogChannel.GENERAL.logBasic( "Connected to repository '" + repository.getName() + "'" );
} catch ( Exception e ) {
throw new KettleException( "Unable to open repository connection", e );
}
}
代码示例来源:origin: pentaho/pentaho-kettle
.getName() ) );
props.addLastFile( LastUsedFile.FILE_TYPE_TRANSFORMATION, objName, repDir.getPath(), true, rep.getName(),
getUsername(), null );
addMenuLast();
jobMeta.clearChanged();
if ( jobMeta != null ) {
props.addLastFile( LastUsedFile.FILE_TYPE_JOB, objName, repDir.getPath(), true, rep.getName(), getUsername(),
null );
saveSettings();
代码示例来源:origin: pentaho/pentaho-kettle
if ( rep.getName().equalsIgnoreCase( lastUsedFile.getRepositoryName() ) ) {
RepositoryDirectoryInterface rdi = rep.findDirectory( lastUsedFile.getDirectory() );
if ( rdi != null ) {
if ( trackIt ) {
props.addLastFile( LastUsedFile.FILE_TYPE_TRANSFORMATION, lastUsedFile.getFilename(), rdi
.getPath(), true, rep.getName(), getUsername(), null );
props.addLastFile(
LastUsedFile.FILE_TYPE_JOB, lastUsedFile.getFilename(), rdi.getPath(), true, rep
.getName(), getUsername(), null );
代码示例来源:origin: pentaho/pentaho-kettle
cmdFile =
"kitchen "
+ "/rep:\"" + rep.getName() + "\"" + " /user:\""
+ ( rep.getUserInfo() != null ? rep.getUserInfo().getLogin() : "" ) + "\"" + " /pass:\""
+ Encr.encryptPasswordIfNotUsingVariables( rep.getUserInfo().getPassword() ) + "\""
"sh kitchen.sh "
+ "-rep='"
+ rep.getName()
+ "'"
+ " -user='"
"pan "
+ "/rep:\""
+ rep.getName()
+ "\""
+ " /user:\""
"sh pan.sh "
+ "-rep='"
+ rep.getName()
+ "'"
+ " -user='"
代码示例来源:origin: pentaho/pentaho-kettle
.getRepositoryDirectory().getPath(), true, rep.getName(), getUsername(), null );
addMenuLast();
addTransGraph( transMeta );
if ( jobMeta != null ) {
props.addLastFile( LastUsedFile.FILE_TYPE_JOB, jobMeta.getName(), jobMeta
.getRepositoryDirectory().getPath(), true, rep.getName(), getUsername(), null );
saveSettings();
addMenuLast();
内容来源于网络,如有侵权,请联系作者删除!