当前位置: 首页>>代码示例>>Java>>正文


Java DefaultCapabilityManager类代码示例

本文整理汇总了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 );

}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:15,代码来源:SparkRunConfigurationExecutorTest.java

示例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() );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:7,代码来源:CapabilityManagerDialog.java

示例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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:42,代码来源:GoogleDrivePluginLifecycleListener.java


注:本文中的org.pentaho.capabilities.impl.DefaultCapabilityManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。