本文整理了Java中org.pentaho.di.repository.Repository.getSecurityProvider
方法的一些代码示例,展示了Repository.getSecurityProvider
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.getSecurityProvider
方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:getSecurityProvider
暂无
代码示例来源:origin: pentaho/pentaho-kettle
private static boolean checkIsVersioningEnabledOnServer( Repository rep, EngineMetaInterface jobTransMeta ) {
boolean versioningEnabled = true;
String fullPath = getJobTransfFullPath( jobTransMeta );
RepositorySecurityProvider
repositorySecurityProvider =
rep != null && rep.getSecurityProvider() != null ? rep.getSecurityProvider() : null;
if ( repositorySecurityProvider != null && fullPath != null ) {
versioningEnabled = repositorySecurityProvider.isVersioningEnabled( fullPath );
}
return versioningEnabled;
}
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public RepositorySecurityProvider getSecurityProvider() {
return getDelegate().getSecurityProvider();
}
代码示例来源:origin: pentaho/pentaho-kettle
public SelectDirectoryDialog( Shell parent, int style, Repository rep ) {
super( parent, style );
this.props = PropsUI.getInstance();
this.rep = rep;
selection = null;
readOnly = rep.getSecurityProvider().isReadOnly();
}
代码示例来源:origin: pentaho/pentaho-kettle
private RepositoryExplorerDialog( Shell par, int style, Repository rep, VariableSpace variableSpace ) {
super( par, style );
this.props = PropsUI.getInstance();
this.rep = rep;
this.log = rep.getLog();
this.variableSpace = variableSpace;
sortColumn = 0;
ascending = false;
objectMap = new HashMap<String, RepositoryElementMetaInterface>();
repositoryMeta = rep.getRepositoryMeta();
capabilities = repositoryMeta.getRepositoryCapabilities();
securityProvider = rep.getSecurityProvider();
securityManager = rep.getSecurityManager();
readonly = securityProvider.isReadOnly();
includeDeleted = false;
}
代码示例来源:origin: pentaho/pentaho-kettle
protected <T extends SharedObjectInterface & RepositoryElementInterface & ChangedFlagInterface>
void saveSharedObjectToRepository( T sharedObject, String versionComment ) throws KettleException {
Repository rep = spoon.getRepository();
if ( rep != null ) {
if ( !rep.getSecurityProvider().isReadOnly() ) {
rep.save( sharedObject, versionComment, null );
sharedObject.clearChanged();
} else {
throw new KettleException( BaseMessages.getString(
PKG, "Spoon.Dialog.Exception.ReadOnlyRepositoryUser" ) );
}
}
}
代码示例来源:origin: pentaho/pentaho-kettle
public static String getVersionComment( Shell shell, Repository repository, String operationDescription,
String fullPath, boolean forceEntry ) {
//forceEntry is used to force the comment prompt when multiple files will be affected. It
//removes a web service call per file.
if ( repository == null ) {
return null;
}
RepositorySecurityProvider provider = repository.getSecurityProvider();
if ( forceEntry || provider.allowsVersionComments( fullPath ) ) {
String explanation = "Enter a comment ";
if ( provider.isVersionCommentMandatory() ) {
explanation += "(Mandatory) : ";
} else {
explanation += ": ";
}
String versionComment = "Checked in";
EnterStringDialog dialog = new EnterStringDialog( shell, versionComment, "Enter comment", explanation );
dialog.setManditory( provider.isVersionCommentMandatory() );
versionComment = dialog.open();
return versionComment;
}
return null;
}
代码示例来源:origin: pentaho/pentaho-kettle
public Repository establishRepositoryConnection( RepositoryMeta repositoryMeta, final String username, final String password,
final RepositoryOperation... operations ) throws KettleException, KettleSecurityException {
Repository rep = PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );
rep.init( repositoryMeta );
rep.getLog().setLogLevel( getLog().getLogLevel() );
rep.connect( username != null ? username : null, password != null ? password : null );
if ( operations != null ) {
// throws KettleSecurityException if username does does have permission for given operations
rep.getSecurityProvider().validateAction( operations );
}
return rep;
}
代码示例来源:origin: pentaho/pentaho-kettle
repository.getSecurityProvider().validateAction( operations );
代码示例来源:origin: pentaho/pentaho-kettle
&& rep.getSecurityProvider() != null && versionComment == null ) {
return;
if ( Utils.isEmpty( versionComment ) && rep.getSecurityProvider().isVersionCommentMandatory() ) {
if ( !RepositorySecurityUI.showVersionCommentMandatoryDialog( shell ) ) {
versionOk = true;
代码示例来源:origin: pentaho/pentaho-kettle
public void newSlaveServer( HasSlaveServersInterface hasSlaveServersInterface ) {
SlaveServer slaveServer = new SlaveServer();
SlaveServerDialog dialog =
new SlaveServerDialog( spoon.getShell(), slaveServer, hasSlaveServersInterface.getSlaveServers() );
if ( dialog.open() ) {
slaveServer.verifyAndModifySlaveServerName( hasSlaveServersInterface.getSlaveServers(), null );
hasSlaveServersInterface.getSlaveServers().add( slaveServer );
if ( spoon.rep != null ) {
try {
if ( !spoon.rep.getSecurityProvider().isReadOnly() ) {
spoon.rep.save( slaveServer, Const.VERSION_COMMENT_INITIAL_VERSION, null );
// repository objects are "global"
if ( sharedObjectSyncUtil != null ) {
sharedObjectSyncUtil.reloadJobRepositoryObjects( false );
sharedObjectSyncUtil.reloadTransformationRepositoryObjects( false );
}
} else {
showSaveErrorDialog( slaveServer,
new KettleException( BaseMessages.getString( PKG, "Spoon.Dialog.Exception.ReadOnlyRepositoryUser" ) ) );
}
} catch ( KettleException e ) {
showSaveErrorDialog( slaveServer, e );
}
}
refreshTree();
}
}
代码示例来源:origin: pentaho/pentaho-kettle
if ( rep.getSecurityProvider().getUserInfo() != null
&& !realUsername.equals( rep.getSecurityProvider().getUserInfo().getLogin() ) ) {
logError( BaseMessages.getString( PKG, "JobEntryConnectedToRepository.Error.DiffUser", rep
.getUserInfo().getLogin(), realUsername ) );
代码示例来源:origin: pentaho/pentaho-kettle
String fullPath = getJobTransfFullPath( meta );
RepositorySecurityProvider repositorySecurityProvider =
rep != null && rep.getSecurityProvider() != null ? rep.getSecurityProvider() : null;
if ( repositorySecurityProvider != null && fullPath != null ) {
versioningEnabled = repositorySecurityProvider.isVersioningEnabled( fullPath );
if ( rep != null && rep.getSecurityProvider() != null
&& rep.getSecurityProvider().allowsVersionComments( fullPath ) && versionComment == null ) {
return false;
if ( Utils.isEmpty( versionComment ) && rep.getSecurityProvider().isVersioningEnabled( fullPath )
&& rep.getSecurityProvider().isVersionCommentMandatory() ) {
if ( !RepositorySecurityUI.showVersionCommentMandatoryDialog( shell ) ) {
return false; // no, I don't want to enter a
代码示例来源:origin: pentaho/pentaho-kettle
if ( !spoon.rep.getSecurityProvider().isReadOnly() ) {
spoon.rep.save( clusterSchema, Const.VERSION_COMMENT_INITIAL_VERSION, null );
if ( sharedObjectSyncUtil != null ) {
代码示例来源:origin: pentaho/pentaho-kettle
if ( !spoon.rep.getSecurityProvider().isReadOnly() ) {
spoon.rep.save( partitionSchema, Const.VERSION_COMMENT_INITIAL_VERSION, null );
if ( sharedObjectSyncUtil != null ) {
代码示例来源:origin: pentaho/pentaho-kettle
if ( spoon.rep != null ) {
try {
if ( !spoon.rep.getSecurityProvider().isReadOnly() ) {
代码示例来源:origin: pentaho/pentaho-kettle
public void saveConnection( DatabaseMeta db, String versionComment ) {
// Also add to repository?
Repository rep = spoon.getRepository();
if ( rep != null ) {
if ( !rep.getSecurityProvider().isReadOnly() ) {
try {
if ( Utils.isEmpty( versionComment ) ) {
rep.insertLogEntry( "Saving database '" + db.getName() + "'" );
} else {
rep.insertLogEntry( "Save database : " + versionComment );
}
rep.save( db, versionComment, null );
spoon.getLog().logDetailed(
BaseMessages.getString( PKG, "Spoon.Log.SavedDatabaseConnection", db.getDatabaseName() ) );
db.setChanged( false );
} catch ( KettleException ke ) {
new ErrorDialog( spoon.getShell(),
BaseMessages.getString( PKG, "Spoon.Dialog.ErrorSavingConnection.Title" ),
BaseMessages.getString( PKG, "Spoon.Dialog.ErrorSavingConnection.Message", db.getDatabaseName() ), ke );
}
} else {
// This repository user is read-only!
//
new ErrorDialog(
spoon.getShell(), BaseMessages.getString( PKG, "Spoon.Dialog.UnableSave.Title" ), BaseMessages
.getString( PKG, "Spoon.Dialog.ErrorSavingConnection.Message", db.getDatabaseName() ),
new KettleException( BaseMessages.getString( PKG, "Spoon.Dialog.Exception.ReadOnlyRepositoryUser" ) ) );
}
}
}
代码示例来源:origin: pentaho/pentaho-kettle
if ( !rep.getSecurityProvider().isReadOnly() ) {
try {
rep.deleteDatabaseMeta( db.getName() );
代码示例来源:origin: pentaho/pentaho-kettle
if ( Utils.isEmpty( versionComment ) && rep.getSecurityProvider().isVersionCommentMandatory( ) ) {
if ( !RepositorySecurityUI.showVersionCommentMandatoryDialog( shell ) ) {
versionOk = true;
内容来源于网络,如有侵权,请联系作者删除!