Package org.ametys.cms.transformation
Class AbstractRichTextTransformer
java.lang.Object
org.ametys.cms.transformation.AbstractRichTextTransformer
- All Implemented Interfaces:
RichTextTransformer
,Serviceable
- Direct Known Subclasses:
DocbookTransformer
,HTMLTransformer
,HTMLTransformer
public abstract class AbstractRichTextTransformer
extends Object
implements RichTextTransformer, Serviceable
Abstract class for
RichTextTransformer
s relying on Cocoon pipelines to actually transform HTML to RichText back and forth.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Returns the internalSource
URI used to process the HTML editor content.protected abstract String
Returns the internalSource
URI used to process the RichText's InputStream.void
service
(ServiceManager manager) void
void
transform
(String source, ModifiableRichText dest) Deprecated.void
transformForEditing
(RichText source, DataContext dataContext, StringBuilder dest) Transform aRichText
into aStringBuilder
.void
transformForEditing
(ModifiableRichText source, StringBuilder dest) Deprecated.void
transformForRendering
(RichText source, ContentHandler handler) SAXes aRichText
into aContentHandler
for rendering purposes.void
transformForRendering
(RichText source, ContentHandler handler) Deprecated.
-
Constructor Details
-
AbstractRichTextTransformer
public AbstractRichTextTransformer()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
transform
@Deprecated public void transform(String source, ModifiableRichText dest) throws AmetysRepositoryException, IOException Deprecated.Description copied from interface:RichTextTransformer
Transform aString
into aModifiableRichText
.- Specified by:
transform
in interfaceRichTextTransformer
- Parameters:
source
- the source.dest
- theModifiableRichText
to populate.- Throws:
AmetysRepositoryException
- if an error occurs.IOException
- if an error occurs.
-
transform
Description copied from interface:RichTextTransformer
- Specified by:
transform
in interfaceRichTextTransformer
- Parameters:
source
- the source.dest
- theRichText
to populate.- Throws:
AmetysRepositoryException
- if an error occurs.IOException
- if an error occurs.
-
_getSourceUriForHTML2RichText
Returns the internalSource
URI used to process the HTML editor content.- Returns:
- the internal
Source
URI used to process the HTML editor content.
-
transformForEditing
@Deprecated public void transformForEditing(ModifiableRichText source, StringBuilder dest) throws AmetysRepositoryException, IOException Deprecated.Description copied from interface:RichTextTransformer
Transform aModifiableRichText
into aStringBuilder
.- Specified by:
transformForEditing
in interfaceRichTextTransformer
- Parameters:
source
- the source.dest
- theStringBuilder
to populate.- Throws:
AmetysRepositoryException
- if an error occurs.IOException
- if an error occurs.
-
transformForEditing
public void transformForEditing(RichText source, DataContext dataContext, StringBuilder dest) throws AmetysRepositoryException, IOException Description copied from interface:RichTextTransformer
Transform aRichText
into aStringBuilder
.- Specified by:
transformForEditing
in interfaceRichTextTransformer
- Parameters:
source
- the source.dataContext
- the context of the rich textdest
- theStringBuilder
to populate.- Throws:
AmetysRepositoryException
- if an error occurs.IOException
- if an error occurs.
-
_getSourceUriForRichText2HTML
Returns the internalSource
URI used to process the RichText's InputStream.- Returns:
- the internal
Source
URI used to process the RichText's InputStream.
-
transformForRendering
@Deprecated public void transformForRendering(RichText source, ContentHandler handler) throws AmetysRepositoryException, SAXException, IOException Deprecated.Description copied from interface:RichTextTransformer
SAXes aRichText
into aContentHandler
for rendering purposes.- Specified by:
transformForRendering
in interfaceRichTextTransformer
- Parameters:
source
- the source.handler
- theStringBuilder
to populate.- Throws:
AmetysRepositoryException
- if an error occurs.SAXException
- if an error occurs.IOException
- if an error occurs.
-
transformForRendering
public void transformForRendering(RichText source, ContentHandler handler) throws AmetysRepositoryException, SAXException, IOException Description copied from interface:RichTextTransformer
SAXes aRichText
into aContentHandler
for rendering purposes.- Specified by:
transformForRendering
in interfaceRichTextTransformer
- Parameters:
source
- the source.handler
- theStringBuilder
to populate.- Throws:
AmetysRepositoryException
- if an error occurs.SAXException
- if an error occurs.IOException
- if an error occurs.
-