Package com.onwbp.base.repository
Class ModulesRegister
- java.lang.Object
-
- com.onwbp.base.repository.ModulesRegister
-
public class ModulesRegister extends Object
This class has been replaced byModuleRegistrationServlet
.- See Also:
ModuleRegistrationServlet
-
-
Constructor Summary
Constructors Constructor Description ModulesRegister()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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
.
-
-
-
Method Detail
-
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
public static boolean registerDirectory(File aModuleDirectory) throws ModuleDefinitionException
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(Servlet, ServletConfig)
,Servlet.init(javax.servlet.ServletConfig)
-
unregisterWebApp
@Deprecated public static void unregisterWebApp(Servlet aServlet, ServletConfig aServletConfig)
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:
registerWebApp(Servlet, ServletConfig)
,Servlet.destroy()
-
-