private void setDeprecationAndSuggestedStep() { PluginRegistry registry = PluginRegistry.getInstance(); final List<PluginInterface> deprecatedSteps = registry.getPluginsByCategory( StepPluginType.class, BaseMessages.getString( PKG, "BaseStep.Category.Deprecated" ) ); for ( PluginInterface p : deprecatedSteps ) { String[] ids = p.getIds(); if ( !ArrayUtils.isEmpty( ids ) && ids[0].equals( this.stepid ) ) { this.isDeprecated = true; this.suggestion = registry.findPluginWithId( StepPluginType.class, this.stepid ) != null ? registry.findPluginWithId( StepPluginType.class, this.stepid ).getSuggestion() : ""; break; } } }
private void setDeprecationAndSuggestedJobEntry() { PluginRegistry registry = PluginRegistry.getInstance(); final List<PluginInterface> deprecatedJobEntries = registry.getPluginsByCategory( JobEntryPluginType.class, BaseMessages.getString( JobMeta.class, "JobCategory.Category.Deprecated" ) ); for ( PluginInterface p : deprecatedJobEntries ) { String[] ids = p.getIds(); if ( !ArrayUtils.isEmpty( ids ) && ids[0].equals( this.entry != null ? this.entry.getPluginId() : "" ) ) { this.isDeprecated = true; this.suggestion = registry.findPluginWithId( JobEntryPluginType.class, this.entry.getPluginId() ) != null ? registry.findPluginWithId( JobEntryPluginType.class, this.entry.getPluginId() ).getSuggestion() : ""; break; } } } }