@Requirement(reqId="DOI_ARCHI_030", reqName="Plugins") public final class PluginFactory extends Object
Modifier and Type | Field and Description |
---|---|
private static Map<String,Object> |
CONFIG
Stores the instances of plugin.
|
private static Map<String,String> |
PLUGINS_IMPL
Map the name of an interface to the name of a corresponding concrete
implementation class.
|
private static Map<String,String> |
SETTINGS
Settings.
|
Modifier | Constructor and Description |
---|---|
private |
PluginFactory()
"Static" class cannot be instantiated
|
Modifier and Type | Method and Description |
---|---|
private static Object |
buildObject(String aClassName)
instantiates the plugin.
|
static AbstractAuthenticationPluginHelper |
getAuthenticationSystem()
Returns the concrete implementation of the authentication system.
|
private static <T> T |
getPlugin(String implClassName)
Returns the plugin according to its implementation class.
|
static AbstractProjectSuffixPluginHelper |
getProjectSuffix()
Returns the concrete implementation of the suffix project db.
|
static AbstractTokenDBPluginHelper |
getToken()
Returns the concrete implementation of the token db.
|
static AbstractUserRolePluginHelper |
getUserManagement()
Returns the concrete implementation of the user management interface.
|
static void |
init(Map<String,String> settings)
Loads the path of plugins from Settings.
|
static boolean |
isPassword(String keywordClassName,
String key)
Checks if the key is a password in the class keywordClassName related to
the configuration file
|
private static final Map<String,String> PLUGINS_IMPL
public static void init(Map<String,String> settings)
settings
- config settingspublic static AbstractUserRolePluginHelper getUserManagement()
public static AbstractProjectSuffixPluginHelper getProjectSuffix()
public static AbstractTokenDBPluginHelper getToken()
public static AbstractAuthenticationPluginHelper getAuthenticationSystem()
public static boolean isPassword(String keywordClassName, String key) throws DoiRuntimeException
keywordClassName
- plugin related to the configuration filekey
- keywordDoiRuntimeException
- When an error occursprivate static <T> T getPlugin(String implClassName)
T
- the pluginimplClassName
- implementation classprivate static Object buildObject(String aClassName) throws DoiRuntimeException
aClassName
- the plugin nameDoiRuntimeException
- - if aClassName cannot be instantiatedCopyright © 2017–2020 CNES. All rights reserved.