com.opencms.template
Class CmsXmlControlFile

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

public class CmsXmlControlFile
extends A_CmsXmlContent
implements I_CmsLogChannels

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

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

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(CmsObject cms, CmsFile file)
          Constructor for creating a new object containing the content of the given filename.
CmsXmlControlFile(CmsObject cms, String filename)
          Constructor for creating a new object containing the content of the given filename.
 
Method Summary
 String getContentDescription()
          Gets a description of this content type.
 String getElementClass(String elementName)
          Gets the template class of a given subelement definition.
 CmsElementDefinitionCollection getElementDefinitionCollection()
           
 Enumeration getElementDefinitions()
          Gets an enumeration of all names of the subelement definition in the body file.
 String getElementParameter(String elementName, String parameterName)
          Gets the value of a single parameter of a given subelement definition.
 Enumeration getElementParameterNames(String elementName)
          Gets an enumeration of all parameter names of a given subelement definition.
 Hashtable getElementParameters(String elementName)
          Get a hashtable containing all parameters and thies values of a given subelement definition.
 String getElementTemplate(String elementName)
          Gets the filename of the master template file of a given subelement definition.
 String getElementTemplSelector(String elementName)
          Gets the filename of the master template file of a given subelement definition.
 String getMasterTemplate()
          Gets the filename of the master template file defined in the body file.
 String getParameter(String parameterName)
          Gets the value of a single parameter of the master template.
 Enumeration getParameterNames()
          Gets an enumeration of all parameter names of the master template.
 String getTemplateClass()
          Gets the template class defined in the body file.
 String getXmlDocumentTagName()
          Gets the expected tagname for the XML documents of this content type
 boolean isElementClassDefined(String elementName)
          Checks if the body file contains a definition of the template class name for a given subelement definition.
 boolean isElementTemplateDefined(String elementName)
          Checks if the body file contains a definition of the template file name for a given subelement definition.
 boolean isElementTemplSelectorDefined(String elementName)
          Checks if the body file contains a definition of the template selector for a given subelement definition.
 void setElementClass(String elementName, String classname)
          Sets the template class of a given subelement definition.
 void setElementParameter(String elementName, String parameterName, String parameterValue)
          Set the value of a single parameter of a given subelement definition.
 void setElementTemplate(String elementName, String filename)
          Sets the filename of the master template file of a given subelement definition.
 void setElementTemplSelector(String elementName, String templateSelector)
          Sets the filename of the master template file of a given subelement definition.
 void setMasterTemplate(String template)
          Sets the filename of the master template file defined in the body file.
 void setParameter(String parameterName, String parameterValue)
          Set the value of a single parameter of the master template.
 void setTemplateClass(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 CmsException
Default constructor.


CmsXmlControlFile

public CmsXmlControlFile(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.

CmsXmlControlFile

public CmsXmlControlFile(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

getContentDescription

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

Specified by:
getContentDescription in class A_CmsXmlContent
Returns:
Content type description.

getElementClass

public String getElementClass(String elementName)
                       throws CmsException
Gets the template class of a given subelement definition.

Parameters:
elementName - Name of the subelement.
Returns:
Name of the template class.
CmsException

getElementDefinitions

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

Returns:
Enumeration with of names.
Throws:
CmsException

getElementParameter

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

Parameters:
elementName - Name of the subelement.
parameterName - Name of the requested parameter.
CmsException

getElementParameterNames

public Enumeration getElementParameterNames(String elementName)
                                     throws CmsException
Gets an enumeration of all parameter names of a given subelement definition.

Parameters:
elementName - Name of the subelement.
Returns:
Enumeration of all names.
Throws:
CmsException

getElementParameters

public Hashtable getElementParameters(String elementName)
                               throws CmsException
Get a hashtable containing all parameters and thies values of a given subelement definition.

Parameters:
elementName - Name of the subelement.
Returns:
Enumeration of all names.
Throws:
CmsException

getElementTemplate

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

Parameters:
elementName - Name of the subelement.
Returns:
Filename of the template file.
CmsException

getElementTemplSelector

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

Parameters:
elementName - Name of the subelement.
Returns:
Filename of the template file.
CmsException

getMasterTemplate

public String getMasterTemplate()
                         throws CmsException
Gets the filename of the master template file defined in the body file.

Returns:
Filename of the template file.
Throws:
CmsException

getParameter

public String getParameter(String parameterName)
                    throws CmsException
Gets the value of a single parameter of the master template.

Parameters:
parameterName - Name of the requested parameter.
CmsException

getParameterNames

public Enumeration getParameterNames()
                              throws CmsException
Gets an enumeration of all parameter names of the master template.

Returns:
Enumeration of all names.
Throws:
CmsException

getTemplateClass

public String getTemplateClass()
                        throws CmsException
Gets the template class defined in the body file.

Returns:
Name of the template class.
Throws:
CmsException

getXmlDocumentTagName

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

Specified by:
getXmlDocumentTagName in class A_CmsXmlContent
Returns:
Expected XML tagname.

isElementClassDefined

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

Parameters:
elementName - Name of the subelement.
Returns:
true if a definition exists, false otherwise.

isElementTemplateDefined

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

Parameters:
elementName - Name of the subelement.
Returns:
true if a definition exists, false otherwise.

isElementTemplSelectorDefined

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

Parameters:
elementName - Name of the subelement.
Returns:
true if a definition exists, false otherwise.

setElementClass

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

Parameters:
elementName - Name of the subelement.
classname - Classname to be set.

setElementParameter

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

Parameters:
elementName - Name of the subelement.
parameterName - Name of the requested parameter.
parameterValue - Value to be set
CmsException

setElementTemplate

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

Parameters:
elementName - Name of the subelement.
filename - Filename to be set.

setElementTemplSelector

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

Parameters:
elementName - Name of the subelement.
templateSelector - Template selector to be set.

setMasterTemplate

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

Parameters:
template - Filename of the template file.
Throws:
CmsException

setParameter

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

Parameters:
parameterName - Name of the requested parameter.
parameterValue - Value to be set
CmsException

setTemplateClass

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

Parameters:
templateClass - Name of the template class.

getElementDefinitionCollection

public CmsElementDefinitionCollection getElementDefinitionCollection()
                                                              throws CmsException
CmsException