Tabnine Logo
PluginInterface.matches
Code IndexAdd Tabnine to your IDE (free)

How to use
matches
method
in
org.pentaho.di.core.plugins.PluginInterface

Best Java code snippets using org.pentaho.di.core.plugins.PluginInterface.matches (Showing top 2 results out of 315)

origin: pentaho/pentaho-kettle

/**
 * Get a plugin from the registry
 *
 * @param pluginType The type of plugin to look for
 * @param id             The ID to scan for
 * @return the plugin or null if nothing was found.
 */
public PluginInterface getPlugin( Class<? extends PluginTypeInterface> pluginType, String id ) {
 if ( Utils.isEmpty( id ) ) {
  return null;
 }
 // getPlugins() never returns null, see his method above
 return getPlugins( pluginType ).stream()
  .filter( plugin -> plugin.matches( id ) )
  .findFirst()
  .orElse( null );
}
origin: pentaho/pentaho-kettle

@BeforeClass
public static void setUpBeforeClass() throws Exception {
 KettleClientEnvironment.init();
 dbMap.put( DatabaseInterface.class, DBMockIface.class.getName() );
 dbMap.put( InfobrightDatabaseMeta.class, InfobrightDatabaseMeta.class.getName() );
 PluginRegistry preg = PluginRegistry.getInstance();
 mockDbPlugin = mock( PluginInterface.class );
 when( mockDbPlugin.matches( anyString() ) ).thenReturn( true );
 when( mockDbPlugin.isNativePlugin() ).thenReturn( true );
 when( mockDbPlugin.getMainType() ).thenAnswer( (Answer<Class<?>>) invocation -> DatabaseInterface.class );
 when( mockDbPlugin.getPluginType() ).thenAnswer(
  (Answer<Class<? extends PluginTypeInterface>>) invocation -> DatabasePluginType.class );
 when( mockDbPlugin.getIds() ).thenReturn( new String[] { "Oracle", "mock-db-id" } );
 when( mockDbPlugin.getName() ).thenReturn( "mock-db-name" );
 when( mockDbPlugin.getClassMap() ).thenReturn( dbMap );
 preg.registerPlugin( DatabasePluginType.class, mockDbPlugin );
}
org.pentaho.di.core.pluginsPluginInterfacematches

Popular methods of PluginInterface

  • getIds
  • getName
  • getDescription
  • getPluginDirectory
  • getClassMap
  • getImageFile
  • getPluginType
  • getCategory
  • getDocumentationUrl
  • getErrorHelpFile
  • getMainType
  • isNativePlugin
  • getMainType,
  • isNativePlugin,
  • getCasesUrl,
  • getClassLoaderGroup,
  • getForumUrl,
  • getLibraries,
  • getSuggestion,
  • isSeparateClassLoaderNeeded,
  • merge

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Path (java.nio.file)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JOptionPane (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now