KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > loader > I_CmsResourceStringDumpLoader


1 /*
2  * File : $Source: /usr/local/cvs/opencms/src/org/opencms/loader/I_CmsResourceStringDumpLoader.java,v $
3  * Date : $Date: 2006/03/27 14:52:37 $
4  * Version: $Revision: 1.2 $
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (C) 2002 - 2005 Alkacon Software (http://www.alkacon.com)
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 Alkacon Software, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.loader;
33
34 import org.opencms.file.CmsObject;
35 import org.opencms.file.CmsResource;
36 import org.opencms.main.CmsException;
37
38 import java.io.IOException JavaDoc;
39 import java.util.Locale JavaDoc;
40
41 import javax.servlet.ServletException JavaDoc;
42 import javax.servlet.ServletRequest JavaDoc;
43 import javax.servlet.ServletResponse JavaDoc;
44
45 /**
46  * Resource loaders that implement this method can easily provide the contents of a selected targe element as
47  * a String.<p>
48  *
49  * @author Alexander Kandzior
50  *
51  * @version $Revision: 1.2 $
52  *
53  * @since 6.2.0
54  */

55 public interface I_CmsResourceStringDumpLoader {
56
57     /**
58      * Dumps the processed content of the the requested file (and it's sub-elements) to a String.<p>
59      *
60      * This is a special form of <code>{@link I_CmsResourceLoader#dump(CmsObject, CmsResource, String, Locale, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}</code>
61      * where the result is required in a String, for example for printing it to a writer.<p>
62      *
63      * @param cms used to access the OpenCms VFS
64      * @param resource the requested resource in the VFS
65      * @param element the element in the file to display
66      * @param locale the locale to display
67      * @param req the servlet request
68      * @param res the servlet response
69      *
70      * @return the content of the processed file as a String
71      *
72      * @throws ServletException might be thrown by the servlet environment
73      * @throws IOException might be thrown by the servlet environment
74      * @throws CmsException in case of errors acessing OpenCms functions
75      *
76      * @see I_CmsResourceLoader#dump(CmsObject, CmsResource, String, Locale, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
77      */

78     String JavaDoc dumpAsString(
79         CmsObject cms,
80         CmsResource resource,
81         String JavaDoc element,
82         Locale JavaDoc locale,
83         ServletRequest JavaDoc req,
84         ServletResponse JavaDoc res) throws ServletException JavaDoc, IOException JavaDoc, CmsException;
85 }
Popular Tags