KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opencms > htmlconverter > I_CmsHtmlConverterInterface


1 /*
2 * File : $Source: /usr/local/cvs/opencms/src-modules/com/opencms/htmlconverter/I_CmsHtmlConverterInterface.java,v $
3 * Date : $Date: 2005/06/27 23:22:30 $
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 package com.opencms.htmlconverter;
30
31 import java.io.InputStream JavaDoc;
32 import java.io.OutputStream JavaDoc;
33 import java.io.Reader JavaDoc;
34 import java.io.Writer JavaDoc;
35
36 /**
37  * Interface definition of CmsHtmlConverter
38  * with declaration of necessary methods.<p>
39  *
40  * @author Andreas Zahner
41  * @version 1.0
42  *
43  * @deprecated Will not be supported past the OpenCms 6 release.
44  */

45 public interface I_CmsHtmlConverterInterface {
46
47     /**
48      * Configures JTidy from file.<p>
49      *
50      * @param fileName filename of JTidy configuration file
51      */

52     void setTidyConfFile(String JavaDoc fileName);
53
54     /**
55      * If defined, returns JTidy configuration filename.<p>
56      *
57      * @return filename of JTidy configuration file
58      */

59     String JavaDoc getTidyConfFile();
60
61     /**
62      * Checks whether JTidy is already configured or not.<p>
63      *
64      * @return true if JTidy configuration file is set, otherwise false
65      */

66     boolean tidyConfigured();
67
68
69     /**
70      * Configures CmsHtmlConverter from file.<p>
71      *
72      * @param confFile filename of configuration file
73      */

74     void setConverterConfFile(String JavaDoc confFile);
75
76     /**
77      * Configures CmsHtmlConverter from string.<p>
78      *
79      * @param configuration string with CmsHtmlConverter configuration
80      */

81     void setConverterConfString(String JavaDoc configuration);
82
83     /**
84      * If defined, returns filename of CmsHtmlConverter configuration file.<p>
85      *
86      * @return filename of configuration file
87      */

88     String JavaDoc getConverterConfFile();
89
90     /**
91      * Checks whether CmsHtmlConverter is already configured or not.<p>
92      *
93      * @return true if CmsHtmlConverter configuration is set, otherwise false
94      */

95     boolean converterConfigured();
96
97
98     /**
99      * Checks if HTML code has errors.<p>
100      *
101      * @param inString String with HTML code
102      * @return true if errors were detected, otherwise false
103      */

104     boolean hasErrors (String JavaDoc inString);
105
106     /**
107      * Checks if HTML code has errors.<p>
108      *
109      * @param input InputStream with HTML code
110      * @return true if errors were detected, otherwise false
111      */

112     boolean hasErrors (InputStream JavaDoc input);
113
114     /**
115      * Returns the number of found errors in last parsed html code.<p>
116      *
117      * @return int with number of errors
118      */

119     int getNumberErrors();
120
121
122     /**
123      * Checks if HTML code has errors and lists errors.<p>
124      *
125      * @param inString String with HTML code
126      * @return String with detected errors
127      */

128     String JavaDoc showErrors (String JavaDoc inString);
129
130     /**
131      * Checks if HTML code has errors and lists errors.<p>
132      *
133      * @param input InputStream with HTML code
134      * @param output OutputStream with detected errors
135      */

136     void showErrors (InputStream JavaDoc input, OutputStream JavaDoc output);
137
138
139     /**
140      * Transforms HTML code into user defined output.<p>
141      *
142      * @param inString String with HTML code
143      * @return String with transformed code
144      */

145     String JavaDoc convertHTML (String JavaDoc inString);
146
147     /**
148      * Transforms HTML code into user defined output.<p>
149      *
150      * @param in InputStream with HTML code
151      * @param out OutputStream with transformed code
152      */

153     void convertHTML (Reader JavaDoc in, Writer JavaDoc out);
154
155 }
Popular Tags