public class ContentTransformerHelper
extends java.lang.Object
ContentTransformers and ContentTransformerWorker
s.| Constructor and Description |
|---|
ContentTransformerHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getMimetype(org.alfresco.service.cmr.repository.ContentAccessor content)
Convenience to fetch and check the mimetype for the given content
|
protected org.alfresco.service.cmr.repository.MimetypeService |
getMimetypeService() |
boolean |
isExplicitTransformation(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Default implementation, override if need to extend logic
|
boolean |
isSupportedTransformation(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options) |
void |
setExplicitTransformations(java.util.List explicitTransformations)
Specifies transformations that are considered to be 'exceptional' so
should be used in preference to other transformers that can perform
the same transformation.
|
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Helper setter of the mimetype service.
|
void |
setSupportedTransformations(java.util.List supportedTransformations)
Restricts the transformations that may be performed even though the transformer
may perform other transformations.
|
void |
setUnsupportedTransformations(java.util.List unsupportedTransformations)
Restricts the transformations that may be performed even though the transformer
may claim to perform the transformations.
|
public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
mimetypeService - protected org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
public void setExplicitTransformations(java.util.List explicitTransformations)
public void setSupportedTransformations(java.util.List supportedTransformations)
ContentTransformer.isTransformableMimetype(String, String, TransformationOptions)
method will still be called.public void setUnsupportedTransformations(java.util.List unsupportedTransformations)
ContentTransformer.isTransformableMimetype(String, String, TransformationOptions)
method will still be called.protected java.lang.String getMimetype(org.alfresco.service.cmr.repository.ContentAccessor content)
content - the reader/writer for the contentorg.alfresco.error.AlfrescoRuntimeException - if the content doesn't have a mimetypepublic boolean isExplicitTransformation(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
public boolean isSupportedTransformation(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.