Package com.onwbp.base.repository
Class ModulesRegister
java.lang.Object
com.onwbp.base.repository.ModulesRegister
This class has been replaced by
ModuleRegistrationServlet
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<com.onwbp.base.schema.definition.TNode>
getDependentModuleNames
(ServletContext aServletContext) Deprecated.Since 5.7.0, this method returns an empty list.static boolean
registerDirectory
(File aModuleDirectory) Registers a new module whose root is at the specified directory.static boolean
registerDirectoryIfModule
(File aModuleDirectory) Registers a new module whose root is at the specified directory.static boolean
registerWebApp
(Servlet aServlet, ServletConfig aServletConfig) Deprecated.Since 5.9.0, this method is replaced byModuleRegistrationListener
.static void
unregisterWebApp
(Servlet aServlet, ServletConfig aServletConfig) Deprecated.Since 5.9.0, this method is replaced byModuleRegistrationListener
.
-
Constructor Details
-
ModulesRegister
public ModulesRegister()
-
-
Method Details
-
registerDirectoryIfModule
public static boolean registerDirectoryIfModule(File aModuleDirectory) throws ModuleDefinitionException Registers a new module whose root is at the specified directory.A directory is identified as a module if, and only if, the file '/WEB-INF/ebx/module.xml' is defined under this directory.
- Parameters:
aModuleDirectory
- the module directory to register- Returns:
true
if registration has succeeded,false
if registration has failed because a module with same name has been already registered.- Throws:
ModuleDefinitionException
- if file '/WEB-INF/ebx/module.xml' is defined but it cannot be read properly (this event is also added as an error to 'kernel' logs).
-
registerDirectory
Registers a new module whose root is at the specified directory.Requires the file
/WEB-INF/ebx/module.xml
to be defined under this directory.- Parameters:
aModuleDirectory
- the module directory to register- Returns:
true
if registration has succeeded. Returnsfalse
if registration has failed because a module with same name has been already registered.- Throws:
ModuleDefinitionException
- if file '/WEB-INF/ebx/module.xml' is not defined or if it cannot be read properly (this event is also added as an error to 'kernel' logs).
-
getDependentModuleNames
@Deprecated public static List<com.onwbp.base.schema.definition.TNode> getDependentModuleNames(ServletContext aServletContext) throws ModuleDefinitionException Deprecated.Since 5.7.0, this method returns an empty list.- Throws:
ModuleDefinitionException
-
registerWebApp
@Deprecated public static boolean registerWebApp(Servlet aServlet, ServletConfig aServletConfig) throws ModuleDefinitionException Deprecated.Since 5.9.0, this method is replaced byModuleRegistrationListener
.Registers a new module based on the specified servlet's web application.This method must be called by the method
Servlet.init()
.The file '/WEB-INF/ebx/module.xml' in the corresponding web application defines the module name and other basic module features.
If the web application defines some specific module classes (like
ServiceInstaller
), theServlet
provided must have been loaded by the web application itself (that is , it must be in '/WEB-INF/classes/' or in '/WEB-INF/lib/*.jar').- Parameters:
aServlet
- the Java Servlet APIaServletConfig
- the servlet's configuration and initialization parameters- Returns:
true
as registration has succeeded.- Throws:
ModuleDefinitionException
- if file '/WEB-INF/ebx/module.xml' is not defined by the web application, or if it cannot be read properly (this event is also added as an error to 'kernel' logs).- See Also:
-
unregisterWebApp
Deprecated.Since 5.9.0, this method is replaced byModuleRegistrationListener
.Unregisters a module that has been registered by theregisterWebApp()
.This method must be called by the method
Servlet.destroy()
.- Parameters:
aServlet
- the Java Servlet APIaServletConfig
- the servlet's configuration and initialization parameters- Throws:
ModuleDefinitionException
- if file '/WEB-INF/ebx/module.xml' is not defined by the web application, or if it cannot be read properly (this event is also added as an error to 'kernel' logs).- See Also:
-