Package org.opencms.util
Class A_CmsHtmlConverter
java.lang.Object
org.opencms.util.A_CmsHtmlConverter
- All Implemented Interfaces:
I_CmsHtmlConverter
- Direct Known Subclasses:
CmsHtmlConverterJTidy
-
Constructor Summary
ConstructorDescriptionEmpty constructor.A_CmsHtmlConverter
(String encoding, List<String> modes) Constructor, with parameters. -
Method Summary
Modifier and TypeMethodDescriptionabstract String
convertToString
(String htmlInput) Converts the given HTML code according to the settings of this converter.Returns the encoding used for the HTML code conversion.getModes()
Returns the conversion modes to use as List of String parameters.void
Initializes the HTML converter instance.
-
Constructor Details
-
A_CmsHtmlConverter
public A_CmsHtmlConverter()Empty constructor.Initializes with encoding
CmsEncoder.ENCODING_UTF_8
and with an empty String as mode. -
A_CmsHtmlConverter
Constructor, with parameters.- Parameters:
encoding
- the encoding used for the HTML code conversionmodes
- the conversion modes to use
-
-
Method Details
-
convertToString
Description copied from interface:I_CmsHtmlConverter
Converts the given HTML code according to the settings of this converter.- Specified by:
convertToString
in interfaceI_CmsHtmlConverter
- Parameters:
htmlInput
- the HTML input stored in a string- Returns:
- string containing the converted HTML
- Throws:
UnsupportedEncodingException
- if the encoding set for the conversion is not supported- See Also:
-
getEncoding
Description copied from interface:I_CmsHtmlConverter
Returns the encoding used for the HTML code conversion.- Specified by:
getEncoding
in interfaceI_CmsHtmlConverter
- Returns:
- the encoding used for the HTML code conversion
- See Also:
-
getModes
Description copied from interface:I_CmsHtmlConverter
Returns the conversion modes to use as List of String parameters.- Specified by:
getModes
in interfaceI_CmsHtmlConverter
- Returns:
- the conversion modes to use as List of String parameters
- See Also:
-
init
Description copied from interface:I_CmsHtmlConverter
Initializes the HTML converter instance.Possible values for the conversion mode are dependent from the converter implementation.
- Specified by:
init
in interfaceI_CmsHtmlConverter
- Parameters:
encoding
- the encoding used for the HTML code conversionmodes
- the conversion modes to use- See Also:
-