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


Java ICapabilityProvider类代码示例

本文整理汇总了Java中org.pentaho.capabilities.api.ICapabilityProvider的典型用法代码示例。如果您正苦于以下问题:Java ICapabilityProvider类的具体用法?Java ICapabilityProvider怎么用?Java ICapabilityProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ICapabilityProvider类属于org.pentaho.capabilities.api包,在下文中一共展示了ICapabilityProvider类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: listCapabilities

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Override public Set<String> listCapabilities() {
  Set<String> capabilities = new HashSet<String>();
  for ( ICapabilityProvider iCapabilityProvider : providers.values() ) {
    Set<String> caps = iCapabilityProvider.listCapabilities();
    if ( caps != null ) {
      capabilities.addAll( caps );
    }
  }
  return capabilities;
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:11,代码来源:DefaultCapabilityManager.java

示例2: getCapabilityById

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Override public ICapability getCapabilityById( String id ) {
  for ( ICapabilityProvider iCapabilityProvider : providers.values() ) {
    ICapability capabilityById = iCapabilityProvider.getCapabilityById( id );
    if ( capabilityById != null ) {
      return capabilityById;
    }
  }
  return null;
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:10,代码来源:DefaultCapabilityManager.java

示例3: capabilityExist

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Override public boolean capabilityExist( String id ) {
  for ( ICapabilityProvider iCapabilityProvider : providers.values() ) {
    if ( iCapabilityProvider.capabilityExist( id ) ) {
      return true;
    }
  }
  return false;
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:9,代码来源:DefaultCapabilityManager.java

示例4: getAllCapabilities

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Override public Set<ICapability> getAllCapabilities() {
  Set<ICapability> capabilities = new HashSet<ICapability>();
  for ( ICapabilityProvider iCapabilityProvider : providers.values() ) {
    Set<ICapability> caps = iCapabilityProvider.getAllCapabilities();
    if ( caps != null ) {
      capabilities.addAll( caps );
    }
  }
  return capabilities;
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:11,代码来源:DefaultCapabilityManager.java

示例5: testRegisterCapabilityProvider

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Test
public void testRegisterCapabilityProvider() throws Exception {
  Set<String> providers = manager.listProviders();
  assertEquals( 0, providers.size() );

  ICapabilityProvider iCapabilityProvider = mock( ICapabilityProvider.class );
  when(iCapabilityProvider.getId()).thenReturn( "test" );
  manager.registerCapabilityProvider( iCapabilityProvider );

  providers = manager.listProviders();
  assertEquals( 1, providers.size() );
  assertEquals( iCapabilityProvider.getId(), providers.iterator().next() );

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

示例6: testGetProvider

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Test
public void testGetProvider() throws Exception {
  ICapabilityProvider iCapabilityProvider = mock( ICapabilityProvider.class );
  when(iCapabilityProvider.getId()).thenReturn( "test" );
  manager.registerCapabilityProvider( iCapabilityProvider );

  ICapabilityProvider provider = manager.getProvider( "test" );
  assertSame( iCapabilityProvider, provider );
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:10,代码来源:DefaultCapabilityManagerTest.java

示例7: testListCapabilities

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Test
public void testListCapabilities() throws Exception {
  ICapabilityProvider iCapabilityProvider = mock( ICapabilityProvider.class );
  when(iCapabilityProvider.getId()).thenReturn( "test" );
  HashSet<String> inCapabilities = new HashSet<String>( Arrays.asList( "one", "two", "three" ) );
  when(iCapabilityProvider.listCapabilities()).thenReturn(
      inCapabilities );
  manager.registerCapabilityProvider( iCapabilityProvider );

  Set<String> capabilities = manager.listCapabilities();
  assertEquals(3, capabilities.size());
  assertTrue( Arrays.equals( capabilities.toArray(), inCapabilities.toArray() ));
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:14,代码来源:DefaultCapabilityManagerTest.java

示例8: testGetCapabilityById

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Test
public void testGetCapabilityById() throws Exception {

  ICapabilityProvider iCapabilityProvider = mock( ICapabilityProvider.class );
  when(iCapabilityProvider.getId()).thenReturn( "test" );
  ICapability capability = mock( ICapability.class );
  when(iCapabilityProvider.getCapabilityById( "foo" )).thenReturn( capability );
  manager.registerCapabilityProvider( iCapabilityProvider );

  ICapability foo = manager.getCapabilityById( "foo" );
  assertSame( capability, foo );
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:13,代码来源:DefaultCapabilityManagerTest.java

示例9: testCapabilityExist

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Test
public void testCapabilityExist() throws Exception {

  ICapabilityProvider iCapabilityProvider = mock( ICapabilityProvider.class );
  when(iCapabilityProvider.capabilityExist("foo")).thenReturn( true);
  manager.registerCapabilityProvider( iCapabilityProvider );

  boolean exists = manager.capabilityExist( "foo" );
  assertSame( true, exists );

  boolean doesNotExist = manager.capabilityExist( "bad" );
  assertSame( false, doesNotExist );
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:14,代码来源:DefaultCapabilityManagerTest.java

示例10: testGetAllCapabilities

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Test
public void testGetAllCapabilities() throws Exception {

  ICapabilityProvider iCapabilityProvider = mock( ICapabilityProvider.class );
  when(iCapabilityProvider.getId()).thenReturn( "test" );
  ICapability capability = mock( ICapability.class );
  when(iCapabilityProvider.getAllCapabilities()).thenReturn( new HashSet<ICapability>( Arrays.asList( capability ) ) );
  manager.registerCapabilityProvider( iCapabilityProvider );

  Set<ICapability> allCapabilities = manager.getAllCapabilities();
  assertEquals( 1, allCapabilities.size() );

}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:14,代码来源:DefaultCapabilityManagerTest.java

示例11: setup

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的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

示例12: registerCapabilityProvider

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
public void registerCapabilityProvider( ICapabilityProvider provider ) {
  providers.put( provider.getId(), provider );
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:4,代码来源:DefaultCapabilityManager.java

示例13: getProvider

import org.pentaho.capabilities.api.ICapabilityProvider; //导入依赖的package包/类
@Override public ICapabilityProvider getProvider( String id ) {
  return providers.get( id );
}
 
开发者ID:pentaho,项目名称:pentaho-osgi-bundles,代码行数:4,代码来源:DefaultCapabilityManager.java


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