Package org.javlo.module.core
Class Module
- java.lang.Object
-
- org.javlo.module.core.Module
-
- Direct Known Subclasses:
ExternalModule
public class Module extends Object
A module is a application inside javlo.- Author:
- Patrick Vandermaesen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Module.Box
class
Module.BoxStep
static class
Module.EmptyAction
static class
Module.HtmlLink
class
Module.Link
-
Field Summary
Fields Modifier and Type Field Description protected IModuleAction
action
-
Method Summary
-
-
-
Field Detail
-
action
protected IModuleAction action
-
-
Constructor Detail
-
Module
public Module(File configFile, Locale locale, String modulePath, String URIPrefix) throws IOException
- Throws:
IOException
-
-
Method Detail
-
loadAction
protected void loadAction()
-
getModuleFolder
public String getModuleFolder()
-
getActionName
public String getActionName()
-
isMobile
public boolean isMobile()
-
loadEditI18n
public Properties loadEditI18n(GlobalContext globalContext, javax.servlet.http.HttpSession session) throws IOException
- Throws:
IOException
-
getMainBoxes
public Collection<Module.Box> getMainBoxes()
-
getSideBoxes
public Collection<Module.Box> getSideBoxes()
-
getName
public String getName()
-
getHelpTitle
public String getHelpTitle()
-
getHelpText
public String getHelpText()
-
getRenderer
public String getRenderer()
-
getMobileRenderer
public String getMobileRenderer()
-
setRenderer
public void setRenderer(String renderer)
set a renderer. Root folder is the root of the module.- Parameters:
renderer
-
-
setAbsoluteRenderer
public void setAbsoluteRenderer(String renderer)
set a renderer. Root folder is the root of webapps.- Parameters:
renderer
-
-
restoreRenderer
public void restoreRenderer()
restore the renderer of the config file.
-
restoreAll
public void restoreAll() throws IOException
restore all element to value defined in the config.- Throws:
IOException
-
restoreTitle
public void restoreTitle()
-
restoreBoxes
public void restoreBoxes()
-
getTitle
public String getTitle()
-
isSidebar
public boolean isSidebar()
-
setSidebar
public void setSidebar(boolean sidebar)
-
getNavigationTitle
public String getNavigationTitle()
-
getNavigation
public Collection<Module.Box> getNavigation()
-
removeNavigation
public boolean removeNavigation(String name)
-
isBreadcrumb
public boolean isBreadcrumb()
-
setBreadcrumb
public void setBreadcrumb(boolean breadcrumb)
-
getCSS
public Collection<String> getCSS()
return the list of URL to CSS files of the module.- Returns:
-
getJS
public Collection<String> getJS()
return the list of URL to JS files of the module.- Returns:
-
getToolsTitle
public String getToolsTitle()
-
setToolsTitle
public void setToolsTitle(String toolsTitle)
-
getToolsRenderer
public String getToolsRenderer()
-
setToolsRenderer
public void setToolsRenderer(String toolsRenderer)
-
restoreToolsRenderer
public void restoreToolsRenderer()
restore the tools renderer of the config file.
-
getBoxes
public List<Module.Box> getBoxes()
-
getBox
public Module.Box getBox(String name)
-
removeBox
public Module.Box removeBox(String name)
-
createMainBox
public Module.Box createMainBox(String name, String title, String renderer, boolean action)
-
createSideBox
public Module.Box createSideBox(String name, String title, String renderer, boolean action)
create a a new side box.- Parameters:
name
-title
-renderer
-action
-- Returns:
- null if box with the same name already exist.
-
clearAllBoxes
public void clearAllBoxes()
-
getBackUrl
public String getBackUrl()
-
setBackUrl
public void setBackUrl(String backUrl)
-
getPath
public String getPath()
-
getBreadcrumbList
public Collection<Module.HtmlLink> getBreadcrumbList()
-
pushBreadcrumb
public void pushBreadcrumb(Module.HtmlLink link)
-
popBreadcrumb
public Module.HtmlLink popBreadcrumb()
-
clearBreadcrump
public void clearBreadcrump()
-
getBreadcrumbTitle
public String getBreadcrumbTitle()
-
setBreadcrumbTitle
public void setBreadcrumbTitle(String breadcrumbTitle)
-
isSearch
public boolean isSearch()
-
setSearch
public void setSearch(boolean search)
-
getOrder
public int getOrder()
-
getVersion
public String getVersion()
-
getDescription
public String getDescription()
-
getAction
public IModuleAction getAction()
-
haveRight
public boolean haveRight(javax.servlet.http.HttpSession session, User user) throws ModuleException
- Throws:
ModuleException
-
getParent
public String getParent()
-
setParent
public void setParent(String parent)
-
addChild
public void addChild(Module module)
-
updateMainRenderer
public void updateMainRenderer(ContentContext ctx) throws javax.servlet.ServletException, IOException
- Throws:
javax.servlet.ServletException
IOException
-
getViewRenderer
public String getViewRenderer()
-
setViewRenderer
public void setViewRenderer(String viewRenderer)
-
getRealPath
public String getRealPath(String path)
return the real path of a file inside the module.- Parameters:
path
- a path relative to module root.- Returns:
- a absolute path.
-
main
public static void main(String[] args)
-
getFont
public String getFont()
-
setFont
public void setFont(String font)
-
-