public abstract class AbstractRichTextTransformer extends Object implements RichTextTransformer, Serviceable
RichTextTransformers relying on Cocoon pipelines to actually transform HTML to RichText back and forth.| Modifier and Type | Field and Description |
|---|---|
private ServiceManager |
_manager |
private SourceResolver |
_sourceResolver |
| Constructor and Description |
|---|
AbstractRichTextTransformer() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
_getSourceUriForHTML2RichText()
Returns the internal
Source URI used to process the HTML editor content. |
protected abstract String |
_getSourceUriForRichText2HTML()
Returns the internal
Source URI used to process the RichText's InputStream. |
void |
service(ServiceManager manager) |
void |
transform(String source,
ModifiableRichText dest)
|
void |
transformForEditing(ModifiableRichText source,
StringBuilder dest)
Transform a
RichText into a StringBuilder. |
void |
transformForRendering(RichText source,
ContentHandler handler)
SAXes a
RichText into a ContentHandler for rendering purposes. |
private SourceResolver _sourceResolver
private ServiceManager _manager
public AbstractRichTextTransformer()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void transform(String source, ModifiableRichText dest) throws AmetysRepositoryException, IOException
RichTextTransformertransform in interface RichTextTransformersource - the source.dest - the rich text to populate.AmetysRepositoryException - if an error occurs.IOException - if an error occurs.protected abstract String _getSourceUriForHTML2RichText()
Source URI used to process the HTML editor content.Source URI used to process the HTML editor content.public void transformForEditing(ModifiableRichText source, StringBuilder dest) throws AmetysRepositoryException, IOException
RichTextTransformerRichText into a StringBuilder.transformForEditing in interface RichTextTransformersource - the source.dest - the StringBuilder to populate.AmetysRepositoryException - if an error occurs.IOException - if an error occurs.protected abstract String _getSourceUriForRichText2HTML()
Source URI used to process the RichText's InputStream.Source URI used to process the RichText's InputStream.public void transformForRendering(RichText source, ContentHandler handler) throws AmetysRepositoryException, SAXException, IOException
RichTextTransformerRichText into a ContentHandler for rendering purposes.transformForRendering in interface RichTextTransformersource - the source.handler - the StringBuilder to populate.AmetysRepositoryException - if an error occurs.SAXException - if an error occurs.IOException - if an error occurs.