|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.meshcms.util.DirectoryParser
org.meshcms.core.SiteMap
Contains the site map.
Nested Class Summary | |
static class |
SiteMap.CodeLocalePair
|
Field Summary | |
static java.util.regex.Pattern |
KEYWORDS_REGEX
|
static java.lang.String |
MESHCMS_CSS
Name of the CSS that contains styles for elements of the MeshCMS interface (mail forms, editor and so on). |
static java.lang.String |
MODULE_INCLUDE_FILE
|
static java.lang.String |
THEME_CSS
Name of the stylesheet of a theme. |
static java.lang.String |
THEME_DECORATOR
Name of the main file of a theme. |
Fields inherited from class org.meshcms.util.DirectoryParser |
initialDir, processStartDir, recursive |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
SiteMap(WebSite webSite)
Creates a new instance of SiteMap |
Method Summary | |
void |
cache(Path path,
byte[] b)
Caches a page. |
PageInfo[] |
getBreadcrumbs(Path path)
Returns the breadcrumbs from the root path (included) to the given path (not included). |
byte[] |
getCached(Path path)
Gets a page from the cache. |
Path |
getCurrentWelcome(Path dirPath)
Returns the path of the welcome file for the given directory path. |
java.util.List |
getLangList()
|
long |
getLastModified()
Returns the last modification time. |
java.lang.String[] |
getModuleNames()
Returns an array of the names of all available modules. |
java.util.SortedMap |
getModulesMap()
|
PageInfo |
getPageInfo(Path path)
Returns the PageInfo for the given path. |
java.util.List |
getPagesInDirectory(Path path,
boolean includeDir)
Returns a list of pages contained in the directory that contains the given path; if the path denotes a directory, its contents are returned. |
java.util.List |
getPagesList()
Returns the pages contained in the menu as a unmodifiable List. |
java.util.List |
getPagesList(Path root)
Returns the pages contained in the menu as a unmodifiable List, using the given path as root path. |
java.util.SortedMap |
getPagesMap(Path root)
Returns the pages contained in the menu as a SortedMap, using the given path as root. |
PageInfo |
getParentPageInfo(Path path)
Returns the PageInfo for parent of the page at the given path. |
Path |
getPathInMenu(Path path)
Returns the given path unless it is the current welcome file in its folder; in this case the folder path is returned. |
Path |
getRedirMatch(Path requestedPath)
|
Path |
getServedPath(Path path)
Returns the given path unless it is a folder with a welcome file; in this case the welcome file path is returned. |
java.lang.String[] |
getThemeNames()
Returns an array of the names of all available themes. |
java.util.SortedMap |
getThemesMap()
|
java.lang.String |
getTigraItems(java.lang.String contextPath,
Path path,
boolean tree)
Returns the code needed to create a menu or a tree with the scripts created by SoftComplex. |
java.lang.String |
getTigraItems(java.lang.String contextPath,
Path path,
boolean tree,
boolean allowHiding)
Returns the code needed to create a menu or a tree with the scripts created by SoftComplex. |
boolean |
hasChildrenPages(Path path)
Returns true if there is at least one page whose parent path is the given one. |
boolean |
isCached(Path path)
Check if a page is available in the cache. |
boolean |
isCurrentWelcome(Path path)
Checks if the given path is the welcome file for its directory. |
boolean |
isObsolete()
|
protected void |
postProcess()
This method is called at the end of the processing. |
protected boolean |
preProcess()
This method is called during the process, but before any element has been processed. |
protected boolean |
preProcessDirectory(java.io.File file,
Path path)
|
protected void |
processFile(java.io.File file,
Path path)
This method will be called for any file found while parsing the base directory. |
void |
removeFromCache(Path path)
Removes a page from the cache. |
void |
setObsolete(boolean obsolete)
When obsolete, info contained in this site map will be discarded when a new site map is created. |
Methods inherited from class org.meshcms.util.DirectoryParser |
getInitialDir, isProcessStartDir, isRecursive, isSorted, postProcessDirectory, process, run, setInitialDir, setInitialDir, setProcessStartDir, setRecursive, setSorted |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String THEME_DECORATOR
public static final java.lang.String THEME_CSS
public static final java.lang.String MESHCMS_CSS
public static final java.lang.String MODULE_INCLUDE_FILE
public static final java.util.regex.Pattern KEYWORDS_REGEX
Constructor Detail |
public SiteMap(WebSite webSite)
Method Detail |
protected boolean preProcess()
DirectoryParser
The base implementation does nothing and returns true.
preProcess
in class DirectoryParser
protected boolean preProcessDirectory(java.io.File file, Path path)
preProcessDirectory
in class DirectoryParser
protected void processFile(java.io.File file, Path path)
DirectoryParser
processFile
in class DirectoryParser
file
- the file to be processedpath
- the path of the file (relative to the base directory)protected void postProcess()
DirectoryParser
DirectoryParser.preProcess()
returned false.
The base implementation does nothing.
postProcess
in class DirectoryParser
public PageInfo getPageInfo(Path path)
PageInfo
for the given path.
public PageInfo getParentPageInfo(Path path)
PageInfo
for parent of the page at the given path.
public Path getPathInMenu(Path path)
public Path getServedPath(Path path)
public Path getCurrentWelcome(Path dirPath)
public boolean isCurrentWelcome(Path path)
public long getLastModified()
public java.lang.String getTigraItems(java.lang.String contextPath, Path path, boolean tree)
contextPath
- the context path as returned from
HttpServletRequest.getContextPath()
path
- the root path for the menu (if null, the root path is used)tree
- true to get the items for a tree, false to get
the items for a menu
public java.lang.String getTigraItems(java.lang.String contextPath, Path path, boolean tree, boolean allowHiding)
contextPath
- the context path as returned from
HttpServletRequest.getContextPath()
path
- the root path for the menu (if null, the root path is used)tree
- true to get the items for a tree, false to get
the items for a menuallowHiding
- honours the "hide submenu" option
public java.util.SortedMap getPagesMap(Path root)
Path
and all values are of
type PageInfo
. Note that the ordering of the map is the
natural order of Path
.
Path
public java.util.List getLangList()
public boolean hasChildrenPages(Path path)
public java.util.List getPagesInDirectory(Path path, boolean includeDir)
includeDir
- if true, the directory itself is included in the listpublic java.util.List getPagesList()
PageInfo
.
Pages are sorted using a PageInfoComparator
.
public java.util.List getPagesList(Path root)
PageInfo
.
Pages are sorted using a PageInfoComparator
.
public PageInfo[] getBreadcrumbs(Path path)
public java.lang.String[] getThemeNames()
public java.lang.String[] getModuleNames()
public void cache(Path path, byte[] b)
public void removeFromCache(Path path)
public byte[] getCached(Path path)
public boolean isCached(Path path)
public java.util.SortedMap getThemesMap()
public java.util.SortedMap getModulesMap()
public boolean isObsolete()
setObsolete(boolean)
public void setObsolete(boolean obsolete)
public Path getRedirMatch(Path requestedPath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |