Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.opencms.template
Class CmsXmlControlFile  view CmsXmlControlFile download CmsXmlControlFile.java

java.lang.Object
  extended bycom.opencms.template.A_CmsXmlContent
      extended bycom.opencms.template.CmsXmlControlFile
All Implemented Interfaces:
java.lang.Cloneable, I_CmsContent, com.opencms.boot.I_CmsLogChannels, I_CmsXmlContent

public class CmsXmlControlFile
extends A_CmsXmlContent
implements com.opencms.boot.I_CmsLogChannels

Content definition for "clickable" and user requestable XML body files.

Version:
$Revision: 1.28 $ $Date: 2003/01/20 23:59:21 $

Field Summary
 
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
 
Constructor Summary
CmsXmlControlFile()
          Default constructor.
CmsXmlControlFile(com.opencms.file.CmsObject cms, com.opencms.file.CmsFile file)
          Constructor for creating a new object containing the content of the given filename.
CmsXmlControlFile(com.opencms.file.CmsObject cms, java.lang.String filename)
          Constructor for creating a new object containing the content of the given filename.
 
Method Summary
private  void createElementDef(java.lang.String name)
          Used for setting element definition values.
 java.lang.String getContentDescription()
          Gets a description of this content type.
 java.lang.String getElementClass(java.lang.String elementName)
          Gets the template class of a given subelement definition.
 com.opencms.template.cache.CmsElementDefinitionCollection getElementDefinitionCollection()
           
 java.util.Enumeration getElementDefinitions()
          Gets an enumeration of all names of the subelement definition in the body file.
 java.lang.String getElementParameter(java.lang.String elementName, java.lang.String parameterName)
          Gets the value of a single parameter of a given subelement definition.
 java.util.Enumeration getElementParameterNames(java.lang.String elementName)
          Gets an enumeration of all parameter names of a given subelement definition.
 java.util.Hashtable getElementParameters(java.lang.String elementName)
          Get a hashtable containing all parameters and thies values of a given subelement definition.
 java.lang.String getElementTemplate(java.lang.String elementName)
          Gets the filename of the master template file of a given subelement definition.
 java.lang.String getElementTemplSelector(java.lang.String elementName)
          Gets the filename of the master template file of a given subelement definition.
 java.lang.String getMasterTemplate()
          Gets the filename of the master template file defined in the body file.
private  java.util.Enumeration getNamesFromNodeList(org.w3c.dom.NodeList nl, java.lang.String tag, boolean unnamedAllowed)
          Internal utility method to extract the values of the "name" attribute from defined nodes of a given nodelist.
 java.lang.String getParameter(java.lang.String parameterName)
          Gets the value of a single parameter of the master template.
 java.util.Enumeration getParameterNames()
          Gets an enumeration of all parameter names of the master template.
 java.lang.String getTemplateClass()
          Gets the template class defined in the body file.
 java.lang.String getXmlDocumentTagName()
          Gets the expected tagname for the XML documents of this content type
 boolean isElementClassDefined(java.lang.String elementName)
          Checks if the body file contains a definition of the template class name for a given subelement definition.
 boolean isElementTemplateDefined(java.lang.String elementName)
          Checks if the body file contains a definition of the template file name for a given subelement definition.
 boolean isElementTemplSelectorDefined(java.lang.String elementName)
          Checks if the body file contains a definition of the template selector for a given subelement definition.
 void setElementClass(java.lang.String elementName, java.lang.String classname)
          Sets the template class of a given subelement definition.
 void setElementParameter(java.lang.String elementName, java.lang.String parameterName, java.lang.String parameterValue)
          Set the value of a single parameter of a given subelement definition.
 void setElementTemplate(java.lang.String elementName, java.lang.String filename)
          Sets the filename of the master template file of a given subelement definition.
 void setElementTemplSelector(java.lang.String elementName, java.lang.String templateSelector)
          Sets the filename of the master template file of a given subelement definition.
 void setMasterTemplate(java.lang.String template)
          Sets the filename of the master template file defined in the body file.
 void setParameter(java.lang.String parameterName, java.lang.String parameterValue)
          Set the value of a single parameter of the master template.
 void setTemplateClass(java.lang.String templateClass)
          Set the template class used for the master Template
 
Methods inherited from class com.opencms.template.A_CmsXmlContent
callAllUncalledMethodsSoThatEclipseDoesntComplainAboutThem, callUserMethod, clearFileCache, clearFileCache, clearFileCache, clone, createNewFile, fastSetData, getAbsoluteFilename, getAllData, getClassName, getData, getDataValue, getEncoding, getFilename, getProcessedData, getProcessedData, getProcessedData, getProcessedData, getProcessedDataValue, getProcessedDataValue, getProcessedDataValue, getProcessedDataValue, getTagValue, getXmlDocument, getXmlParser, getXmlText, getXmlText, getXmlText, getXmlText, getXmlText, getXmlText, hasData, init, init, init, parse, parse, processDocument, processNode, processNode, readIncludeFile, readIncludeFile, registerTag, registerTag, removeData, removeFromFileCache, setData, setData, setEncoding, setParsedData, 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

CmsXmlControlFile

public CmsXmlControlFile()
                  throws com.opencms.core.CmsException
Default constructor.


CmsXmlControlFile

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


CmsXmlControlFile

public CmsXmlControlFile(com.opencms.file.CmsObject cms,
                         java.lang.String filename)
                  throws com.opencms.core.CmsException
Constructor for creating a new object containing the content of the given filename.

Method Detail

createElementDef

private void createElementDef(java.lang.String name)
Used for setting element definition values. Checks if the requested element definition already exists. If so, nothing will happen. If not, a corresponding section will be created using a hierarchical datablock tag <ELEMENTDEF name="..."/>


getContentDescription

public java.lang.String getContentDescription()
Gets a description of this content type.

Specified by:
getContentDescription in class A_CmsXmlContent

getElementClass

public java.lang.String getElementClass(java.lang.String elementName)
                                 throws com.opencms.core.CmsException
Gets the template class of a given subelement definition.


getElementDefinitions

public java.util.Enumeration getElementDefinitions()
                                            throws com.opencms.core.CmsException
Gets an enumeration of all names of the subelement definition in the body file.


getElementParameter

public java.lang.String getElementParameter(java.lang.String elementName,
                                            java.lang.String parameterName)
                                     throws com.opencms.core.CmsException
Gets the value of a single parameter of a given subelement definition.


getElementParameterNames

public java.util.Enumeration getElementParameterNames(java.lang.String elementName)
                                               throws com.opencms.core.CmsException
Gets an enumeration of all parameter names of a given subelement definition.


getElementParameters

public java.util.Hashtable getElementParameters(java.lang.String elementName)
                                         throws com.opencms.core.CmsException
Get a hashtable containing all parameters and thies values of a given subelement definition.


getElementTemplate

public java.lang.String getElementTemplate(java.lang.String elementName)
                                    throws com.opencms.core.CmsException
Gets the filename of the master template file of a given subelement definition.


getElementTemplSelector

public java.lang.String getElementTemplSelector(java.lang.String elementName)
                                         throws com.opencms.core.CmsException
Gets the filename of the master template file of a given subelement definition.


getMasterTemplate

public java.lang.String getMasterTemplate()
                                   throws com.opencms.core.CmsException
Gets the filename of the master template file defined in the body file.


getNamesFromNodeList

private java.util.Enumeration getNamesFromNodeList(org.w3c.dom.NodeList nl,
                                                   java.lang.String tag,
                                                   boolean unnamedAllowed)
                                            throws com.opencms.core.CmsException
Internal utility method to extract the values of the "name" attribute from defined nodes of a given nodelist.


getParameter

public java.lang.String getParameter(java.lang.String parameterName)
                              throws com.opencms.core.CmsException
Gets the value of a single parameter of the master template.


getParameterNames

public java.util.Enumeration getParameterNames()
                                        throws com.opencms.core.CmsException
Gets an enumeration of all parameter names of the master template.


getTemplateClass

public java.lang.String getTemplateClass()
                                  throws com.opencms.core.CmsException
Gets the template class defined in the body file.


getXmlDocumentTagName

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

Specified by:
getXmlDocumentTagName in class A_CmsXmlContent

isElementClassDefined

public boolean isElementClassDefined(java.lang.String elementName)
Checks if the body file contains a definition of the template class name for a given subelement definition.


isElementTemplateDefined

public boolean isElementTemplateDefined(java.lang.String elementName)
Checks if the body file contains a definition of the template file name for a given subelement definition.


isElementTemplSelectorDefined

public boolean isElementTemplSelectorDefined(java.lang.String elementName)
Checks if the body file contains a definition of the template selector for a given subelement definition.


setElementClass

public void setElementClass(java.lang.String elementName,
                            java.lang.String classname)
Sets the template class of a given subelement definition.


setElementParameter

public void setElementParameter(java.lang.String elementName,
                                java.lang.String parameterName,
                                java.lang.String parameterValue)
                         throws com.opencms.core.CmsException
Set the value of a single parameter of a given subelement definition.


setElementTemplate

public void setElementTemplate(java.lang.String elementName,
                               java.lang.String filename)
Sets the filename of the master template file of a given subelement definition.


setElementTemplSelector

public void setElementTemplSelector(java.lang.String elementName,
                                    java.lang.String templateSelector)
Sets the filename of the master template file of a given subelement definition.


setMasterTemplate

public void setMasterTemplate(java.lang.String template)
Sets the filename of the master template file defined in the body file.


setParameter

public void setParameter(java.lang.String parameterName,
                         java.lang.String parameterValue)
                  throws com.opencms.core.CmsException
Set the value of a single parameter of the master template.


setTemplateClass

public void setTemplateClass(java.lang.String templateClass)
Set the template class used for the master Template


getElementDefinitionCollection

public com.opencms.template.cache.CmsElementDefinitionCollection getElementDefinitionCollection()
                                                                                         throws com.opencms.core.CmsException