本文整理汇总了Java中org.pentaho.di.core.plugins.PluginRegistry.getPluginInformation方法的典型用法代码示例。如果您正苦于以下问题:Java PluginRegistry.getPluginInformation方法的具体用法?Java PluginRegistry.getPluginInformation怎么用?Java PluginRegistry.getPluginInformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.plugins.PluginRegistry
的用法示例。
在下文中一共展示了PluginRegistry.getPluginInformation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showPluginInfo
import org.pentaho.di.core.plugins.PluginRegistry; //导入方法依赖的package包/类
/**
* Show a plugin browser
*/
public void showPluginInfo() {
try {
// First we collect information concerning all the plugin types...
//
Map<String, RowMetaInterface> metaMap = new HashMap<>();
Map<String, List<Object[]>> dataMap = new HashMap<>();
PluginRegistry registry = PluginRegistry.getInstance();
List<Class<? extends PluginTypeInterface>> pluginTypeClasses = registry.getPluginTypes();
for ( Class<? extends PluginTypeInterface> pluginTypeClass : pluginTypeClasses ) {
PluginTypeInterface pluginTypeInterface = registry.getPluginType( pluginTypeClass );
if ( pluginTypeInterface.isFragment() ) {
continue;
}
String subject = pluginTypeInterface.getName();
RowBuffer pluginInformation = registry.getPluginInformation( pluginTypeClass );
metaMap.put( subject, pluginInformation.getRowMeta() );
dataMap.put( subject, pluginInformation.getBuffer() );
}
// Now push it all to a subject data browser...
//
SubjectDataBrowserDialog dialog =
new SubjectDataBrowserDialog( shell, metaMap, dataMap, "Plugin browser", "Plugin type" );
dialog.open();
} catch ( Exception e ) {
new ErrorDialog( shell, "Error", "Error listing plugins", e );
}
}