public class JIPipeExtensionRegistry extends Object
Modifier and Type | Class and Description |
---|---|
static class |
JIPipeExtensionRegistry.ScheduledActivateExtension
Triggered by
JIPipeExtensionRegistry when an extension is scheduled to be activated |
static class |
JIPipeExtensionRegistry.ScheduledDeactivateExtension
Triggered by
JIPipeExtensionRegistry when an extension is scheduled to be deactivated |
static class |
JIPipeExtensionRegistry.Settings |
Modifier and Type | Field and Description |
---|---|
static String[] |
STANDARD_EXTENSIONS
Standard set of extension IDs (1.74.0+)
|
static String[] |
STANDARD_EXTENSIONS_LEGACY
Standard set of extension IDs (for users updating from 1.73.x or older)
|
Constructor and Description |
---|
JIPipeExtensionRegistry(JIPipe jiPipe) |
Modifier and Type | Method and Description |
---|---|
void |
clearSchedule(String id) |
void |
dismissNewExtensions() |
void |
findNewExtensions()
Updates the list of new extensions
|
static Set<JIPipeDependency> |
findUnsatisfiedDependencies(Set<JIPipeDependency> dependencies)
Finds all dependencies that cannot be met
|
Set<String> |
getActivatedExtensions()
List of all activated extensions
|
Set<String> |
getAllDependenciesOf(String id)
Returns the dependency IDs that are dependencies of the provided extension ID
|
Set<String> |
getAllDependentsOf(String id)
Returns the dependency IDs that are depentents of the provided extension ID
|
org.jgrapht.graph.DefaultDirectedGraph<JIPipeDependency,org.jgrapht.graph.DefaultEdge> |
getDependencyGraph()
Returns a directed graph of all dependencies.
|
EventBus |
getEventBus() |
JIPipe |
getJIPipe() |
JIPipeExtension |
getKnownExtensionById(String id)
Returns a known extension by ID
If multiple extensions share the same ID, only one is returned
If there is none, null will be returned
|
Map<String,JIPipeExtension> |
getKnownExtensionsById() |
List<JIPipeExtension> |
getKnownExtensionsList() |
Set<String> |
getNewExtensions()
A set of extensions that are new and should be made known to the user
|
static Path |
getPropertyFile() |
Set<String> |
getScheduledActivateExtensions() |
Set<String> |
getScheduledDeactivateExtensions() |
Set<String> |
getStartupExtensions()
List of all extensions that are requested during startup
Please note that this may not contain core extensions
Use getActivatedExtensions() instead
|
void |
initialize() |
boolean |
isKnownDependency(String id) |
static boolean |
isLegacy() |
void |
load() |
void |
load(Path file)
Loads settings from the specified file
|
void |
registerKnownExtension(JIPipeExtension extension)
Registers an extension as known to the extension registry.
|
void |
save()
Saves the settings to the default settings file
|
void |
save(Path file)
Saves the settings to the specified file
|
void |
scheduleActivateExtension(String id) |
void |
scheduleDeactivateExtension(String id) |
Set<JIPipeDependency> |
tryResolveToKnownDependencies(Set<JIPipeDependency> dependencies)
Resolves as many dependencies in the provided set against a known dependency, so there is access to other metadata.
|
boolean |
willBeActivatedOnNextStartup(String id) |
boolean |
willBeDeactivatedOnNextStartup(String id) |
public static final String[] STANDARD_EXTENSIONS
public static final String[] STANDARD_EXTENSIONS_LEGACY
public JIPipeExtensionRegistry(JIPipe jiPipe)
public static Set<JIPipeDependency> findUnsatisfiedDependencies(Set<JIPipeDependency> dependencies)
dependencies
- List of dependencies to be checked. Only the ID will be checked.public static boolean isLegacy()
public static Path getPropertyFile()
public void initialize()
public Set<String> getStartupExtensions()
public Set<String> getActivatedExtensions()
public void registerKnownExtension(JIPipeExtension extension)
extension
- the extensionpublic JIPipeExtension getKnownExtensionById(String id)
id
- the IDpublic void findNewExtensions()
public void dismissNewExtensions()
public Set<String> getNewExtensions()
public List<JIPipeExtension> getKnownExtensionsList()
public Map<String,JIPipeExtension> getKnownExtensionsById()
public void clearSchedule(String id)
public Set<String> getAllDependenciesOf(String id)
id
- the extension idpublic Set<String> getAllDependentsOf(String id)
id
- the extension idpublic void scheduleActivateExtension(String id)
public void scheduleDeactivateExtension(String id)
public org.jgrapht.graph.DefaultDirectedGraph<JIPipeDependency,org.jgrapht.graph.DefaultEdge> getDependencyGraph()
public boolean isKnownDependency(String id)
public Set<JIPipeDependency> tryResolveToKnownDependencies(Set<JIPipeDependency> dependencies)
dependencies
- the dependenciespublic boolean willBeActivatedOnNextStartup(String id)
public boolean willBeDeactivatedOnNextStartup(String id)
public void save(Path file)
file
- the file pathpublic void save()
public void load()
public void load(Path file)
file
- the filepublic JIPipe getJIPipe()
public EventBus getEventBus()
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.