本文整理汇总了Java中org.pentaho.capabilities.impl.DefaultCapabilityManager类的典型用法代码示例。如果您正苦于以下问题:Java DefaultCapabilityManager类的具体用法?Java DefaultCapabilityManager怎么用?Java DefaultCapabilityManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultCapabilityManager类属于org.pentaho.capabilities.impl包,在下文中一共展示了DefaultCapabilityManager类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import org.pentaho.capabilities.impl.DefaultCapabilityManager; //导入依赖的package包/类
@Before
public void setup() throws Exception {
Configuration configuration = mock( Configuration.class );
ConfigurationAdmin configurationAdmin = mock( ConfigurationAdmin.class );
doReturn( properties ).when( configuration ).getProperties();
sparkRunConfigurationExecutor = new SparkRunConfigurationExecutor( configurationAdmin );
capabilityProvider = mock( ICapabilityProvider.class );
capabilityManager = DefaultCapabilityManager.getInstance();
capabilityManager.registerCapabilityProvider( capabilityProvider );
}
示例2: updateAllCheckboxes
import org.pentaho.capabilities.impl.DefaultCapabilityManager; //导入依赖的package包/类
private void updateAllCheckboxes() {
DefaultCapabilityManager capabilityManager = DefaultCapabilityManager.getInstance();
for ( Button button : buttons ) {
button.setSelection( capabilityManager.getCapabilityById( button.getText() ).isInstalled() );
}
}
示例3: onEnvironmentInit
import org.pentaho.capabilities.impl.DefaultCapabilityManager; //导入依赖的package包/类
public void onEnvironmentInit() throws LifecycleException {
try {
boolean proceed = true;
if ( !new File(
GoogleDriveFileObject.resolveCredentialsPath() + "/" + resourceBundle.getString( "client.secrets" ) )
.exists() ) {
proceed = false;
log.warn(
"The Google Authorization secrets security token file (" + resourceBundle.getString( "client.secrets" )
+ ") is not present in the credentials folder. This file is necessary to activate the Google Drive VFS plugin." );
}
if ( !new File(
GoogleDriveFileObject.resolveCredentialsPath() + "/" + resourceBundle.getString( "stored.credential" ) )
.exists() ) {
DefaultCapabilityManager capabilityManager = DefaultCapabilityManager.getInstance();
if ( capabilityManager.capabilityExist( "pentaho-server" ) ) {
proceed = false;
log.warn( "The Google Authorization Code Flow security token file (" + resourceBundle
.getString( "stored.credential" ) + ") is not present in the credentials folder. This file is necessary to activate the Google Drive VFS plugin." );
}
}
/**
* Registers the GoogleDrive VFS File Provider dynamically since it is bundled with our plugin and will not automatically
* be registered through the normal class path search the default FileSystemManager performs.
*/
if ( proceed ) {
FileSystemManager fsm = KettleVFS.getInstance().getFileSystemManager();
if ( fsm instanceof DefaultFileSystemManager ) {
if ( !Arrays.asList( fsm.getSchemes() ).contains( GoogleDriveFileProvider.SCHEME ) ) {
( (DefaultFileSystemManager) fsm )
.addProvider( GoogleDriveFileProvider.SCHEME, new GoogleDriveFileProvider() );
}
}
}
} catch ( FileSystemException e ) {
throw new LifecycleException( e.getMessage(), false );
}
}