Package org.javlo.module.core
Class ModulesContext
- java.lang.Object
-
- org.javlo.module.core.ModulesContext
-
public class ModulesContext extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Module>
getAllModules()
Module
getCurrentModule()
Module
getFromModule()
returns the module that called the current module, null if nobody as call the module, just click on menu. as exemple : for choose templates you can call template module from admin module.static ModulesContext
getInstance(javax.servlet.http.HttpSession session, GlobalContext globalContext)
Module
getModule(String moduleName)
Collection<Module>
getModules()
void
initContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
boolean
isCurrentModule()
boolean
isModule(String moduleName)
check if current site have a specific module activevoid
loadModule(javax.servlet.http.HttpSession session, GlobalContext globalContext)
Module
searchModule(String name)
void
setCurrentModule(String moduleName)
void
setCurrentModuleByActionGroup(String actionGroup)
active module with action group associate.void
setFromModule(String moduleName)
void
setFromModule(Module fromModule)
-
-
-
Method Detail
-
loadModule
public void loadModule(javax.servlet.http.HttpSession session, GlobalContext globalContext) throws ModuleException
- Throws:
ModuleException
-
getInstance
public static final ModulesContext getInstance(javax.servlet.http.HttpSession session, GlobalContext globalContext) throws ModuleException
- Throws:
ModuleException
-
getModules
public Collection<Module> getModules()
-
isModule
public boolean isModule(String moduleName)
check if current site have a specific module active- Parameters:
moduleName
-- Returns:
-
getAllModules
public Collection<Module> getAllModules()
-
isCurrentModule
public boolean isCurrentModule()
-
setCurrentModuleByActionGroup
public void setCurrentModuleByActionGroup(String actionGroup)
active module with action group associate.- Parameters:
actionGroup
-
-
setCurrentModule
public void setCurrentModule(String moduleName)
-
getFromModule
public Module getFromModule()
returns the module that called the current module, null if nobody as call the module, just click on menu. as exemple : for choose templates you can call template module from admin module.- Returns:
-
setFromModule
public void setFromModule(Module fromModule)
-
setFromModule
public void setFromModule(String moduleName)
-
-