org.alfresco.repo.content.transform
Class MediaWikiContentTransformer
java.lang.Object
org.alfresco.repo.content.transform.ContentTransformerHelper
org.alfresco.repo.content.transform.AbstractContentTransformer2
org.alfresco.repo.content.transform.MediaWikiContentTransformer
- All Implemented Interfaces:
- ContentWorker, ContentTransformer
public class MediaWikiContentTransformer
- extends AbstractContentTransformer2
MediaWiki content transformer. Converts mediawiki markup into HTML.
- See Also:
Tika Note - Tika doesn't currently support mediawiki markup, so this
transformer cannot currently be converted to use Tika.
Method Summary |
boolean |
isTransformable(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Only transform from mediawiki to html |
void |
setFileFolderService(FileFolderService fileFolderService)
Sets the file folder service |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Sets the node service |
void |
transformInternal(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
Method to be implemented by subclasses wishing to make use of the common infrastructural code
provided by this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MediaWikiContentTransformer
public MediaWikiContentTransformer()
setFileFolderService
public void setFileFolderService(FileFolderService fileFolderService)
- Sets the file folder service
- Parameters:
fileFolderService
- the file folder service
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
- Sets the node service
- Parameters:
nodeService
- the node service
isTransformable
public boolean isTransformable(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
- Only transform from mediawiki to html
- Parameters:
sourceMimetype
- the source mimetypeoptions
- the transformation options
- Returns:
- boolean true if this content transformer can satify the mimetypes and options specified, false otherwise
- See Also:
ContentTransformer.isTransformable(java.lang.String, java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions)
transformInternal
public void transformInternal(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
throws java.lang.Exception
- Description copied from class:
AbstractContentTransformer2
- Method to be implemented by subclasses wishing to make use of the common infrastructural code
provided by this class.
- Specified by:
transformInternal
in class AbstractContentTransformer2
- Parameters:
reader
- the source of the content to transformwriter
- the target to which to write the transformed contentoptions
- a map of options to use when performing the transformation. The map
will never be null.
- Throws:
java.lang.Exception
- exceptions will be handled by this class - subclasses can throw anything- See Also:
AbstractContentTransformer2.transformInternal(org.alfresco.service.cmr.repository.ContentReader, org.alfresco.service.cmr.repository.ContentWriter, org.alfresco.service.cmr.repository.TransformationOptions)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.