KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opencms > template > I_CmsXmlTemplate


1 /*
2 * File : $Source: /usr/local/cvs/opencms/src-modules/com/opencms/template/I_CmsXmlTemplate.java,v $
3 * Date : $Date: 2005/06/27 23:22:20 $
4 * Version: $Revision: 1.2 $
5 *
6 * This library is part of OpenCms -
7 * the Open Source Content Mananagement System
8 *
9 * Copyright (C) 2001 The OpenCms Group
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * For further information about OpenCms, please see the
22 * OpenCms Website: http://www.opencms.org
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 */

28
29
30 package com.opencms.template;
31
32 import org.opencms.file.CmsObject;
33 import org.opencms.main.CmsException;
34
35 import java.util.Hashtable JavaDoc;
36
37 /**
38  * Interface for OpenCms XML template classes.
39  * <P>
40  * All methods extending the functionality of the common
41  * template class interface to the special behaviour
42  * of XML template classes may be defined here.
43  * <P>
44  * Primarily, this interface is important for the loader,
45  * NOT for the template engine.<p>
46  *
47  * For subtemplates, the I_CmsTemplate interface is
48  * all that must be implemented, so you can load all kind
49  * of templates (eg. type I_CmsDumpTemplate) as subtemplate.
50  *
51  * @author Alexander Lucas
52  * @version $Revision: 1.2 $ $Date: 2005/06/27 23:22:20 $
53  *
54  * @deprecated Will not be supported past the OpenCms 6 release.
55  */

56 public interface I_CmsXmlTemplate extends I_CmsTemplate {
57     
58     /**
59      * Reads in the template file and starts the XML parser for the expected
60      * content type.
61      * <P>
62      * Every extending class not using CmsXmlTemplateFile as content type
63      * should override this method.
64      *
65      * @param cms CmsObject Object for accessing system resources.
66      * @param templateFile Filename of the template file.
67      * @param elementName Element name of this template in our parent template.
68      * @param parameters Hashtable with all template class parameters.
69      * @param templateSelector template section that should be processed.
70      */

71     public CmsXmlTemplateFile getOwnTemplateFile(CmsObject cms, String JavaDoc templateFile, String JavaDoc elementName, Hashtable JavaDoc parameters, String JavaDoc templateSelector) throws CmsException;
72     
73     /**
74      * Handles any occurence of an "ELEMENT" tag.
75      * <P>
76      * Every XML template class should use CmsXmlTemplateFile as
77      * the interface to the XML file. Since CmsXmlTemplateFile is
78      * an extension of A_CmsXmlContent by the additional tag
79      * "ELEMENT" this user method ist mandatory.
80      *
81      * @param cms CmsObject Object for accessing system resources.
82      * @param tagcontent Unused in this special case of a user method. Can be ignored.
83      * @param doc Reference to the A_CmsXmlContent object the initiating XLM document.
84      * @param userObj Hashtable with parameters.
85      * @return String or byte[] with the content of this subelement.
86      * @throws CmsException
87      */

88     public Object JavaDoc templateElement(CmsObject cms, String JavaDoc tagcontent, A_CmsXmlContent doc, Object JavaDoc userObject) throws CmsException;
89 }
90
Popular Tags