com.opencms.workplace
Class CmsXmlWpTemplateFile

java.lang.Object
  |
  +--com.opencms.template.A_CmsXmlContent
        |
        +--com.opencms.template.CmsXmlTemplateFile
              |
              +--com.opencms.workplace.CmsXmlWpTemplateFile
All Implemented Interfaces:
Cloneable, I_CmsContent, I_CmsLogChannels, I_CmsWpConstants, I_CmsXmlContent

public class CmsXmlWpTemplateFile
extends CmsXmlTemplateFile
implements I_CmsLogChannels, I_CmsWpConstants

Content definition for Workplace template files.

Version:
$Revision: 1.63 $ $Date: 2003/01/30 19:19:41 $
Author:
Alexander Lucas, Michael Emmerich

Field Summary
 
Fields inherited from class com.opencms.template.CmsXmlTemplateFile
C_EDIT_TEMPLATE, C_TEMPLATE
 
Fields inherited from class com.opencms.template.A_CmsXmlContent
C_ERR_NODATABLOCK, C_MINIMUM_CLASSNAME, C_PARAMTYPES_HANDLING_METHODS, C_PARAMTYPES_USER_METHODS, C_REGISTER_FIRST_RUN, C_REGISTER_MAIN_RUN, C_TEMPLATE_EXTENSION, C_TEMPLATEPATH, m_cms, m_firstRunTags, m_knownTags, m_mainProcessTags
 
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
 
Fields inherited from interface com.opencms.workplace.I_CmsWpConstants
C_ADMIN_BACK_BUTTON, C_BOXTEMPLATE, C_BUTTON_ACTION, C_BUTTON_ALT, C_BUTTON_HREF, C_BUTTON_METHOD, C_BUTTON_NAME, C_BUTTON_STYLE, C_BUTTON_VALUE, C_BUTTON_WIDTH, C_BUTTONTEMPLATE, C_CONTEXTMENUE_TEMPLATEFILE, C_DEFAULT_LANGUAGE, C_DOWNBROWSER_MAXENTRIES, C_EDIT_ACTION_EXIT, C_EDIT_ACTION_SAVE, C_EDIT_ACTION_SAVEEXIT, C_ERROR_LINK, C_ERROR_MESSAGE, C_ERROR_MSG_BUTTON, C_ERROR_MSG_DETAILS, C_ERROR_MSG_REASON, C_ERROR_REASON, C_ERROR_SUGGESTION, C_ERROR_TITLE, C_ERRORTEMPLATE, C_FILELIST_ACCESS, C_FILELIST_ACCESS_VALUE, C_FILELIST_CHANGED, C_FILELIST_CHANGED_VALUE, C_FILELIST_CLASS_VALUE, C_FILELIST_COLUMN_ACCESS, C_FILELIST_COLUMN_CHANGED, C_FILELIST_COLUMN_CUSTOMIZED, C_FILELIST_COLUMN_CUSTOMIZED_VALUE, C_FILELIST_COLUMN_GROUP, C_FILELIST_COLUMN_LOCKED, C_FILELIST_COLUMN_NAME, C_FILELIST_COLUMN_OWNER, C_FILELIST_COLUMN_SIZE, C_FILELIST_COLUMN_STATE, C_FILELIST_COLUMN_TITLE, C_FILELIST_COLUMN_TYPE, C_FILELIST_CUSTOMTEMPLATE, C_FILELIST_DISPLAYMETHOD, C_FILELIST_GROUP, C_FILELIST_GROUP_VALUE, C_FILELIST_ICON_VALUE, C_FILELIST_LINK_VALUE, C_FILELIST_LOCK_VALUE, C_FILELIST_LOCKED, C_FILELIST_LOCKED_VALUE, C_FILELIST_METHOD, C_FILELIST_NAME, C_FILELIST_NAME_VALUE, C_FILELIST_OWNER, C_FILELIST_OWNER_VALUE, C_FILELIST_SIZE, C_FILELIST_SIZE_VALUE, C_FILELIST_STATE, C_FILELIST_STATE_VALUE, C_FILELIST_SUFFIX_VALUE, C_FILELIST_TEMPLATE, C_FILELIST_TITLE, C_FILELIST_TITLE_VALUE, C_FILELIST_TYPE, C_FILELIST_TYPE_VALUE, C_FILETYPELIST_TEMPLATEFILE, C_GROUPS_NAME, C_ICON_ACTION, C_ICON_ACTIVE_METHOD, C_ICON_DEFAULT, C_ICON_EXTENSION, C_ICON_HREF, C_ICON_LABEL, C_ICON_NAME, C_ICON_PREFIX, C_ICON_TARGET, C_ICON_TEMPLATEFILE, C_ICON_VISIBLE_METHOD, C_INPUT_ACTION, C_INPUT_CLASS, C_INPUT_LENGTH, C_INPUT_METHOD, C_INPUT_NAME, C_INPUT_SIZE, C_INPUT_VALUE, C_INPUTTEMPLATE, C_LABEL_VALUE, C_LABELTEMPLATE, C_LANG_BUTTON, C_LANG_ICON, C_LANG_LABEL, C_LANG_TITLE, C_MACRO_OPENCMS_CONTEXT, C_MESSAGE_BUTTON1, C_MESSAGE_BUTTON2, C_MESSAGE_FILENAME, C_MESSAGE_LINK1, C_MESSAGE_LINK2, C_MESSAGE_MESSAGE1, C_MESSAGE_MESSAGE2, C_MESSAGE_TITLE, C_MODULE_PACKETNAME, C_MODULELIST_AUTHOR, C_MODULELIST_DATECREATED, C_MODULELIST_DATEUPLOADED, C_MODULELIST_IDX, C_MODULELIST_METHOD, C_MODULELIST_NAME, C_MODULELIST_NICE_NAME, C_MODULELIST_TEMPLATEFILE, C_MODULELIST_VERSION, C_PANEL_EXPLORER, C_PANEL_LINK, C_PANEL_NAME, C_PANEL_START, C_PANEL_TASK, C_PANEL_USER, C_PANELTEMPLATE, C_PARA_ACTION, C_PARA_CANCEL, C_PARA_CONTENT, C_PARA_DEFAULT, C_PARA_DELETE, C_PARA_DESCRIPTION, C_PARA_EXPLORERSETTINGS, C_PARA_FILE, C_PARA_FILECONTENT, C_PARA_FILELIST, C_PARA_FILTER, C_PARA_FLAGS, C_PARA_FOLDER, C_PARA_FOLDERTREE, C_PARA_FORMNAME, C_PARA_INITIAL, C_PARA_JSFILE, C_PARA_KEYWORDS, C_PARA_LAYOUT, C_PARA_LINK, C_PARA_LOCK, C_PARA_MAXPAGE, C_PARA_NAME, C_PARA_NAVPOS, C_PARA_NAVTEXT, C_PARA_NEWACCESS, C_PARA_NEWFILE, C_PARA_NEWFOLDER, C_PARA_NEWGROUP, C_PARA_NEWOWNER, C_PARA_NEWPWD, C_PARA_NEWPWDREPEAT, C_PARA_NEWTYPE, C_PARA_OK, C_PARA_OLDPANEL, C_PARA_OLDPWD, C_PARA_PAGE, C_PARA_PANEL, C_PARA_PREVIOUSLIST, C_PARA_PROJECT, C_PARA_PROPERTYDEF, C_PARA_STARTPROJECTID, C_PARA_STARTSETTINGS, C_PARA_STARTTASKID, C_PARA_SUBMIT, C_PARA_TASKSETTINGS, C_PARA_TEMPLATE, C_PARA_TITLE, C_PARA_UNLOCK, C_PARA_URL, C_PARA_USERSETTINGS, C_PARA_VARIABLE, C_PARA_VIEW, C_PARA_VIEWFILE, C_PICBROWSER_MAXIMAGES, C_PREFERENCES_UPDATE, C_PREFSSCROLLER_TEMPLATEFILE, C_PROJECTLIST_DATECREATED, C_PROJECTLIST_DESCRIPTION, C_PROJECTLIST_IDX, C_PROJECTLIST_LOCKSTATE, C_PROJECTLIST_MENU, C_PROJECTLIST_METHOD, C_PROJECTLIST_NAME, C_PROJECTLIST_NAME_ESCAPED, C_PROJECTLIST_OWNER, C_PROJECTLIST_PROJECTID, C_PROJECTLIST_PROJECTMANAGER, C_PROJECTLIST_PROJECTWORKER, C_PROJECTLIST_STATE, C_PROJECTLIST_STATE_LOCKED, C_PROJECTLIST_STATE_UNLOCKED, C_PROJECTLIST_TEMPLATEFILE, C_PROJECTNEW_DESCRIPTION, C_PROJECTNEW_DONE, C_PROJECTNEW_ERROR, C_PROJECTNEW_FOLDER, C_PROJECTNEW_GROUP, C_PROJECTNEW_MANAGERGROUP, C_PROJECTNEW_NAME, C_PROJECTNEW_TYPE, C_RADIO_IMAGEENTRY, C_RADIO_IMAGENAME, C_RADIO_IMAGEOPTION, C_RADIO_LINK, C_RADIO_METHOD, C_RADIO_NAME, C_RADIO_ORDER, C_RADIO_RADIONAME, C_RADIO_SELECTEDENTRY, C_RADIO_SELECTEDOPTION, C_RADIOTEMPLATE, C_SELECTBOX_CLASS, C_SELECTBOX_CLASSNAME, C_SELECTBOX_DIV, C_SELECTBOX_EDITORVIEWS, C_SELECTBOX_EDITORVIEWS_ALLOWED, C_SELECTBOX_EDITORVIEWS_CLASSES, C_SELECTBOX_EDITORVIEWS_DEFAULT, C_SELECTBOX_EDITORVIEWS_TEMPLATES, C_SELECTBOX_FONTS, C_SELECTBOX_METHOD, C_SELECTBOX_NAME, C_SELECTBOX_ONCHANGE, C_SELECTBOX_OPTIONNAME, C_SELECTBOX_OPTIONVALUE, C_SELECTBOX_SIZE, C_SELECTBOX_WIDTH, C_SESSION_MODULE_ADMIN_DATA, C_SESSION_MODULE_ADMIN_PROP_DESCR, C_SESSION_MODULE_ADMIN_PROP_NAMES, C_SESSION_MODULE_ADMIN_PROP_TYP, C_SESSION_MODULE_ADMIN_PROP_VAL, C_SESSION_MODULE_CHECKSUM, C_SESSION_MODULE_DELETE_STEP, C_SESSION_MODULE_EXCLUSION, C_SESSION_MODULE_INUSE, C_SESSION_MODULE_MISSFILES, C_SESSION_MODULE_PROJECTFILES, C_SESSION_MODULE_PROPFILES, C_SESSION_TASK_ALLPROJECTS, C_SESSION_TASK_FILTER, C_SYSTEM_PICS_EXPORT_PATH, C_TAG_ERRORBOX, C_TAG_ERRORPAGE, C_TAG_INPUTFIELD, C_TAG_LABEL, C_TAG_MESSAGEBOX, C_TAG_MODULELIST_DEFAULT, C_TAG_PANEL_BGACTIVE, C_TAG_PANEL_BGINACTIVE, C_TAG_PANEL_ENDSEQ, C_TAG_PANEL_SEPBGTEXT, C_TAG_PANEL_STARTSEQ, C_TAG_PANEL_TEXTACTIVE, C_TAG_PANEL_TEXTINACTIVE, C_TAG_PASSWORD, C_TAG_PROJECTLIST_DEFAULT, C_TAG_PROJECTLIST_SNAPLOCK, C_TAG_SELECTBOX_CLASS, C_TAG_SELECTBOX_END, C_TAG_SELECTBOX_OPTION, C_TAG_SELECTBOX_SELOPTION, C_TAG_SELECTBOX_START, C_TAG_SELECTBOX_START_DIV, C_TAG_STARTUP, C_TAG_SUBMITBUTTON, C_TASKDOCU_TEMPLATEFILE, C_TASKLIST_TEMPLATEFILE, C_TASKLOGTYPE_ACCEPTED, C_TASKLOGTYPE_CALL, C_TASKLOGTYPE_COMMENT, C_TASKLOGTYPE_CREATED, C_TASKLOGTYPE_DUECHANGED, C_TASKLOGTYPE_FORWARDED, C_TASKLOGTYPE_OK, C_TASKLOGTYPE_PRIORITYCHANGED, C_TASKLOGTYPE_REACTIVATED, C_TASKLOGTYPE_TAKE, C_TASKPARA_ACCEPTATION, C_TASKPARA_ALL, C_TASKPARA_COMPLETION, C_TASKPARA_DELIVERY, C_USERPREF_FILELIST, C_USERS_NAME, C_VFS_DIR_DEFAULTBODIES, C_VFS_DIR_INTERNAL, C_VFS_DIR_LOCALES, C_VFS_DIR_TEMPLATES, C_VFS_GALLERY_DOWNLOAD, C_VFS_GALLERY_EXTERNALLINKS, C_VFS_GALLERY_HTML, C_VFS_GALLERY_PICS, C_VFS_NEW_STRUCTURE, C_VFS_PATH_BODIES, C_VFS_PATH_DEFAULT_BODIES, C_VFS_PATH_DEFAULT_INTERNAL, C_VFS_PATH_DEFAULT_TEMPLATES, C_VFS_PATH_DEFAULTMODULE, C_VFS_PATH_GALLERIES, C_VFS_PATH_HELP, C_VFS_PATH_LOCALES, C_VFS_PATH_MODULEDEMOS, C_VFS_PATH_MODULES, C_VFS_PATH_SCRIPTS, C_VFS_PATH_SYSTEM, C_VFS_PATH_SYSTEMPICS, C_VFS_PATH_WORKPLACE, C_WP_CHANNEL_TREE, C_WP_EXPLORER_FILELIST, C_WP_EXPLORER_PREFERENCES, C_WP_EXPLORER_TREE, C_WP_FOLDER_TREE, C_WP_RELOAD
 
Constructor Summary
CmsXmlWpTemplateFile()
          Default constructor.
CmsXmlWpTemplateFile(CmsObject cms, CmsFile file)
          Constructor for creating a new object containing the content of the given filename.
CmsXmlWpTemplateFile(CmsObject cms, String filename)
          Constructor for creating a new object containing the content of the given filename.
 
Method Summary
static void clearcache()
          Clears the internal language cache
 void clearStartup()
          Clears the startup tag that can be used in workplace documents.
 void fastSetXmlData(String tag, String data)
          Fast method to replace a datablock.
 CmsXmlLanguageFile getLanguageFile()
          Gets the actual instance of the language file.
 String getProcessedXmlDataValue(String tag)
          Deprecated. Use getProcessedDataValue instead.
 String getProcessedXmlDataValue(String tag, Object callingObject)
          Deprecated. Use getProcessedDataValue instead.
 String getProcessedXmlDataValue(String tag, Object callingObject, Object userObj)
          Deprecated. Use getProcessedDataValue instead.
 String getXmlDataValue(String tag)
          Deprecated. Use getDataValue instead. is found for this key.
 String getXmlDocumentTagName()
          Gets the expected tagname for the XML documents of this content type
 Object handleAnyTag(Element n, Object callingObject, Object userObj)
          Handles any occurence of any special workplace XML tag like <BUTTON> or <LABEL>.
 boolean hasXmlData(String tag)
          Deprecated. Use hasData instead.
 void init(CmsObject cms, CmsFile file)
          Overridden init method of A_CmsXmlContent.
 void init(CmsObject cms, String filename)
          Overridden init method of A_CmsXmlContent.
 void removeXmlData(String tag)
          Deprecated. Use removeData instead.
 void setXmlData(String tag, String data)
          Deprecated. Use setData instead.
 
Methods inherited from class com.opencms.template.CmsXmlTemplateFile
createNewSection, generateElementCacheVariant, getAllLinkTagValues, getAllSections, getAllSubElementDefinitions, getAllSubElements, getAllSubElements, getBodyTag, getContentDescription, getData, getDataValue, getEditableTemplateContent, getParameter, getParameterNames, getParameters, getProcessedData, getProcessedData, getProcessedData, getProcessedDataValue, getProcessedDataValue, getProcessedDataValue, getProcessedDataValue, getProcessedTemplateContent, getProcessedTemplateContent, getSectionTitle, getSubtemplateClass, getSubtemplateFilename, getSubtemplateSelector, getTemplateContent, handleElementTag, hasData, hasSection, hasSubtemplateClass, hasSubtemplateFilename, hasSubtemplateSelector, removeData, renameSection, setBodyTag, setData, setData, setEditedTemplateContent, setParsedData, setSectionTitle
 
Methods inherited from class com.opencms.template.A_CmsXmlContent
callAllUncalledMethodsSoThatEclipseDoesntComplainAboutThem, callUserMethod, clearFileCache, clearFileCache, clearFileCache, clone, createNewFile, fastSetData, getAbsoluteFilename, getAllData, getClassName, getEncoding, getFilename, getProcessedData, getTagValue, getXmlDocument, getXmlParser, getXmlText, getXmlText, getXmlText, getXmlText, getXmlText, getXmlText, init, parse, parse, processDocument, processNode, processNode, readIncludeFile, readIncludeFile, registerTag, registerTag, removeFromFileCache, setEncoding, throwException, throwException, throwException, throwException, toString, treeWalker, treeWalkerWidth, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsXmlWpTemplateFile

public CmsXmlWpTemplateFile()
                     throws CmsException
Default constructor.


CmsXmlWpTemplateFile

public CmsXmlWpTemplateFile(CmsObject cms,
                            CmsFile file)
                     throws CmsException
Constructor for creating a new object containing the content of the given filename.

Parameters:
cms - CmsObject object for accessing system resources.

CmsXmlWpTemplateFile

public CmsXmlWpTemplateFile(CmsObject cms,
                            String filename)
                     throws CmsException
Constructor for creating a new object containing the content of the given filename.

Parameters:
cms - CmsObject object for accessing system resources.
filename - Name of the body file that shoul be read.
Method Detail

clearcache

public static void clearcache()
Clears the internal language cache


clearStartup

public void clearStartup()
Clears the startup tag that can be used in workplace documents.


fastSetXmlData

public void fastSetXmlData(String tag,
                           String data)
Fast method to replace a datablock.

USE WITH CARE!

Using this method only if

Parameters:
tag - Key for this datablock.
data - String to be put in the datablock.

getLanguageFile

public CmsXmlLanguageFile getLanguageFile()
Gets the actual instance of the language file.

Returns:
Language file.

getProcessedXmlDataValue

public String getProcessedXmlDataValue(String tag)
                                throws CmsException
Deprecated. Use getProcessedDataValue instead.

Gets the text and CDATA content of a processed datablock from the datablock hashtable.

Parameters:
tag - Key for the datablocks hashtable.
Returns:
Processed datablock for the given key.
Throws:
CmsException

getProcessedXmlDataValue

public String getProcessedXmlDataValue(String tag,
                                       Object callingObject)
                                throws CmsException
Deprecated. Use getProcessedDataValue instead.

Gets the text and CDATA content of a processed datablock from the datablock hashtable.

Parameters:
tag - Key for the datablocks hashtable.
callingObject - Object that should be used to look up user methods.
Returns:
Processed datablock for the given key.
Throws:
CmsException

getProcessedXmlDataValue

public String getProcessedXmlDataValue(String tag,
                                       Object callingObject,
                                       Object userObj)
                                throws CmsException
Deprecated. Use getProcessedDataValue instead.

Gets the text and CDATA content of a processed datablock from the datablock hashtable.

The userObj Object is passed to all called user methods. By using this, the initiating class can pass customized data to its methods.

Parameters:
tag - Key for the datablocks hashtable.
callingObject - Object that should be used to look up user methods.
userObj - any object that should be passed to user methods
Returns:
Processed datablock for the given key.
Throws:
CmsException

getXmlDataValue

public String getXmlDataValue(String tag)
                       throws CmsException
Deprecated. Use getDataValue instead. is found for this key.

Gets the text and CDATA content of a datablock from the datablock hashtable.

Parameters:
tag - Key for the datablocks hashtable.
Returns:
Datablock content for the given key or null if no datablock
CmsException

getXmlDocumentTagName

public String getXmlDocumentTagName()
Gets the expected tagname for the XML documents of this content type

Overrides:
getXmlDocumentTagName in class CmsXmlTemplateFile
Returns:
Expected XML tagname.

handleAnyTag

public Object handleAnyTag(Element n,
                           Object callingObject,
                           Object userObj)
                    throws CmsException
Handles any occurence of any special workplace XML tag like <BUTTON> or <LABEL>. Looks up the appropriate workplace element class for the current tag and calls the handleSpecialWorkplaceTag() method of this class.

Every workplace element class used by this method has to implement the interface I_CmsWpElement

Parameters:
n - XML element containing the current special workplace tag.
callingObject - reference to the calling object.
userObj - hashtable containig all user parameters.
Throws:
CmsException
See Also:
I_CmsWpElement

hasXmlData

public boolean hasXmlData(String tag)
                   throws CmsException
Deprecated. Use hasData instead.

Checks if this Template owns a datablock with the given key.

Returns:
true if a datablock is found, false otherwise.
CmsException

init

public void init(CmsObject cms,
                 CmsFile file)
          throws CmsException
Overridden init method of A_CmsXmlContent. This method is now extended to get an actual instance of the language file.

Specified by:
init in interface I_CmsXmlContent
Overrides:
init in class A_CmsXmlContent
Parameters:
cms - CmsObject Object for accessing resources.
file - CmsFile object of the file to be loaded and parsed.
Throws:
CmsException

init

public void init(CmsObject cms,
                 String filename)
          throws CmsException
Overridden init method of A_CmsXmlContent. This method is now extended to get an actual instance of the language file.

Specified by:
init in interface I_CmsXmlContent
Overrides:
init in class A_CmsXmlContent
Parameters:
cms - CmsObject Object for accessing resources.
Throws:
CmsException

removeXmlData

public void removeXmlData(String tag)
Deprecated. Use removeData instead.

Removes a datablock from the internal hashtable and from the XML document

Parameters:
tag - Key of the datablock to delete.

setXmlData

public void setXmlData(String tag,
                       String data)
Deprecated. Use setData instead.

Creates a datablock consisting of a single TextNode containing data and stores this block into the datablock-hashtable.

Parameters:
tag - Key for this datablock.
data - String to be put in the datablock.