本文整理汇总了Java中org.pentaho.di.repository.RepositoriesMeta类的典型用法代码示例。如果您正苦于以下问题:Java RepositoriesMeta类的具体用法?Java RepositoriesMeta怎么用?Java RepositoriesMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RepositoriesMeta类属于org.pentaho.di.repository包,在下文中一共展示了RepositoriesMeta类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: RepositoriesDialog
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public RepositoriesDialog(Display disp, int perm[], String toolName)
{
display = disp;
toolsPermissions = perm;
steploader = StepLoader.getInstance();
this.toolName = toolName;
shell = new Shell(disp, SWT.DIALOG_TRIM | SWT.MAX | SWT.MIN | SWT.RESIZE);
shell.setText(Messages.getString("RepositoriesDialog.Dialog.Main.Title"));
log = LogWriter.getInstance();
props = PropsUI.getInstance();
input = new RepositoriesMeta(log);
repinfo = null;
userinfo = null;
cancelled = false;
input.readData();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:RepositoriesDialog.java
示例2: openRepository
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
private Repository openRepository(String repositoryName, String user, String pass) throws KettleException {
if (Const.isEmpty(repositoryName)) return null;
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
repositoriesMeta.readData();
RepositoryMeta repositoryMeta = repositoriesMeta.findRepository( repositoryName );
PluginRegistry registry = PluginRegistry.getInstance();
Repository repository = registry.loadClass(
RepositoryPluginType.class,
repositoryMeta,
Repository.class
);
repository.init(repositoryMeta);
repository.connect(user, pass);
return repository;
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:ExecuteTransServlet.java
示例3: openRepository
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
private void openRepository(String repositoryId) throws KettleXMLException {
try {
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
repositoriesMeta.readData();
repositoryMeta = repositoriesMeta.findRepository( repositoryId );
PluginRegistry registry = PluginRegistry.getInstance();
repository = registry.loadClass(
RepositoryPluginType.class,
repositoryMeta,
Repository.class
);
repository.init(repositoryMeta);
repository.connect(repositoryUsername, repositoryPassword);
} catch(Exception e) {
throw new KettleXMLException(e);
}
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:20,代码来源:SlaveServerConfig.java
示例4: openRepository
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
private Repository openRepository( String repositoryName, String user, String pass ) throws KettleException {
if ( Utils.isEmpty( repositoryName ) ) {
return null;
}
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
repositoriesMeta.readData();
RepositoryMeta repositoryMeta = repositoriesMeta.findRepository( repositoryName );
if ( repositoryMeta == null ) {
throw new KettleException( "Unable to find repository: " + repositoryName );
}
PluginRegistry registry = PluginRegistry.getInstance();
Repository repository = registry.loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );
repository.init( repositoryMeta );
repository.connect( user, pass );
return repository;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:ExecuteJobServlet.java
示例5: connectRepository
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public Repository connectRepository( RepositoriesMeta repositoriesMeta, String repositoryName, String username, String password ) throws KettleException {
RepositoryMeta repositoryMeta = repositoriesMeta.findRepository( repositoryName );
if ( repositoryMeta == null ) {
log.logBasic( "I couldn't find the repository with name '" + repositoryName + "'" );
return null;
}
Repository rep = PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repositoryMeta,
Repository.class );
rep.init( repositoryMeta );
try {
rep.connect( username, password );
log.logBasic( "Connected to " + repositoryName + " as " + username );
setRepository( rep );
return rep;
} catch ( Exception e ) {
log.logBasic( "Unable to connect to the repository with name '" + repositoryName + "'" );
return null;
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:JobExecutionConfiguration.java
示例6: connectRepository
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public Repository connectRepository( RepositoriesMeta repositoriesMeta, String repositoryName, String username, String password ) throws KettleException {
RepositoryMeta repositoryMeta = repositoriesMeta.findRepository( repositoryName );
if ( repositoryMeta == null ) {
log.logBasic( "I couldn't find the repository with name '" + repositoryName + "'" );
return null;
}
Repository rep = PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );
if ( rep == null ) {
log.logBasic( "Unable to load repository plugin for '" + repositoryName + "'" );
return null;
}
rep.init( repositoryMeta );
try {
rep.connect( username, password );
setRepository( rep );
return rep;
} catch ( Exception e ) {
log.logBasic( "Unable to connect to the repository with name '" + repositoryName + "'" );
return null;
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:TransExecutionConfiguration.java
示例7: KettleDatabaseRepositoryDialog
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public KettleDatabaseRepositoryDialog( Shell parent, int style,
RepositoryMeta repositoryMeta,
RepositoriesMeta repositoriesMeta ) {
this.display = parent.getDisplay();
this.props = PropsUI.getInstance();
this.input = (KettleDatabaseRepositoryMeta) repositoryMeta;
this.repositories = repositoriesMeta;
this.masterRepositoriesMeta = repositoriesMeta.clone();
this.masterRepositoryName = repositoryMeta.getName();
shell =
new Shell( parent, style | SWT.DIALOG_TRIM | SWT.RESIZE
| SWT.MAX | SWT.MIN | SWT.APPLICATION_MODAL | SWT.SHEET );
shell.setText( BaseMessages.getString( PKG, "RepositoryDialog.Dialog.Main.Title" ) );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:KettleDatabaseRepositoryDialog.java
示例8: initRepository
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
/**
* 初始化资源库
*
* @param repo
* 资源库
* @param isConnected
* (是否重新连接)
*/
private void initRepository(T entity, boolean isConnected)
throws KettleException {
if (null != entity) {
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
DatabaseMeta db = new DatabaseMeta();
db.setDatabaseType(entity.getDialect());
db.setAccessType(Integer.parseInt(entity.getAccess()));
db.setDBName(entity.getDb());
db.setHostname(entity.getServer());
db.setDBPort(entity.getPort());
db.setUsername(entity.getUsername());
db.setPassword(entity.getPassword());
KettleDatabaseRepositoryMeta rmeta = new KettleDatabaseRepositoryMeta();
rmeta.setConnection(db);
rmeta.setId(entity.getType());
rmeta.setName(entity.getName());
repositoriesMeta.addDatabase(db);
repositoriesMeta.addRepository(rmeta);
// 选择加载过的资源库
RepositoryMeta meta = repositoriesMeta.findRepository(entity
.getName());
KettleClientEnvironment.init();
// 获得资源库实例
repo = PluginRegistry.getInstance().loadClass(
RepositoryPluginType.class, meta.getId(), Repository.class);
repo.init(meta);
// 连接资源库
repo.connect(entity.getUser(), entity.getPass());
if (!isConnected) {
list.add(repo);
}
}
}
开发者ID:jiangzongyao,项目名称:kettle_support_kettle8.0,代码行数:42,代码来源:KettleReposServiceImpl.java
示例9: initRepository
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
/**
* 初始化资源库
*
* @param repo
* 资源库
* @param isConnected
* (是否重新连接)
*/
private void initRepository(T entity, boolean isConnected)
throws KettleException {
if (null != entity) {
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
DatabaseMeta db = new DatabaseMeta();
db.setDatabaseType(entity.getDialect());
db.setAccessType(Integer.parseInt(entity.getAccess()));
db.setDBName(entity.getDb());
db.setHostname(entity.getServer());
db.setDBPort(entity.getPort());
db.setUsername(entity.getUsername());
db.setPassword(entity.getPassword());
KettleDatabaseRepositoryMeta rmeta = new KettleDatabaseRepositoryMeta();
rmeta.setConnection(db);
rmeta.setId(entity.getType());
rmeta.setName(entity.getName());
repositoriesMeta.addDatabase(db);
repositoriesMeta.addRepository(rmeta);
// 选择加载过的资源库
RepositoryMeta meta = repositoriesMeta.findRepository(entity
.getName());
// 获得资源库实例
repo = PluginRegistry.getInstance().loadClass(
RepositoryPluginType.class, meta.getId(), Repository.class);
repo.init(meta);
// 连接资源库
repo.connect(entity.getUser(), entity.getPass());
if (!isConnected) {
list.add(repo);
}
}
}
开发者ID:839536,项目名称:kettle,代码行数:41,代码来源:KettleReposServiceImpl.java
示例10: connectRep
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
private void connectRep(LogWriter log,String realrepName, String realusername, String realpassword) throws Exception
{
this.repsinfo = new RepositoriesMeta(log);
if (!this.repsinfo.readData())
{
log.logError(toString(),Messages.getString("JobExportRepository.Error.NoRep"));
throw new Exception(Messages.getString("JobExportRepository.Error.NoRep"));
}
this.repinfo = this.repsinfo.findRepository(realrepName);
if (this.repinfo==null)
{
log.logError(toString(),Messages.getString("JobExportRepository.Error.NoRepSystem"));
throw new Exception(Messages.getString("JobExportRepository.Error.NoRepSystem"));
}
this.repo = new Repository(log, this.repinfo, this.userinfo);
if (!this.repo.connect("Export job entry"))
{
log.logError(toString(),Messages.getString("JobExportRepository.Error.CanNotConnectRep"));
throw new Exception(Messages.getString("JobExportRepository.Error.CanNotConnectRep"));
}
// Check username, password
// Just for Job entry security
// We don't need it at all to export
if(log.isDebug()) log.logDebug(toString(), Messages.getString("JobExportRepository.Log.CheckSuppliedUserPass"));
this.userinfo = new UserInfo(this.repo, realusername, realpassword);
if(log.isDebug()) log.logDebug(toString(), Messages.getString("JobExportRepository.Log.CheckingUser",userinfo.getName()));
if (this.userinfo.getID()<=0)
{
log.logError(toString(),Messages.getString("JobExportRepository.Error.CanNotVerifyUserPass"));
throw new Exception(Messages.getString("JobExportRepository.Error.CanNotVerifyUserPass"));
}
if(log.isDebug()) log.logDebug(toString(), Messages.getString("JobExportRepository.Log.SuppliedUserPassVerified"));
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:39,代码来源:JobEntryExportRepository.java
示例11: RepositoryDialog
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public RepositoryDialog(Shell par, int style, LogWriter l, PropsUI pr, RepositoryMeta in, RepositoriesMeta rep, StepLoader steploader)
{
parent = par;
display = parent.getDisplay();
this.steploader = steploader;
shell = new Shell(display, style | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );
shell.setText(Messages.getString("RepositoryDialog.Dialog.Main.Title")); //$NON-NLS-1$
log=l;
props=pr;
input=in;
repositories=rep;
//System.out.println("input.connection = "+input.getConnection());
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:16,代码来源:RepositoryDialog.java
示例12: KettleDatabaseRepositoryDialog
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public KettleDatabaseRepositoryDialog(Shell parent, int style, RepositoryMeta repositoryMeta,
RepositoriesMeta repositoriesMeta) {
this.display = parent.getDisplay();
this.props = PropsUI.getInstance();
this.input = (KettleDatabaseRepositoryMeta) repositoryMeta;
this.repositories = repositoriesMeta;
this.masterRepositoriesMeta = repositoriesMeta.clone();
this.masterRepositoryName = repositoryMeta.getName();
shell = new Shell(parent, style | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN | SWT.APPLICATION_MODAL);
shell.setText(BaseMessages.getString(PKG, "RepositoryDialog.Dialog.Main.Title")); //$NON-NLS-1$
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:14,代码来源:KettleDatabaseRepositoryDialog.java
示例13: KettleFileRepositoryDialog
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public KettleFileRepositoryDialog(Shell parent, int style, RepositoryMeta repositoryMeta,
RepositoriesMeta repositoriesMeta) {
this.display = parent.getDisplay();
this.props = PropsUI.getInstance();
this.input = (KettleFileRepositoryMeta) repositoryMeta;
this.masterRepositoriesMeta = repositoriesMeta.clone();
this.masterRepositoryName = repositoryMeta.getName();
//this.repositories = repositoriesMeta;
shell = new Shell(parent, style | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN);
shell.setText(BaseMessages.getString(PKG, "KettleFileRepositoryDialog.Dialog.Main.Title")); //$NON-NLS-1$
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:13,代码来源:KettleFileRepositoryDialog.java
示例14: KettleDatabaseRepositoryDialog
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public KettleDatabaseRepositoryDialog(Shell parent, int style, RepositoryMeta repositoryMeta,
RepositoriesMeta repositoriesMeta) {
this.display = parent.getDisplay();
this.props = PropsUI.getInstance();
this.input = (KettleDatabaseRepositoryMeta) repositoryMeta;
this.repositories = repositoriesMeta;
this.masterRepositoriesMeta = repositoriesMeta.clone();
this.masterRepositoryName = repositoryMeta.getName();
shell = new Shell(parent, style | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN | SWT.APPLICATION_MODAL| SWT.SHEET);
shell.setText(BaseMessages.getString(PKG, "RepositoryDialog.Dialog.Main.Title")); //$NON-NLS-1$
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:14,代码来源:KettleDatabaseRepositoryDialog.java
示例15: dumpRepositoryNames
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
private void dumpRepositoryNames() {
try {
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
repositoriesMeta.readData(); // Read from the default $HOME/.kettle/repositories.xml file.
for ( int i = 0; i < repositoriesMeta.nrRepositories(); i++ ) {
RepositoryMeta repoMeta = repositoriesMeta.getRepository( i );
log.debug( "Found repo: " + repoMeta.getName() + " type: " + repoMeta.getClass().getName() ); //$NON-NLS-1$//$NON-NLS-2$
}
} catch ( Exception e ) {
e.printStackTrace();
}
}
开发者ID:pentaho,项目名称:pdi-platform-plugin,代码行数:13,代码来源:EngineMetaLoader.java
示例16: openRepository
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
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 );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:29,代码来源:SlaveServerConfig.java
示例17: populate
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
@Override public void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ) {
super.populate( properties, repositoriesMeta );
String databaseConnection = (String) properties.get( DATABASE_CONNECTION );
DatabaseMeta databaseMeta = repositoriesMeta.searchDatabase( databaseConnection );
if ( databaseMeta != null ) {
setConnection( databaseMeta );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:KettleDatabaseRepositoryMeta.java
示例18: populate
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
@Override public void populate( Map<String, Object> properties, RepositoriesMeta repositoriesMeta ) {
super.populate( properties, repositoriesMeta );
Boolean showHiddenFolders = (Boolean) properties.get( SHOW_HIDDEN_FOLDERS );
String location = (String) properties.get( LOCATION );
Boolean doNotModify = (Boolean) properties.get( DO_NOT_MODIFY );
setHidingHiddenFiles( showHiddenFolders );
setBaseDirectory( location );
setReadOnly( doNotModify );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:KettleFileRepositoryMeta.java
示例19: getRepositoryDialog
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
protected RepositoryDialogInterface getRepositoryDialog( PluginInterface plugin, RepositoryMeta repositoryMeta,
RepositoriesMeta input2, Shell shell ) throws Exception {
String className = repositoryMeta.getDialogClassName();
Class<? extends RepositoryDialogInterface> dialogClass =
PluginRegistry.getInstance().getClass( plugin, className );
Constructor<?> constructor =
dialogClass.getConstructor( Shell.class, Integer.TYPE, RepositoryMeta.class, RepositoriesMeta.class );
return (RepositoryDialogInterface) constructor.newInstance( new Object[] {
shell, Integer.valueOf( SWT.NONE ), repositoryMeta, input, } );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:RepositoriesHelper.java
示例20: KettleFileRepositoryDialog
import org.pentaho.di.repository.RepositoriesMeta; //导入依赖的package包/类
public KettleFileRepositoryDialog( Shell parent, int style, RepositoryMeta repositoryMeta,
RepositoriesMeta repositoriesMeta ) {
this.display = parent.getDisplay();
this.props = PropsUI.getInstance();
this.input = (KettleFileRepositoryMeta) repositoryMeta;
this.masterRepositoriesMeta = repositoriesMeta.clone();
this.masterRepositoryName = repositoryMeta.getName();
// this.repositories = repositoriesMeta;
shell = new Shell( parent, style | SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );
shell.setText( BaseMessages.getString( PKG, "KettleFileRepositoryDialog.Dialog.Main.Title" ) );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:13,代码来源:KettleFileRepositoryDialog.java
注:本文中的org.pentaho.di.repository.RepositoriesMeta类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论