Class PluginManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateClientProtocolEntry(UserContext uc, Mandant man, String protocolEntry, Object... params) Creates a client protocol entrystatic voidcreateMandantProtocolEntry(IEntityContext ec, Mandant man, String protocolEntry, Object... params) Deprecated.static voidcreateSystemProtocolEntry(UserContext uc, String protocolEntry, Object... params) Creates a system protocol entrystatic voiddeletePlugin(PluginRuntime runtime) Deprecated.static voiddeletePlugin(String scopeKey, String runtimeKey) Deprecated.static List<PluginRuntime> getAllPlugins(Mandant man, EPluginTypes type) Deprecated.getAllPlugins(Mandant client, Class<T> pluginType) Get a set of plugins with the given interface registered in system-scope OR to the given client.getAllPlugins(UUID clientUuid, Class<T> pluginType) Get a set of plugins with the given interface registered in system-scope OR to the given client.static <T extends IFCPlugin>
Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getAllPluginsWithRuntime(Mandant man, Class<T> clazz) static <T extends IFCPlugin>
Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getAllPluginsWithRuntime(UUID clientUuid, Class<T> clazz) static Set<PluginRuntime> getClientPlugins(Mandant client) Gets a list of allplugin runtimesregistered to the given client (not including system plugins!)getClientPlugins(Mandant client, Class<T> pluginType) Get a set of plugins with the given interfaces registered to the given clientstatic Set<PluginRuntime> getClientPlugins(UUID clientUuid) Gets a list of allplugin runtimesregistered to the given client (not including system plugins!)getClientPlugins(UUID clientUuid, Class<T> pluginType) Get a set of plugins with the given interfaces registered to the given clientstatic <T extends IFCPlugin>
Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getClientPluginsWithRuntime(Mandant client, Class<T> clazz) static <T extends IFCPlugin>
Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getClientPluginsWithRuntime(UUID clientUuid, Class<T> clazz) static IFCPlugingetMandantPluginByName(Mandant man, EPluginTypes type, String pluginName) Deprecated.will be removed!static FilegetMandantPluginJar(Mandant man, String jarName) Deprecated.static List<PluginRuntime> getMandantPlugins(Mandant man) Deprecated.getMandantPlugins(Mandant man, EPluginTypes type) Deprecated.will be removed!static IFCPluginGets the plugin with the given ID (scope key, runtime key, plugin name).static <Plugin extends IFCPlugin>
PluginGets the plugin with the given ID (scope key, runtime key, plugin name).static IPluginAuthenticatorTypegetPluginAuthenticatorType(IAuthenticator<?> authenticator) static org.apache.commons.lang3.tuple.Pair<PluginRuntime, IPluginAuthenticatorType> getPluginAuthenticatorTypeWithRuntime(IAuthenticator<?> authenticator) static <T extends IFCPlugin>
org.apache.commons.lang3.tuple.Pair<PluginRuntime, T> getPluginByClassAndNameWithRuntime(UUID clientUuid, Class<T> clazz, String pluginName) static IFCPlugingetPluginByName(Mandant man, EPluginTypes type, String pluginName) Deprecated.static <T extends IFCPlugin>
TgetPluginByName(Mandant man, Class<T> clazz, String pluginName) Get a plugin by name andIFCPlugin-interface from client- and system-scopestatic <T extends IFCPlugin>
org.apache.commons.lang3.tuple.Pair<PluginRuntime, T> getPluginByNameWithRuntime(Mandant man, Class<T> clazz, String pluginName) static <Plugin extends IFCPlugin>
PlugingetPluginByPluginKeyAndName(Mandant client, PluginExtensionPointId extensionPointId, Class<Plugin> pluginClass) Gets a plugin with a certain name from the plugin bundle with the given plugin key.static <Plugin extends IFCPlugin>
PlugingetPluginByPluginKeyAndName(Mandant client, String pluginKey, String pluginName, Class<Plugin> pluginClass) Deprecated.static <Plugin extends IFCPlugin>
PlugingetPluginByPluginKeyAndName(Mandant client, String pluginKey, String fileKey, String pluginName, Class<Plugin> pluginClass) Gets a plugin with a certain name from the plugin bundle with the given plugin key.static <T extends IFCPlugin>
Map<EPluginScope, Set<String>> getPluginNameMap(Mandant mandant, Class<T> clazz) Deprecated.static Map<EPluginScope, Set<String>> getPluginNameMap(UserContext uc, Mandant mandant, EPluginTypes type) Deprecated.getPluginNames(Mandant mandant, Class<T> clazz) getPluginNames(UserContext uc, Mandant mandant, EPluginTypes type) Deprecated.static PluginRuntimegetPluginRuntime(IFCPlugin targetPlugin) Gets the runtime of the given plugin.static PluginRuntimegetPluginRuntime(String scopeKey, String runtimeKey) Gets the plugin runtime with the given ID (scope key, runtime key).static PluginRuntimegetPluginRuntimeByPluginKey(Mandant client, PluginId pluginId) Gets the plugin runtime for the plugin bundle with the given plugin key.static PluginRuntimegetPluginRuntimeByPluginKey(Mandant client, String pluginKey) Deprecated.static PluginRuntimegetPluginRuntimeByPluginKey(Mandant client, String pluginKey, String fileKey) Gets the plugin runtime for the plugin bundle with the given plugin key.static PluginRuntimegetPluginRuntimeByPluginKey(UUID clientUuid, PluginId pluginId) Gets the plugin runtime for the plugin bundle with the given plugin key and file key.static PluginRuntimegetPluginRuntimeByPluginKey(UUID clientUuid, String pluginKey) Deprecated.static PluginRuntimegetPluginRuntimeByPluginKey(UUID clientUuid, String pluginKey, String fileKey) Gets the plugin runtime for the plugin bundle with the given plugin key and file key.getPluginsByPluginKey(Mandant client, String pluginKey, Class<Plugin> pluginClass) Deprecated.getPluginsByPluginKey(Mandant client, String pluginKey, String fileKey, Class<Plugin> pluginClass) Gets all plugins from the plugin bundle with the given plugin key, limited to plugins of the given type.static <Plugin extends IFCPlugin>
org.apache.commons.lang3.tuple.Pair<PluginRuntime, Plugin> getPluginWithRuntime(String scopeKey, String runtimeKey, String pluginName, Class<Plugin> pluginClass) Gets the plugin with the given ID (scope key, runtime key, plugin name), together with its runtime.getRegisteredPlugins(Class<T> clazz) Get a set with all registered plugins of the givenIFCPlugin-interfacestatic IFCPlugingetSystemPluginByName(EPluginTypes type, String pluginName) Deprecated.static <T extends IFCPlugin>
TgetSystemPluginByName(Class<T> clazz, String pluginName) Get a system-plugin by name,IFCPlugin-interfacestatic Set<PluginRuntime> Get a List of allPluginRuntimes registered in system-scopegetSystemPlugins(EPluginTypes type) Deprecated.getSystemPlugins(Class<T> clazz) Get a set of plugins with the given interfaces registered in system-scopestatic <T extends IFCPlugin>
Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getSystemPluginsWithRuntime(Class<T> clazz) static PluginRuntimeinitClientPlugin(File pluginJar, Mandant man) Deprecated.static voidInitialize all plugins stored in the databasestatic PluginRuntimeinitSystemPlugin(File pluginJar) Deprecated.static voidinstall(IPluginEntity<?, ?, ?> pluginEntity) static booleanisHasAnyPluginsOfType(Mandant client, Class<? extends IFCPlugin> pluginType) Checks if any plugins of the given type exist.static booleanisPluginJar(File file) Deprecated.static <T extends IFCPlugin>
PluginRuntimeregisterClientPlugin(Mandant man, Class<T> clazz, String runtimeKey) Method to register a plugin-class in scope of the given clientstatic voidregisterMandantPlugin(Mandant man, EPluginTypes typ, Class<? extends IFCPlugin> clazz) Deprecated.static <Plugin extends IFCPlugin>
voidregisterPlugin(boolean isInstall, PluginRuntime runtime, Class<Plugin> clazz) Register a plugin to the given key andPluginRuntimestatic <T extends IFCPlugin>
voidregisterPlugin(PluginRuntime runtime, Class<T> clazz) static voidregisterSystemPlugin(EPluginTypes typ, Class<? extends IFCPlugin> clazz) Deprecated.static PluginRuntimeregisterSystemPlugin(Class<? extends IFCPlugin> clazz, String runtimeKey) Method to register a plugin-class in system-scopestatic voidreleaseMandantPlugin(Mandant man, PluginRuntime pluginMeta) Deprecated.static voidreleasePlugin(boolean isUninstall, PluginRuntime runtime) static voidreleasePlugin(boolean isUninstall, String scopeKey, String runtimeKey) static voidreleasePlugin(PluginRuntime runtime) static voidreleasePlugin(String scopeKey, String runtimeKey) static voidReleases all registered pluginsstatic booleanscanAndRegisterMandantPlugin(Mandant man, PluginRuntime pluginMeta, byte[] jarData) Deprecated.static booleanscanAndRegisterSystemPlugin(PluginRuntime pluginMeta, byte[] jarData) Deprecated.static voidDeprecated.useinitPlugins()static voidsynchronizePlugin(boolean isInstall, PluginSyncData pluginData) static voiduninstallPlugin(String scopeKey, String runtimeKey)
-
Constructor Details
-
PluginManager
public PluginManager()
-
-
Method Details
-
createClientProtocolEntry
public static void createClientProtocolEntry(UserContext uc, Mandant man, String protocolEntry, Object... params) Creates a client protocol entry- Parameters:
uc-UserContextwith the user who uploaded the plugin.man- Theclientfor which to create the protocol entry.protocolEntry-Stringprotocol-textparams-Objects parameters
-
createMandantProtocolEntry
@Deprecated public static void createMandantProtocolEntry(IEntityContext ec, Mandant man, String protocolEntry, Object... params) - Parameters:
ec- Entity context for accessing the database.man- Theclientscope for which to create a protocol entry.protocolEntry- Protocol entry to create.params- Additional message params for the protocol message.
-
createSystemProtocolEntry
public static void createSystemProtocolEntry(UserContext uc, String protocolEntry, Object... params) Creates a system protocol entry- Parameters:
uc-UserContextprotocolEntry-Stringprotocol-textparams-Objects parameters
-
deletePlugin
Deprecated.- Throws:
IOException
-
deletePlugin
Deprecated.- Throws:
IOException
-
getAllPlugins
Get a set of plugins with the given interface registered in system-scope OR to the given client. (client-scope wins over system-scope)- Parameters:
client- Client scope for which to retrieve all plugins.pluginType- Type of the plugins to retrieve.- Returns:
- All plugins from the given client (if any) and from the system scope. A client-scoped plugin overwrites a system-scoped plugin.
-
getAllPlugins
Get a set of plugins with the given interface registered in system-scope OR to the given client. (client-scope wins over system-scope)- Parameters:
clientUuid- UUID of aclient.pluginType- Type of the plugins to retrieve.- Returns:
- All plugins from the given client (if any) and from the system scope. A client-scoped plugin overwrites a system-scoped plugin.
-
getAllPlugins
Deprecated.- Parameters:
man- Theclientscope from which to retrieve plugins.type- The type of the plugins to retrieve.- Returns:
- A set of all matching plugins.
-
getAllPluginsWithRuntime
public static <T extends IFCPlugin> Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getAllPluginsWithRuntime(Mandant man, Class<T> clazz) -
getAllPluginsWithRuntime
public static <T extends IFCPlugin> Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getAllPluginsWithRuntime(UUID clientUuid, Class<T> clazz) -
getClientPlugins
Get a set of plugins with the given interfaces registered to the given client- Parameters:
client- The client-scope to use for retrieving client plugins, if any.pluginType- Type of the plugins to retrieve.- Returns:
- All active plugins for the given client, if any (does not include systm plugins!)
-
getClientPlugins
Get a set of plugins with the given interfaces registered to the given client- Parameters:
clientUuid- The client-scope to use for retrieving client plugins, if any.pluginType- Type of the plugins to retrieve.- Returns:
- All active plugins for the given client, if any (does not include systm plugins!)
-
getClientPlugins
Gets a list of allplugin runtimesregistered to the given client (not including system plugins!)- Parameters:
client- A client for which to retrieve the plugins.- Returns:
- A list of all
plugin runtimescorresponding to the plugin installed for the given client
-
getClientPlugins
Gets a list of allplugin runtimesregistered to the given client (not including system plugins!)- Parameters:
clientUuid- UUID of aclient.- Returns:
- A list of all
plugin runtimescorresponding to the plugin installed for the given client
-
getClientPluginsWithRuntime
public static <T extends IFCPlugin> Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getClientPluginsWithRuntime(Mandant client, Class<T> clazz) -
getClientPluginsWithRuntime
public static <T extends IFCPlugin> Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getClientPluginsWithRuntime(UUID clientUuid, Class<T> clazz) -
getMandantPluginByName
@Deprecated public static IFCPlugin getMandantPluginByName(Mandant man, EPluginTypes type, String pluginName) Deprecated.will be removed!- Parameters:
man- Theclientscope from which to retrieve plugins.type- The type of the plugins to retrieve.pluginName- The name of the plugin to retrieve.- Returns:
- The plugin or
nullwhen no plugin matches.
-
getMandantPluginJar
Deprecated.- Parameters:
man- Theclientscope for which to register a plugin.jarName- Name of the JAR file for which to look for.- Returns:
- Always
null- this method is deprecated! - Throws:
IOException- Never thrown.
-
getMandantPlugins
Deprecated.will be removed!- Parameters:
man- Theclientscope from which to retrieve plugins.type- The type of the plugins to retrieve.- Returns:
- A set of all matching plugins.
-
getMandantPlugins
Deprecated.- Parameters:
man- Theclientfor which to retrieve a plugin.- Returns:
- A list of all matching plugins.
-
getPluginAuthenticatorType
-
getPluginAuthenticatorTypeWithRuntime
public static org.apache.commons.lang3.tuple.Pair<PluginRuntime, IPluginAuthenticatorType> getPluginAuthenticatorTypeWithRuntime(IAuthenticator<?> authenticator) -
getPluginByName
-
getPluginByName
@Deprecated public static IFCPlugin getPluginByName(Mandant man, EPluginTypes type, String pluginName) Deprecated.- Parameters:
man- Theclientscope from which to retrieve plugins.type- The type of the plugins to retrieve.pluginName- The name of the plugin to retrieve.- Returns:
- The plugin or
nullwhen no matching plugin was found.
-
getPluginByNameWithRuntime
public static <T extends IFCPlugin> org.apache.commons.lang3.tuple.Pair<PluginRuntime, T> getPluginByNameWithRuntime(Mandant man, Class<T> clazz, String pluginName) -
getPluginRuntime
Gets the runtime of the given plugin.- Parameters:
targetPlugin- The plugin for which to retrieve the runtime.- Returns:
- The
PluginRuntimeof the plugin, or null if no runtime was found.
-
getPluginByClassAndNameWithRuntime
public static <T extends IFCPlugin> org.apache.commons.lang3.tuple.Pair<PluginRuntime, T> getPluginByClassAndNameWithRuntime(UUID clientUuid, Class<T> clazz, String pluginName) -
getPluginByPluginKeyAndName
@Deprecated public static <Plugin extends IFCPlugin> Plugin getPluginByPluginKeyAndName(Mandant client, String pluginKey, String pluginName, Class<Plugin> pluginClass) Deprecated.Gets a plugin with a certain name from the plugin bundle with the given plugin key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Type Parameters:
Plugin- Type of the plugin to retrieve.- Parameters:
client- The client for which to retrieve the plugin.pluginKey- The plugin key to search for.pluginName- The name of the plugin to search for.pluginClass- The expected subtype ofIFCPluginto return.- Returns:
- The plugin instance, or null if no matching plugin could be found.
-
getPluginByPluginKeyAndName
public static <Plugin extends IFCPlugin> Plugin getPluginByPluginKeyAndName(Mandant client, PluginExtensionPointId extensionPointId, Class<Plugin> pluginClass) Gets a plugin with a certain name from the plugin bundle with the given plugin key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Type Parameters:
Plugin- Type of the plugin to retrieve.- Parameters:
client- The client for which to retrieve the plugin.extensionPointId- The ID of theIFCPluginto search for.pluginClass- The expected subtype ofIFCPluginto return.- Returns:
- The plugin instance, or null if no matching plugin could be found.
-
getPluginByPluginKeyAndName
public static <Plugin extends IFCPlugin> Plugin getPluginByPluginKeyAndName(Mandant client, String pluginKey, String fileKey, String pluginName, Class<Plugin> pluginClass) Gets a plugin with a certain name from the plugin bundle with the given plugin key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Type Parameters:
Plugin- Type of the plugin to retrieve.- Parameters:
client- The client for which to retrieve the plugin.pluginKey- The plugin key to search for.fileKey- The plugin file key to search for. May be null or empty when the plugin consists of a single JAR file.pluginName- The name of the plugin to search for.pluginClass- The expected subtype ofIFCPluginto return.- Returns:
- The plugin instance, or null if no matching plugin could be found.
-
getPluginNameMap
@Deprecated public static Map<EPluginScope, Set<String>> getPluginNameMap(UserContext uc, Mandant mandant, EPluginTypes type) Deprecated.- Parameters:
uc- The current user context, this parameter is not used anymore.mandant- Theclientscope from which to retrieve plugins.type- The type of the plugins to retrieve.- Returns:
- A map with all matching plugins.
-
getPluginNameMap
@Deprecated public static <T extends IFCPlugin> Map<EPluginScope, Set<String>> getPluginNameMap(Mandant mandant, Class<T> clazz) Deprecated.Get a map of plugins by client, system andIFCPlugin-interface -
getPluginNames
-
getPluginNames
@Deprecated public static Set<String> getPluginNames(UserContext uc, Mandant mandant, EPluginTypes type) Deprecated.- Parameters:
uc- The current user context, this parameter is not used anymore.mandant- Theclientscope from which to retrieve plugins.type- The type of the plugins to retrieve.- Returns:
- A set of all matching plugins.
-
getPluginRuntime
Gets the plugin runtime with the given ID (scope key, runtime key).- Parameters:
scopeKey- The scope key, either the UUID of aclientor the system scope key.runtimeKey- The runtime key, which is the unique identifier of the plugin runtime within the scope.- Returns:
- The plugin runtime, or null if no matching plugin could be found.
-
getPlugin
Gets the plugin with the given ID (scope key, runtime key, plugin name).- Parameters:
scopeKey- The scope key, either the UUID of aclientor the system scope key.runtimeKey- The runtime key, which is the unique identifier of the plugin runtime within the scope.pluginName- The name of the plugin to search for.- Returns:
- The plugin runtime, or null if no matching plugin could be found.
-
getAllPluginRuntimes
-
getPlugin
public static <Plugin extends IFCPlugin> Plugin getPlugin(String scopeKey, String runtimeKey, String pluginName, Class<Plugin> pluginClass) Gets the plugin with the given ID (scope key, runtime key, plugin name).- Parameters:
scopeKey- The scope key, either the UUID of aclientor the system scope key.runtimeKey- The runtime key, which is the unique identifier of the plugin runtime within the scope.pluginName- The name of the plugin to search for.pluginClass- The expected subtype ofIFCPluginto return.- Returns:
- The plugin, or null if no matching plugin could be found or is not of the expected type.
-
getPluginWithRuntime
public static <Plugin extends IFCPlugin> org.apache.commons.lang3.tuple.Pair<PluginRuntime, Plugin> getPluginWithRuntime(String scopeKey, String runtimeKey, String pluginName, Class<Plugin> pluginClass) Gets the plugin with the given ID (scope key, runtime key, plugin name), together with its runtime.- Parameters:
scopeKey- The scope key, either the UUID of aclientor the system scope key.runtimeKey- The runtime key, which is the unique identifier of the plugin runtime within the scope.pluginName- The name of the plugin to search for.pluginClass- The expected subtype ofIFCPluginto return.- Returns:
- The plugin with its runtime, or null if no matching plugin could be found or is not of the expected type.
-
getPluginRuntimeByPluginKey
@Deprecated public static PluginRuntime getPluginRuntimeByPluginKey(Mandant client, String pluginKey) Deprecated.Gets the plugin runtime for the plugin bundle with the given plugin key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Parameters:
client- The client for which to retrieve the plugin.pluginKey- The plugin key to search for.- Returns:
- The plugin runtime, or null if no matching plugin could be found.
-
getPluginRuntimeByPluginKey
Gets the plugin runtime for the plugin bundle with the given plugin key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Parameters:
client- The client for which to retrieve the plugin.pluginId- The plugin ID to search for.- Returns:
- The plugin runtime, or null if no matching plugin could be found.
-
getPluginRuntimeByPluginKey
public static PluginRuntime getPluginRuntimeByPluginKey(Mandant client, String pluginKey, String fileKey) Gets the plugin runtime for the plugin bundle with the given plugin key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Parameters:
client- The client for which to retrieve the plugin.pluginKey- The plugin key to search for.fileKey- The file key to search for.- Returns:
- The plugin runtime, or null if no matching plugin could be found.
-
getPluginRuntimeByPluginKey
@Deprecated public static PluginRuntime getPluginRuntimeByPluginKey(UUID clientUuid, String pluginKey) Deprecated.Gets the plugin runtime for the plugin bundle with the given plugin key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Parameters:
clientUuid- The UUID of the client for which to retrieve the plugin.pluginKey- The plugin key to search for.- Returns:
- The plugin runtime, or null if no matching plugin could be found.
-
getPluginRuntimeByPluginKey
Gets the plugin runtime for the plugin bundle with the given plugin key and file key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Parameters:
clientUuid- The UUID of the client for which to retrieve the plugin.pluginId- The ID of the plugin to search for.- Returns:
- The plugin runtime, or null if no matching plugin could be found.
-
getPluginRuntimeByPluginKey
public static PluginRuntime getPluginRuntimeByPluginKey(UUID clientUuid, String pluginKey, String fileKey) Gets the plugin runtime for the plugin bundle with the given plugin key and file key.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. If the plugin consists of multiple JAR files, each JAR file must also specify aPlugin-File-Keythat identifies it. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Parameters:
clientUuid- The UUID of the client for which to retrieve the plugin.pluginKey- The plugin key to search for.fileKey- The plugin file key to search for.- Returns:
- The plugin runtime, or null if no matching plugin could be found.
-
getPluginsByPluginKey
@Deprecated public static <Plugin extends IFCPlugin> Set<Plugin> getPluginsByPluginKey(Mandant client, String pluginKey, Class<Plugin> pluginClass) Deprecated.Gets all plugins from the plugin bundle with the given plugin key, limited to plugins of the given type.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Type Parameters:
Plugin- Type of the plugin to retrieve.- Parameters:
client- The client for which to retrieve the plugin.pluginKey- The plugin key to search for.pluginClass- The expected subtype ofIFCPluginto return.- Returns:
- All plugin instances, or an empty set if no matching plugins could be found.
-
getPluginsByPluginKey
public static <Plugin extends IFCPlugin> Set<Plugin> getPluginsByPluginKey(Mandant client, String pluginKey, String fileKey, Class<Plugin> pluginClass) Gets all plugins from the plugin bundle with the given plugin key, limited to plugins of the given type.A plugin bundle is a JAR file that contains one or more implementations of the
IFCPlugininterface. Each bundle must specify aPlugin-Keyin its manifest file, which uniquely identifies the plugin bundle amongst all available formcycle plugins. Each implementation ofIFCPluginhas aname, which uniquely identifies that plugin within the bundle. In principle, different plugin bundles could contain plugins with the same name. The combination of the plugin key and the plugin name uniquely identifies a plugin.When a client is given, looks for plugins installed either in that client scope, or within the system scope. In case a plugin is found in both scopes, the client-scoped plugin is returned. When no client is given, only system-scoped plugins are searched.
You may also specify the expected subtype of
IFCPlugin. If you do, the plugin instance gets returned only if matches the given type. UseIFCPlugin.classto apply no restriction.- Type Parameters:
Plugin- Type of the plugin to retrieve.- Parameters:
client- The client for which to retrieve the plugin.pluginKey- The plugin key to search for.fileKey- The plugin file key to search for.pluginClass- The expected subtype ofIFCPluginto return.- Returns:
- All plugin instances, or an empty set if no matching plugins could be found.
-
getRegisteredPlugins
-
getSystemPluginByName
Get a system-plugin by name,IFCPlugin-interface -
getSystemPluginByName
Deprecated.- Parameters:
type- The type of the plugins to retrieve.pluginName- The name of the plugin to retrieve.- Returns:
- The plugin or
nullwhen no plugin matches.
-
getSystemPlugins
-
getSystemPlugins
Get a List of allPluginRuntimes registered in system-scope- Returns:
SetofPluginRuntimes
-
getSystemPlugins
Deprecated.- Parameters:
type- The type of the plugins to retrieve.- Returns:
- A set of all matching plugins.
-
getSystemPluginsWithRuntime
public static <T extends IFCPlugin> Set<org.apache.commons.lang3.tuple.Pair<PluginRuntime, T>> getSystemPluginsWithRuntime(Class<T> clazz) -
initClientPlugin
@Deprecated public static PluginRuntime initClientPlugin(File pluginJar, Mandant man) throws IOException, FCPluginException Deprecated.- Throws:
IOExceptionFCPluginException
-
initPlugins
public static void initPlugins()Initialize all plugins stored in the database -
initSystemPlugin
@Deprecated public static PluginRuntime initSystemPlugin(File pluginJar) throws IOException, FCPluginException Deprecated.- Throws:
IOExceptionFCPluginException
-
install
- Throws:
IOExceptionFCPluginException
-
isHasAnyPluginsOfType
Checks if any plugins of the given type exist.- Parameters:
client- Optional client scope. When given, the client and system scope is searched. Otherwise, only the system scope is searched.pluginType- Type of plugin to search for.- Returns:
- Whether any plugins of the given type exist.
-
isPluginJar
Deprecated. -
registerClientPlugin
public static <T extends IFCPlugin> PluginRuntime registerClientPlugin(Mandant man, Class<T> clazz, String runtimeKey) throws FCPluginException Method to register a plugin-class in scope of the given client- Type Parameters:
T- Type of the plugin to register.- Parameters:
man- Theclientfor which to register the plugin.clazz- The class of the plugin to register.runtimeKey- Runtime key (UUID) of the plugin to register.- Returns:
- The newly created plugin runtime for the registered plugin.
- Throws:
FCPluginException- When the plugin could not be registered.
-
registerMandantPlugin
@Deprecated public static void registerMandantPlugin(Mandant man, EPluginTypes typ, Class<? extends IFCPlugin> clazz) throws FCPluginException Deprecated.- Parameters:
man- Theclientscope for which to register a plugin.typ- The type of the plugin to register.clazz- The class of the plugin to register.- Throws:
FCPluginException- When the plugin could not be registered or initialized.
-
registerPlugin
public static <T extends IFCPlugin> void registerPlugin(PluginRuntime runtime, Class<T> clazz) throws FCPluginException - Throws:
FCPluginException
-
registerPlugin
public static <Plugin extends IFCPlugin> void registerPlugin(boolean isInstall, PluginRuntime runtime, Class<Plugin> clazz) throws FCPluginException Register a plugin to the given key andPluginRuntime- Type Parameters:
Plugin- Type of the plugin to register.- Parameters:
isInstall-trueif the plugin is installed for the first time,falseif the plugin configuration is only updated.runtime- The runtime of the plugin to register.clazz- Class of the plugin to register.- Throws:
FCPluginException- When the plugin could not be registered.
-
registerSystemPlugin
public static PluginRuntime registerSystemPlugin(Class<? extends IFCPlugin> clazz, String runtimeKey) throws FCPluginException Method to register a plugin-class in system-scope- Parameters:
clazz-IFCPlugin-class to registerruntimeKey- Runtime key (UUID) of the plugin to register.- Returns:
- The newly created plugin runtime for the registered plugin.
- Throws:
FCPluginException- When the plugin could not be registered.
-
registerSystemPlugin
@Deprecated public static void registerSystemPlugin(EPluginTypes typ, Class<? extends IFCPlugin> clazz) throws FCPluginException Deprecated.- Parameters:
typ- The type of the plugin to register.clazz- The class of the plugin to register.- Throws:
FCPluginException- When the plugin could not be registered or initialized.
-
releaseMandantPlugin
@Deprecated public static void releaseMandantPlugin(Mandant man, PluginRuntime pluginMeta) throws IOException Deprecated.- Parameters:
man- Theclientscope for which to register a plugin.pluginMeta- Runtime of the plugin to release.- Throws:
IOException- When the plugin could not be released, such as due to a database error.
-
releasePlugin
- Throws:
IOException
-
releasePlugin
public static void releasePlugin(boolean isUninstall, String scopeKey, String runtimeKey) throws IOException - Throws:
IOException
-
releasePlugin
- Throws:
IOException
-
releasePlugin
- Throws:
IOException
-
releasePlugins
public static void releasePlugins()Releases all registered plugins -
scanAndRegisterMandantPlugin
@Deprecated public static boolean scanAndRegisterMandantPlugin(Mandant man, PluginRuntime pluginMeta, byte[] jarData) Deprecated.- Parameters:
man- Theclientfor which to register a plugin.pluginMeta- Runtime of the plugin to register.jarData- Binary content of the JAR file to register.- Returns:
- Always
false- this method is deprecated!
-
scanAndRegisterSystemPlugin
@Deprecated public static boolean scanAndRegisterSystemPlugin(PluginRuntime pluginMeta, byte[] jarData) Deprecated.- Parameters:
pluginMeta- Runtime of the plugin to register.jarData- Binary content of the JAR file to register.- Returns:
- Always
false- this method is deprecated!
-
scanForAllPlugins
Deprecated.useinitPlugins() -
synchronizePlugin
public static void synchronizePlugin(boolean isInstall, PluginSyncData pluginData) throws IOException, FCPluginException - Throws:
IOExceptionFCPluginException
-
uninstallPlugin
- Parameters:
scopeKey- the plugin scope keyruntimeKey- the plugin runtime key- Throws:
IOException- on errors while uninstall
-
createClientProtocolEntry(UserContext, Mandant, String, Object...)