congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
PluginInterface.getName
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: pentaho/pentaho-kettle

@Override
public void pluginRemoved( Object serviceObject ) {
 PluginInterface plugin = (PluginInterface) serviceObject;
 String pluginName = plugin.getName();
 databaseTypeRemoved( pluginName );
}
origin: pentaho/pentaho-kettle

/**
 * Find the plugin ID based on the name of the plugin
 *
 * @param pluginType the type of plugin
 * @param pluginName The name to look for
 * @return The plugin with the specified name or null if nothing was found.
 */
public PluginInterface findPluginWithName( Class<? extends PluginTypeInterface> pluginType, String pluginName ) {
 return getPlugins( pluginType ).stream()
  .filter( plugin -> plugin.getName().equals( pluginName ) )
  .findFirst()
  .orElse( null );
}
origin: pentaho/pentaho-kettle

public static String[] getValueMetaNames() {
 List<String> strings = new ArrayList<String>();
 List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class );
 for ( PluginInterface plugin : plugins ) {
  int id = Integer.valueOf( plugin.getIds()[0] );
  if ( id > 0 && id != ValueMetaInterface.TYPE_SERIALIZABLE ) {
   strings.add( plugin.getName() );
  }
 }
 return strings.toArray( new String[strings.size()] );
}
origin: pentaho/pentaho-kettle

public static String[] getAllValueMetaNames() {
 List<String> strings = new ArrayList<String>();
 List<PluginInterface> plugins = pluginRegistry.getPlugins( ValueMetaPluginType.class );
 for ( PluginInterface plugin : plugins ) {
  String id = plugin.getIds()[0];
  if ( !( "0".equals( id ) ) ) {
   strings.add( plugin.getName() );
  }
 }
 return strings.toArray( new String[strings.size()] );
}
origin: pentaho/pentaho-kettle

public static String getValueMetaName( int type ) {
 for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) {
  if ( Integer.toString( type ).equals( plugin.getIds()[0] ) ) {
   return plugin.getName();
  }
 }
 return "-";
}
origin: pentaho/pentaho-kettle

public static int getIdForValueMeta( String valueMetaName ) {
 for ( PluginInterface plugin : pluginRegistry.getPlugins( ValueMetaPluginType.class ) ) {
  if ( valueMetaName != null && valueMetaName.equalsIgnoreCase( plugin.getName() ) ) {
   return Integer.valueOf( plugin.getIds()[0] );
  }
 }
 return ValueMetaInterface.TYPE_NONE;
}
origin: pentaho/pentaho-kettle

/**
 * Add the extension point plugin to the map
 * 
 * @param extensionPointPlugin
 */
public void addExtensionPoint( PluginInterface extensionPointPlugin ) {
 lock.writeLock().lock();
 try {
  for ( String id : extensionPointPlugin.getIds() ) {
   extensionPointPluginMap.put( extensionPointPlugin.getName(), id, createLazyLoader( extensionPointPlugin ) );
  }
 } finally {
  lock.writeLock().unlock();
 }
}
origin: pentaho/pentaho-kettle

/**
 * Remove the extension point plugin from the map
 * 
 * @param extensionPointPlugin
 */
public void removeExtensionPoint( PluginInterface extensionPointPlugin ) {
 lock.writeLock().lock();
 try {
  for ( String id : extensionPointPlugin.getIds() ) {
   extensionPointPluginMap.remove( extensionPointPlugin.getName(), id );
  }
 } finally {
  lock.writeLock().unlock();
 }
}
origin: pentaho/pentaho-kettle

public static String getHelpDialogTitle( PluginInterface plugin ) {
 if ( plugin == null ) {
  return "";
 }
 String msgKey = "";
 // TODO currently support only Step and JobEntry - extend if required.
 if ( plugin.getPluginType().equals( StepPluginType.class ) ) {
  msgKey = "System.ShowHelpDialog.StepPluginType.Title";
 } else {
  msgKey = "System.ShowHelpDialog.JobEntryPluginType.Title";
 }
 return BaseMessages.getString( PKG, msgKey, plugin.getName() );
}
origin: pentaho/pentaho-kettle

public String getXML() {
 StringBuilder xml = new StringBuilder();
 xml.append( XMLHandler.openTag( XML_TAG ) ).append( Const.CR ).append( Const.CR );
 for ( ImportRuleInterface rule : getRules() ) {
  PluginInterface plugin = PluginRegistry.getInstance().getPlugin( ImportRulePluginType.class, rule.getId() );
  xml.append( "<!-- " ).append( plugin.getName() ).append( " : " ).append( plugin.getDescription() ).append(
   Const.CR ).append( " -->" ).append( Const.CR );
  xml.append( rule.getXML() );
  xml.append( Const.CR ).append( Const.CR );
 }
 xml.append( XMLHandler.closeTag( XML_TAG ) );
 return xml.toString();
}
origin: pentaho/pentaho-kettle

/**
 * Instantiate the main plugin class types for the plugin type provided from the set of registered plugins via
 * {@link PluginRegistry}.
 *
 * @param pluginType
 *          Type of plugin whose main class types should be instanticated
 * @return Set of plugin main class instances (a.k.a. plugins)
 */
static <T> Set<T> loadPlugins( Class<? extends PluginTypeInterface> pluginType, Class<T> mainPluginClass ) {
 Set<T> pluginInstances = new HashSet<T>();
 List<PluginInterface> plugins = registry.getPlugins( pluginType );
 for ( PluginInterface plugin : plugins ) {
  try {
   pluginInstances.add( registry.loadClass( plugin, mainPluginClass ) );
  } catch ( Throwable e ) {
   LogChannel.GENERAL.logError( "Unexpected error loading class for plugin " + plugin.getName(), e );
  }
 }
 return pluginInstances;
}
origin: pentaho/pentaho-kettle

@Override
public CompressionProvider createCompressionProviderInstance( String name ) {
 CompressionProvider provider = null;
 List<PluginInterface> providers = getPlugins();
 if ( providers != null ) {
  for ( PluginInterface plugin : providers ) {
   if ( name != null && name.equalsIgnoreCase( plugin.getName() ) ) {
    try {
     return PluginRegistry.getInstance().loadClass( plugin, CompressionProvider.class );
    } catch ( Exception e ) {
     provider = null;
    }
   }
  }
 }
 return provider;
}
origin: pentaho/pentaho-kettle

 @Override public ExtensionPointInterface get() {
  try {
   return registry.loadClass( extensionPointPlugin, ExtensionPointInterface.class );
  } catch ( Exception e ) {
   getLog().logError( "Unable to load extension point for name = ["
    + ( extensionPointPlugin != null ? extensionPointPlugin.getName() : "null" ) + "]", e );
   return null;
  }
 }
}
origin: pentaho/pentaho-kettle

@SuppressWarnings( "unchecked" )
public String getPlugins() {
 List<PluginInterface> plugins = pluginRegistry.getPlugins( RepositoryPluginType.class );
 JSONArray list = new JSONArray();
 for ( PluginInterface pluginInterface : plugins ) {
  if ( !pluginInterface.getIds()[0].equals( "PentahoEnterpriseRepository" ) ) {
   JSONObject repoJSON = new JSONObject();
   repoJSON.put( "id", pluginInterface.getIds()[ 0 ] );
   repoJSON.put( "name", pluginInterface.getName() );
   repoJSON.put( "description", pluginInterface.getDescription() );
   list.add( repoJSON );
  }
 }
 return list.toString();
}
origin: pentaho/pentaho-kettle

@Override
public String toString() {
 // The rule name with an indication of whether or not this rule is enabled should do for now.
 //
 String pluginId = PluginRegistry.getInstance().getPluginId( this );
 PluginInterface plugin = PluginRegistry.getInstance().findPluginWithId( ImportRulePluginType.class, pluginId );
 return plugin.getName() + " (" + ( enabled ? "enabled" : "disabled" ) + ").";
}
origin: pentaho/pentaho-kettle

private Map<String, SwingUniversalImage> loadStepImages() {
 Map<String, SwingUniversalImage> map = new HashMap<>();
 for ( PluginInterface plugin : PluginRegistry.getInstance().getPlugins( StepPluginType.class ) ) {
  try {
   SwingUniversalImage image = getUniversalImageIcon( plugin );
   for ( String id : plugin.getIds() ) {
    map.put( id, image );
   }
  } catch ( Exception e ) {
   log.logError( "Unable to load step icon image for plugin: "
    + plugin.getName() + " (id=" + plugin.getIds()[0] + ")", e );
  }
 }
 return map;
}
origin: pentaho/pentaho-kettle

@Override
public void pluginAdded( Object serviceObject ) {
 PluginInterface plugin = (PluginInterface) serviceObject;
 String pluginName = plugin.getName();
 try {
  DatabaseInterface databaseInterface = (DatabaseInterface) registry.loadClass( plugin );
  databaseInterface.setPluginId( plugin.getIds()[0] );
  databaseInterface.setName( pluginName );
  databaseTypeAdded( pluginName, databaseInterface );
 } catch ( KettleException e ) {
  Throwable t = e;
  if ( e.getCause() != null ) {
   t = e.getCause();
  }
  System.out.println( "Could not create connection entry for "
   + pluginName + ".  " + t.getClass().getName() );
  LogChannel.GENERAL.logError( "Could not create connection entry for "
   + pluginName + ".  " + t.getClass().getName() );
 }
}
origin: pentaho/pentaho-kettle

private void addStepItem( final TreeItem categoryItem, final PluginInterface step ) {
 final Image stepImage =
  GUIResource.getInstance().getImagesStepsSmall().get( step.getIds()[ 0 ] );
 String pluginName = step.getName();
 String pluginDescription = step.getDescription();
 if ( filterMatch( pluginName ) || filterMatch( pluginDescription ) ) {
  createTreeItem( categoryItem, pluginName, stepImage, step.getIds()[ 0 ] );
  coreStepToolTipMap.put( pluginName, pluginDescription );
 }
}
origin: pentaho/pentaho-kettle

private Map<String, SwingUniversalImage> loadEntryImages() {
 Map<String, SwingUniversalImage> map = new HashMap<>();
 for ( PluginInterface plugin : PluginRegistry.getInstance().getPlugins( JobEntryPluginType.class ) ) {
  try {
   if ( JobMeta.STRING_SPECIAL.equals( plugin.getIds()[0] ) ) {
    continue;
   }
   SwingUniversalImage image = getUniversalImageIcon( plugin );
   if ( image == null ) {
    throw new KettleException( "Unable to find image file: "
     + plugin.getImageFile() + " for plugin: " + plugin );
   }
   map.put( plugin.getIds()[0], image );
  } catch ( Exception e ) {
   log.logError( "Unable to load job entry icon image for plugin: "
    + plugin.getName() + " (id=" + plugin.getIds()[0] + ")", e );
  }
 }
 return map;
}
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.pluginsPluginInterfacegetName

Popular methods of PluginInterface

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

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • String (java.lang)
  • Permission (java.security)
    Legacy security code; do not use.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JButton (javax.swing)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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