com.opencms.defaults
Class CmsXmlNav

java.lang.Object
  |
  +--com.opencms.template.A_CmsTemplate
        |
        +--com.opencms.template.CmsXmlTemplate
              |
              +--com.opencms.defaults.A_CmsNavBase
                    |
                    +--com.opencms.defaults.CmsXmlNav
All Implemented Interfaces:
I_CmsConstants, I_CmsLogChannels, I_CmsTemplate, I_CmsXmlTemplate

public class CmsXmlNav
extends A_CmsNavBase

This class builds the default Navigation.

Version:
$Revision: 1.46.2.1 $ $Date: 2003/05/14 08:50:25 $
Author:
Alexander Kandzior, Waruschan Babachan, Thomas Weckert

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.core.I_CmsConstants
C_ACCESS_DEFAULT_FLAGS, C_ACCESS_GROUP, C_ACCESS_GROUP_READ, C_ACCESS_GROUP_VISIBLE, C_ACCESS_GROUP_WRITE, C_ACCESS_INTERNAL_READ, C_ACCESS_OWNER, C_ACCESS_OWNER_READ, C_ACCESS_OWNER_VISIBLE, C_ACCESS_OWNER_WRITE, C_ACCESS_PUBLIC, C_ACCESS_PUBLIC_READ, C_ACCESS_PUBLIC_VISIBLE, C_ACCESS_PUBLIC_WRITE, C_ACCESS_READ, C_ACCESS_VISIBLE, C_ACCESS_WRITE, C_ADDITIONAL_INFO_EXPLORERSETTINGS, C_ADDITIONAL_INFO_PREFERENCES, C_ADDITIONAL_INFO_STARTSETTINGS, C_ADDITIONAL_INFO_TASKSETTINGS, C_ADDITIONAL_INFO_TOWN, C_ADDITIONAL_INFO_ZIPCODE, C_AT_LEAST_ONCE, C_CLUSTERURL, C_CONFIGURATION_CACHE, C_CONFIGURATION_CLASS, C_CONFIGURATION_REGISTRY, C_CONFIGURATION_RESOURCEBROKER, C_COPYRIGHT, C_DEFAULT_SITE, C_DELETE_HISTORY, C_ENABLE_HISTORY, C_ERRPREFIX, C_ERRSPERATOR, C_EXPORT_TAG_ACCESS, C_EXPORT_TAG_ADDRESS, C_EXPORT_TAG_CREATOR, C_EXPORT_TAG_DATE, C_EXPORT_TAG_DEFAULTGROUP, C_EXPORT_TAG_DESCRIPTION, C_EXPORT_TAG_DESTINATION, C_EXPORT_TAG_EMAIL, C_EXPORT_TAG_EXPORT, C_EXPORT_TAG_FILE, C_EXPORT_TAG_FIRSTNAME, C_EXPORT_TAG_FLAGS, C_EXPORT_TAG_GROUP, C_EXPORT_TAG_GROUPDATA, C_EXPORT_TAG_GROUPNAME, C_EXPORT_TAG_INFO, C_EXPORT_TAG_LASTMODIFIED, C_EXPORT_TAG_LASTNAME, C_EXPORT_TAG_LAUNCHER_START_CLASS, C_EXPORT_TAG_MODULEXPORT, C_EXPORT_TAG_NAME, C_EXPORT_TAG_OC_VERSION, C_EXPORT_TAG_PARENTGROUP, C_EXPORT_TAG_PASSWORD, C_EXPORT_TAG_PROJECT, C_EXPORT_TAG_PROPERTIES, C_EXPORT_TAG_PROPERTY, C_EXPORT_TAG_RECOVERYPASSWORD, C_EXPORT_TAG_SECTION, C_EXPORT_TAG_SOURCE, C_EXPORT_TAG_TYPE, C_EXPORT_TAG_USER, C_EXPORT_TAG_USERDATA, C_EXPORT_TAG_USERGROUPDATA, C_EXPORT_TAG_USERGROUPS, C_EXPORT_TAG_USERINFO, C_EXPORT_TAG_VALUE, C_EXPORT_TAG_VERSION, C_EXPORT_VERSION, C_EXPORT_XMLFILENAME, C_EXPORTONLYFILES, C_EXPORTONLYUSERS, C_EXPORTPOINT, C_EXPORTPOINT_PATH, C_EXPORTUSERSFILES, C_FCONTENT, C_FELEMENT, C_FILE, C_FILECONTENT, C_FILES_IMPORTED, C_FLAG_DISABLED, C_FLAG_ENABLED, C_FLAG_GROUP_PROJECTCOWORKER, C_FLAG_GROUP_PROJECTMANAGER, C_FLAG_GROUP_ROLE, C_FOLDER, C_FOLDER_SEPARATOR, C_GROUP, C_GROUP_ADMIN, C_GROUP_GUEST, C_GROUP_PROJECTLEADER, C_GROUP_USERS, C_LINKCHECKTABLE_DATE, C_MAX_LENGTH_RESOURCE_NAME, C_MODULE_PROPERTY_ADDITIONAL_RESOURCES, C_MODULE_PROPERTY_ADDITIONAL_RESOURCES_SEPARATOR, C_MODUS_AUTO, C_MODUS_EXPORT, C_MODUS_EXTERN, C_MODUS_OFFLINE, C_MODUS_ONLINE, C_MOUNTPOINT_FILESYSTEM, C_MOUNTPOINT_MYSQL, C_NEVER, C_NO_FILES_IMPORTED, C_ORDER_AGENTUSER, C_ORDER_ENDTIME, C_ORDER_ID, C_ORDER_INITIATORUSER, C_ORDER_NAME, C_ORDER_ORIGINALUSER, C_ORDER_PERCENTAGE, C_ORDER_PRIORITY, C_ORDER_ROLE, C_ORDER_STARTTIME, C_ORDER_STATE, C_ORDER_TASKTYPE, C_ORDER_TIMEOUT, C_ORDER_WAKEUPTIME, C_PASSWORD_MINIMUMSIZE, C_PROJECT_ONLINE, C_PROJECT_ONLINE_ID, C_PROJECT_STATE_ARCHIVE, C_PROJECT_STATE_INVISIBLE, C_PROJECT_STATE_LOCKED, C_PROJECT_STATE_UNLOCKED, C_PROJECT_TYPE_INVISIBLE, C_PROJECT_TYPE_NORMAL, C_PROJECT_TYPE_TEMPORARY, C_PROPERTY_ACTIV, C_PROPERTY_CHANNELID, C_PROPERTY_CONTENT_ENCODING, C_PROPERTY_DEFAULT_FILE, C_PROPERTY_DESCRIPTION, C_PROPERTY_EXPORT, C_PROPERTY_EXPORTNAME, C_PROPERTY_KEYWORDS, C_PROPERTY_NAVPOS, C_PROPERTY_NAVTEXT, C_PROPERTY_RELATIVEROOT, C_PROPERTY_TEMPLATETYPE, C_PROPERTY_TITLE, C_PROPERTY_VISIBLE, C_PUBLISH_METHOD_LINK, C_REGISTRY_DESTINATION, C_REGISTRY_HISTORY, C_REGISTRY_KNOWNLAUNCHERS, C_REGISTRY_LAUNCHER, C_REGISTRY_SOURCE, C_REQUEST_CONSOLE, C_REQUEST_HTTP, C_RESPONSE_CONSOLE, C_RESPONSE_HTTP, C_ROOT, C_ROOT_TEMPLATE_NAME, C_ROOTNAME_COS, C_ROOTNAME_VFS, C_SESSION_ADMIN_POS, C_SESSION_BROADCASTMESSAGE, C_SESSION_CONTENT_ENCODING, C_SESSION_CURRENTGROUP, C_SESSION_DATA, C_SESSION_IS_DIRTY, C_SESSION_MESSAGEPENDING, C_SESSION_MODULE_VECTOR, C_SESSION_PROJECT, C_SESSION_THREAD_ERROR, C_SESSION_USERNAME, C_SORT_ASC, C_SORT_DESC, C_START_ACCESSFLAGS, C_START_DEFAULTGROUP, C_START_LANGUAGE, C_START_LOCKDIALOG, C_START_PROJECT, C_START_VIEW, C_STATE_CHANGED, C_STATE_DELETED, C_STATE_NEW, C_STATE_UNCHANGED, C_STATICEXPORT_PATH, C_STATICEXPORT_START, C_SYNCHRONISATION_PATH, C_SYNCHRONISATION_PROJECT, C_SYNCHRONISATION_RESOURCE, C_SYNCHRONISATION_RESOURCETAG, C_SYSTEMPROPERTY_CRONTABLE, C_SYSTEMPROPERTY_EXPORTPATH, C_SYSTEMPROPERTY_EXTENSIONS, C_SYSTEMPROPERTY_LINKCHECKTABLE, C_SYSTEMPROPERTY_MIMETYPES, C_SYSTEMPROPERTY_MOUNTPOINT, C_SYSTEMPROPERTY_RESOURCE_TYPE, C_TABLE_CHANNELID, C_TASK_FILTER, C_TASK_MESSAGES, C_TASK_MESSAGES_ACCEPTED, C_TASK_MESSAGES_COMPLETED, C_TASK_MESSAGES_FORWARDED, C_TASK_MESSAGES_MEMBERS, C_TASK_ORDER_BY_DATE, C_TASK_ORDER_BY_NAME, C_TASK_PRIORITY_HIGH, C_TASK_PRIORITY_LOW, C_TASK_PRIORITY_NORMAL, C_TASK_STATE_ENDED, C_TASK_STATE_HALTED, C_TASK_STATE_NOTENDED, C_TASK_STATE_PREPARE, C_TASK_STATE_START, C_TASK_STATE_STARTED, C_TASK_VIEW_ALL, C_TASKLOG_SYSTEM, C_TASKLOG_USER, C_TASKORDER_NONE, C_TASKORDER_STARTDATE, C_TASKORDER_TIMEOUT, C_TASKS_ACTIVE, C_TASKS_ALL, C_TASKS_DONE, C_TASKS_NEW, C_TASKS_OPEN, C_TASKSORDER_TASKNAME, C_TEMP_PREFIX, C_TFACCESS, C_TFGROUP, C_TFILEOBJ, C_TFILES, C_TFNAME, C_TFPROPERTYINFO, C_TFPROPERTYNAME, C_TFPROPERTYTYPE, C_TFPROPERTYVALUE, C_TFTYPE, C_TFTYPENAME, C_TFUSER, C_TGDESC, C_TGFLAG, C_TGNAME, C_TGPARENTGROUP, C_TGROUPOBJ, C_TGROUPS, C_TGROUPUSERS, C_TGUSER, C_TUADDINFO, C_TUDESC, C_TUDGROUP, C_TUDISABLED, C_TUEMAIL, C_TUFIRSTNAME, C_TUFLAG, C_TUGROUP, C_TUINFOKEY, C_TUINFOVALUE, C_TULOGIN, C_TUNAME, C_TUPASSWD, C_TUSERGROUPS, C_TUSEROBJ, C_TUSERS, C_TYPE_BODY_NAME, C_TYPE_COMPATIBLEPLAIN_NAME, C_TYPE_FOLDER, C_TYPE_FOLDER_NAME, C_TYPE_IMAGE_NAME, C_TYPE_LAST_INDEX, C_TYPE_PAGE_NAME, C_TYPE_PLAIN_NAME, C_UNKNOWN_ID, C_UNKNOWN_INT, C_UNKNOWN_LAUNCHER, C_UNKNOWN_LAUNCHER_ID, C_UNKNOWN_LONG, C_URL_PREFIX_EXPORT, C_URL_PREFIX_HTTP, C_URL_PREFIX_HTTPS, C_URL_PREFIX_SERVERNAME, C_USER, C_USER_ADMIN, C_USER_GUEST, C_USER_TYPE_SYSTEMANDWEBUSER, C_USER_TYPE_SYSTEMUSER, C_USER_TYPE_WEBUSER, C_WEB_APP_REPLACE_KEY, C_WEEKS_HISTORY, C_WHATEVER, C_XML_BODY_ELEMENT
 
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.CmsXmlTemplate
collectCacheDirectives, counter, createElement, getClassName, getContent, getContent, getDescription, getEncoding, getFileUri, getFrameQueryString, getFrameTarget, getKey, getKeywords, getMethodCacheDirectives, getOwnTemplateFile, getPathUri, getProperty, getQueryString, getRequestIp, getServletPath, getSessionId, getStylesheet, getTemplateClassName, getTemplateFileName, getTemplateSelector, getTitle, getTitleEscaped, getUri, getUriWithParameter, isStreamable, isTemplateCacheSet, mergeAbsolutePath, mergeAbsoluteUrl, parameters, registerVariantDeps, setEncoding, setTemplateCache, shouldReload, startProcessing, templateElement, throwException, throwException, throwException
 
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

CmsXmlNav

public CmsXmlNav()
Method Detail

isCacheable

public boolean isCacheable(CmsObject cms,
                           String templateFile,
                           String elementName,
                           Hashtable parameters,
                           String templateSelector)
Indicates if the results of this class are cacheable.

Specified by:
isCacheable in interface I_CmsTemplate
Overrides:
isCacheable in class A_CmsNavBase
Parameters:
cms - CmsObject Object for accessing system resources
templateFile - Filename of the template file
elementName - Element name of this template in our parent template.
parameters - Hashtable with all template class parameters.
templateSelector - template section that should be processed.
Returns:
true if cacheable, false otherwise.

buildNav

protected String buildNav(CmsObject cms,
                          A_CmsXmlContent doc,
                          Object userObject,
                          Vector resources)
                   throws CmsException
Builds the navigation.

Parameters:
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.
Returns:
String that contains the navigation.
CmsException

buildNavFold

protected String buildNavFold(CmsObject cms,
                              CmsXmlTemplateFile template,
                              Object userObject,
                              Vector resources,
                              String requestedUri,
                              String currentFolder,
                              String servletPath,
                              int level,
                              int[] count)
                       throws CmsException
Builds the navigation that could be closed or opened.

Parameters:
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
Returns:
String that contains the navigation.
CmsException

buildNavTree

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
Builds the tree of navigation.

Parameters:
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
level - 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
Returns:
String that contains the navigation.
CmsException

extractFolder

protected String extractFolder(CmsObject cms,
                               int level,
                               String exact)
                        throws CmsException
Builds the link to folder determined by level.

Parameters:
cms - CmsObject Object for accessing system resources.
level - The level of folder.
exact - this parameter determines wheater exact level of folder must be exctracted.
Returns:
String that contains the path of folder determind by level.
CmsException

extractLevel

protected int extractLevel(CmsObject cms,
                           String folder)
                    throws CmsException
extract the level of navigation.

Parameters:
cms - CmsObject Object for accessing system resources.
Returns:
int that contains the level.
CmsException

extractNav

protected int extractNav(CmsObject cms,
                         Vector resources,
                         String[] navLink,
                         String[] navText,
                         float[] navPos)
                  throws CmsException
Extracts the navbar.

Parameters:
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.
Returns:
The maximum number of navbars in navigation.
CmsException

getFolderCurrent

public Object getFolderCurrent(CmsObject cms,
                               String tagcontent,
                               A_CmsXmlContent doc,
                               Object userObject)
                        throws CmsException
gets the current folder.

Specified by:
getFolderCurrent in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getFolderParent

public Object getFolderParent(CmsObject cms,
                              String tagcontent,
                              A_CmsXmlContent doc,
                              Object userObject)
                       throws CmsException
gets the parent folder.

Specified by:
getFolderParent in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getFolderRoot

public Object getFolderRoot(CmsObject cms,
                            String tagcontent,
                            A_CmsXmlContent doc,
                            Object userObject)
                     throws CmsException
gets the root folder.

Specified by:
getFolderRoot in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getNavCurrent

public Object getNavCurrent(CmsObject cms,
                            String tagcontent,
                            A_CmsXmlContent doc,
                            Object userObject)
                     throws CmsException
gets the navigation of current folder.

Specified by:
getNavCurrent in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getNavFold

public Object getNavFold(CmsObject cms,
                         String tagcontent,
                         A_CmsXmlContent doc,
                         Object userObject)
                  throws CmsException
gets the navigation of files and folders, by folders it is showed closed, if the folder is clicked then it is opened.

Specified by:
getNavFold in class A_CmsNavBase
Parameters:
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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getNavParent

public Object getNavParent(CmsObject cms,
                           String tagcontent,
                           A_CmsXmlContent doc,
                           Object userObject)
                    throws CmsException
gets the navigation of specified level of parent folder.

Specified by:
getNavParent in class A_CmsNavBase
Parameters:
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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getNavRoot

public Object getNavRoot(CmsObject cms,
                         String tagcontent,
                         A_CmsXmlContent doc,
                         Object userObject)
                  throws CmsException
gets the navigation of root folder or parent folder starting from root folder.

Specified by:
getNavRoot in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getNavPath

public Object getNavPath(CmsObject cms,
                         String tagcontent,
                         A_CmsXmlContent doc,
                         Object userObject)
                  throws CmsException
Builds the path from the root folder down to the current folder. Usage:

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>

Parameters:
cms - CmsObject to access the VFS
tagcontent - includes the values for the start and end navigation level, comma separated
doc - the XML template
Returns:
byte[] the HTML of this element
Throws:
CmsException

getNavMap

public Object getNavMap(CmsObject cms,
                        String tagcontent,
                        A_CmsXmlContent doc,
                        Object userObject)
                 throws CmsException
Builds a catalogue or navigation sitemap. Usage:
<method name="getNavMap">1,3</method>
to build a sitemap including everything between navigation levels 1 and 3.

Parameters:
cms - CmsObject to access the VFS
tagcontent - includes the values for the start and end navigation level, comma separated
doc - the XML template
Returns:
byte[] the HTML of this element
Throws:
CmsException

buildMap

protected StringBuffer buildMap(CmsObject cms,
                                A_CmsXmlContent doc,
                                Object userObject,
                                String currentFolder,
                                String datablock,
                                int currentResursionLevel,
                                int maxRecursionLevel)
                         throws CmsException
This method invokes recursively itself to build a catalogue or map of the OpenCms VFS structure. For each navigation level, it tries to process the datablock naventry, naventrysub, naventrysubsub,...,naventry{n*times}sub for a depth of n levels.

Parameters:
cms - CmsObject object for accessing the VFS
doc - the XML template holding the datablock to process
datablock - the name of the datablock in the XML template to generate the HTML for the current depth
currentResursionLevel - the name says it all: the current recursion level (= curr. navigation level)
maxRecursionLevel - dito, the max. recursion level (= navigation level depth)
Returns:
currentFolder the current folder for which we build the (sub) map
CmsException

getNavTree

public Object getNavTree(CmsObject cms,
                         String tagcontent,
                         A_CmsXmlContent doc,
                         Object userObject)
                  throws CmsException
gets the navigation of folders recursive.

Specified by:
getNavTree in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getPropertyCurrent

public Object getPropertyCurrent(CmsObject cms,
                                 String tagcontent,
                                 A_CmsXmlContent doc,
                                 Object userObject)
                          throws CmsException
gets a specified property of current folder.

Specified by:
getPropertyCurrent in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getPropertyParent

public Object getPropertyParent(CmsObject cms,
                                String tagcontent,
                                A_CmsXmlContent doc,
                                Object userObject)
                         throws CmsException
gets a specified property of specified folder starting from current folder.

Specified by:
getPropertyParent in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getPropertyRoot

public Object getPropertyRoot(CmsObject cms,
                              String tagcontent,
                              A_CmsXmlContent doc,
                              Object userObject)
                       throws CmsException
gets a specified property of specified folder starting from root.

Specified by:
getPropertyRoot in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getPropertyUri

public Object getPropertyUri(CmsObject cms,
                             String tagcontent,
                             A_CmsXmlContent doc,
                             Object userObject)
                      throws CmsException
gets a specified property of uri.

Specified by:
getPropertyUri in class A_CmsNavBase
Parameters:
cms - 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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

getCacheDirectives

public CmsCacheDirectives getCacheDirectives(CmsObject cms,
                                             String templateFile,
                                             String elementName,
                                             Hashtable parameters,
                                             String templateSelector)
gets the caching information from the current template class.

Overrides:
getCacheDirectives in class CmsXmlTemplate
Parameters:
cms - CmsObject Object for accessing system resources
templateFile - Filename of the template file
elementName - Element name of this template in our parent template.
parameters - Hashtable with all template class parameters.
templateSelector - template section that should be processed.
Returns:
true if this class may stream it's results, false otherwise.

getNavPop

public Object getNavPop(CmsObject cms,
                        String tagcontent,
                        A_CmsXmlContent doc,
                        Object userObject)
                 throws CmsException
This method retrieves max. three navigation levels per menu entry to build dynamic DHTML pop-up menus.

Parameters:
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.
Returns:
byte[] with the content of this subelement.
Throws:
CmsException

buildNavPop

protected StringBuffer buildNavPop(CmsObject cms,
                                   A_CmsXmlContent doc,
                                   Object userObject,
                                   Vector resources,
                                   StringBuffer result2,
                                   int iDirLevel,
                                   int lPos,
                                   int lPos2,
                                   int iMaxDeep)
                            throws CmsException
Builds the navigation customized with additional data block menueLevel, Level1Pos and Level2Pos to build dynamic DHTML pop-up menus by using getNavPop.

Parameters:
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.
Returns:
String that contains the navigation.
CmsException

getLanguagePath

public Object getLanguagePath(CmsObject cms,
                              String tagcontent,
                              A_CmsXmlContent doc,
                              Object userObject)
                       throws CmsException
Can be used to build valid hrefs to switch the language. The parameter list is contained in the body as a comma separated list:

Parameters:
cms - CmsObject Object for accessing system resources.
tagcontent - the parameters for this tag
doc - Reference to the A_CmsXmlContent object of the initiating XLM document.
Returns:
String or byte[] with the content of this subelement.
Throws:
CmsException