|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.opencms.template.A_CmsTemplate
|
+--com.opencms.template.CmsXmlTemplate
|
+--com.opencms.defaults.A_CmsNavBase
|
+--com.opencms.defaults.CmsXmlNav
This class builds the default Navigation.
| Field Summary |
| Fields inherited from class com.opencms.defaults.A_CmsNavBase |
C_NAVINDEX, C_PROPERTY_NAVINDEX |
| Fields inherited from class com.opencms.template.CmsXmlTemplate |
C_BODY_ELEMENT, C_DEBUG, C_FRAME_SELECTOR, m_cache |
| Fields inherited from interface com.opencms.boot.I_CmsLogChannels |
C_FLEX_CACHE, C_FLEX_LOADER, C_LOGGING, C_MODULE_CRITICAL, C_MODULE_DEBUG, C_MODULE_INFO, C_OPENCMS_CACHE, C_OPENCMS_CRITICAL, C_OPENCMS_CRONSCHEDULER, C_OPENCMS_DEBUG, C_OPENCMS_ELEMENTCACHE, C_OPENCMS_INFO, C_OPENCMS_INIT, C_OPENCMS_POOL, C_OPENCMS_STATICEXPORT, C_OPENCMS_STREAMING, C_PREPROCESSOR_IS_LOGGING |
| Constructor Summary | |
CmsXmlNav()
|
|
| Method Summary | |
protected StringBuffer |
buildMap(CmsObject cms,
A_CmsXmlContent doc,
Object userObject,
String currentFolder,
String datablock,
int currentResursionLevel,
int maxRecursionLevel)
This method invokes recursively itself to build a catalogue or map of the OpenCms VFS structure. |
protected String |
buildNav(CmsObject cms,
A_CmsXmlContent doc,
Object userObject,
Vector resources)
Builds the navigation. |
protected String |
buildNavFold(CmsObject cms,
CmsXmlTemplateFile template,
Object userObject,
Vector resources,
String requestedUri,
String currentFolder,
String servletPath,
int level,
int[] count)
Builds the navigation that could be closed or opened. |
protected StringBuffer |
buildNavPop(CmsObject cms,
A_CmsXmlContent doc,
Object userObject,
Vector resources,
StringBuffer result2,
int iDirLevel,
int lPos,
int lPos2,
int iMaxDeep)
Builds the navigation customized with additional data block menueLevel, Level1Pos and Level2Pos to build dynamic DHTML pop-up menus by using getNavPop. |
protected String |
buildNavTree(CmsObject cms,
CmsXmlTemplateFile template,
Object userObject,
Vector resources,
String requestedUri,
String currentFolder,
String servletPath,
int level,
int depth,
boolean depthIsNull,
int[] count)
Builds the tree of navigation. |
protected String |
extractFolder(CmsObject cms,
int level,
String exact)
Builds the link to folder determined by level. |
protected int |
extractLevel(CmsObject cms,
String folder)
extract the level of navigation. |
protected int |
extractNav(CmsObject cms,
Vector resources,
String[] navLink,
String[] navText,
float[] navPos)
Extracts the navbar. |
CmsCacheDirectives |
getCacheDirectives(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
gets the caching information from the current template class. |
Object |
getFolderCurrent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets the current folder. |
Object |
getFolderParent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets the parent folder. |
Object |
getFolderRoot(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets the root folder. |
Object |
getLanguagePath(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
Can be used to build valid hrefs to switch the language. |
Object |
getNavCurrent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets the navigation of current folder. |
Object |
getNavFold(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets the navigation of files and folders, by folders it is showed closed, if the folder is clicked then it is opened. |
Object |
getNavMap(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
Builds a catalogue or navigation sitemap. |
Object |
getNavParent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets the navigation of specified level of parent folder. |
Object |
getNavPath(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
Builds the path from the root folder down to the current folder. |
Object |
getNavPop(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
This method retrieves max. three navigation levels per menu entry to build dynamic DHTML pop-up menus. |
Object |
getNavRoot(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets the navigation of root folder or parent folder starting from root folder. |
Object |
getNavTree(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets the navigation of folders recursive. |
Object |
getPropertyCurrent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets a specified property of current folder. |
Object |
getPropertyParent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets a specified property of specified folder starting from current folder. |
Object |
getPropertyRoot(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets a specified property of specified folder starting from root. |
Object |
getPropertyUri(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
gets a specified property of uri. |
boolean |
isCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
Indicates if the results of this class are cacheable. |
| Methods inherited from class com.opencms.defaults.A_CmsNavBase |
sortNav |
| Methods inherited from class com.opencms.template.A_CmsTemplate |
debugPrint, isExportable, isProxyPrivateCacheable, isProxyPublicCacheable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.opencms.template.I_CmsTemplate |
isExportable, isProxyPrivateCacheable, isProxyPublicCacheable |
| Constructor Detail |
public CmsXmlNav()
| Method Detail |
public boolean isCacheable(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
isCacheable in interface I_CmsTemplateisCacheable in class A_CmsNavBasecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileelementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
protected String buildNav(CmsObject cms,
A_CmsXmlContent doc,
Object userObject,
Vector resources)
throws CmsException
cms - CmsObject Object for accessing system resources.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.resources - a vector that contains the elements of navigation.
CmsException
protected String buildNavFold(CmsObject cms,
CmsXmlTemplateFile template,
Object userObject,
Vector resources,
String requestedUri,
String currentFolder,
String servletPath,
int level,
int[] count)
throws CmsException
cms - CmsObject Object for accessing system resources.resources - a vector that contains the elements of navigation.requestedUri - The absolute path of current requested file.currentFolder - The currenet folder.servletPath - The absolute path of servlet
CmsException
protected String buildNavTree(CmsObject cms,
CmsXmlTemplateFile template,
Object userObject,
Vector resources,
String requestedUri,
String currentFolder,
String servletPath,
int level,
int depth,
boolean depthIsNull,
int[] count)
throws CmsException
cms - CmsObject Object for accessing system resources.resources - a vector that contains the elements of navigation.requestedUri - The absolute path of current requested file.currentFolder - The currenet folder.servletPath - The absolute path of servletlevel - The starting level.depth - An Integer that shows how many folders must be displayed.depthIsNull - a boolean that determines whether the depth is given in tagcontent
CmsException
protected String extractFolder(CmsObject cms,
int level,
String exact)
throws CmsException
cms - CmsObject Object for accessing system resources.level - The level of folder.exact - this parameter determines wheater exact level of folder must be exctracted.
CmsException
protected int extractLevel(CmsObject cms,
String folder)
throws CmsException
cms - CmsObject Object for accessing system resources.
CmsException
protected int extractNav(CmsObject cms,
Vector resources,
String[] navLink,
String[] navText,
float[] navPos)
throws CmsException
cms - CmsObject Object for accessing system resources.resources - a vector that contains the elements of navigation.navLink - an array of navigation's link.navText - an array of navigation's Text.navPos - an array of position of navbar.
CmsException
public Object getFolderCurrent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getFolderCurrent in class A_CmsNavBasecms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getFolderParent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getFolderParent in class A_CmsNavBasecms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getFolderRoot(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getFolderRoot in class A_CmsNavBasecms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getNavCurrent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getNavCurrent in class A_CmsNavBasecms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getNavFold(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getNavFold in class A_CmsNavBasecms - CmsObject Object for accessing system resources.tagcontent - used in this special case of a user method. Can't be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getNavParent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getNavParent in class A_CmsNavBasecms - CmsObject Object for accessing system resources.tagcontent - used in this special case of a user method. Can't be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getNavRoot(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getNavRoot in class A_CmsNavBasecms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getNavPath(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
Build the path from the root folder down to the current folder:
<METHOD name="getNavPath">absolute,this,0</METHOD>
Build the path from the root folder down to the parent of the current folder:
<METHOD name="getNavPath">absolute,parent,0</METHOD>
Build the path for the last three navigation levels down to the parent of the current folder:
<METHOD name="getNavPath">relative,parent,3</METHOD>
Build the path for the last three navigation levels down to the current folder:
<METHOD name="getNavPath">relative,this,3</METHOD>
cms - CmsObject to access the VFStagcontent - includes the values for the start and end navigation level, comma separateddoc - the XML template
CmsException
public Object getNavMap(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
<method name="getNavMap">1,3</method>to build a sitemap including everything between navigation levels 1 and 3.
cms - CmsObject to access the VFStagcontent - includes the values for the start and end navigation level, comma separateddoc - the XML template
CmsException
protected StringBuffer buildMap(CmsObject cms,
A_CmsXmlContent doc,
Object userObject,
String currentFolder,
String datablock,
int currentResursionLevel,
int maxRecursionLevel)
throws CmsException
cms - CmsObject object for accessing the VFSdoc - the XML template holding the datablock to processdatablock - the name of the datablock in the XML template to generate the HTML for the current depthcurrentResursionLevel - the name says it all: the current recursion level (= curr. navigation level)maxRecursionLevel - dito, the max. recursion level (= navigation level depth)
CmsException
public Object getNavTree(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getNavTree in class A_CmsNavBasecms - CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getPropertyCurrent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getPropertyCurrent in class A_CmsNavBasecms - A_CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getPropertyParent(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getPropertyParent in class A_CmsNavBasecms - A_CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getPropertyRoot(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getPropertyRoot in class A_CmsNavBasecms - A_CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public Object getPropertyUri(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
getPropertyUri in class A_CmsNavBasecms - A_CmsObject Object for accessing system resources.tagcontent - Unused in this special case of a user method. Can be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
public CmsCacheDirectives getCacheDirectives(CmsObject cms,
String templateFile,
String elementName,
Hashtable parameters,
String templateSelector)
getCacheDirectives in class CmsXmlTemplatecms - CmsObject Object for accessing system resourcestemplateFile - Filename of the template fileelementName - Element name of this template in our parent template.parameters - Hashtable with all template class parameters.templateSelector - template section that should be processed.
public Object getNavPop(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
cms - CmsObject Object for accessing system resources.tagcontent - used in this special case of a user method. Can't be ignored.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.userObject - Hashtable with parameters.
CmsException
protected StringBuffer buildNavPop(CmsObject cms,
A_CmsXmlContent doc,
Object userObject,
Vector resources,
StringBuffer result2,
int iDirLevel,
int lPos,
int lPos2,
int iMaxDeep)
throws CmsException
cms - CmsObject Object for accessing system resources.doc - Reference to the A_CmsXmlContent object of the initiating XLM document.resources - a vector that contains the elements of navigation.
CmsException
public Object getLanguagePath(CmsObject cms,
String tagcontent,
A_CmsXmlContent doc,
Object userObject)
throws CmsException
cms - CmsObject Object for accessing system resources.tagcontent - the parameters for this tagdoc - Reference to the A_CmsXmlContent object of the initiating XLM document.
CmsException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||