@AlfrescoPublicApi public class ContentTransformerRegistry extends Object
The transformers themselves are used to determine the applicability of a particular transformation.
The actual selection of a transformer is done by the injected
TransformerSelector
.
ContentTransformer
Modifier and Type | Class and Description |
---|---|
static class |
ContentTransformerRegistry.TransformationKey
Deprecated.
|
Constructor and Description |
---|
ContentTransformerRegistry(TransformerSelector transformerSelector) |
Modifier and Type | Method and Description |
---|---|
void |
addComponentTransformer(ContentTransformer transformer)
Records a transformer that can NOT be queried for applicability, but may be
included as a component of complex transformers.
|
void |
addTransformer(ContentTransformer transformer)
Registers an individual transformer that can be queried to check for applicability.
|
List<ContentTransformer> |
getActiveTransformers(String sourceMimetype,
long sourceSize,
String targetMimetype,
TransformationOptions options) |
List<ContentTransformer> |
getAllTransformers() |
ContentTransformer |
getTransformer(String transformerName)
Returns a transformer identified by name.
|
ContentTransformer |
getTransformer(String sourceMimetype,
long sourceSize,
String targetMimetype,
TransformationOptions options)
Gets the best transformer possible.
|
ContentTransformer |
getTransformer(String sourceMimetype,
String targetMimetype,
TransformationOptions options)
Deprecated.
use overloaded version with sourceSize parameter.
|
List<ContentTransformer> |
getTransformers() |
void |
removeTransformer(ContentTransformer transformer)
Removes a dynamically created transformer.
|
public ContentTransformerRegistry(TransformerSelector transformerSelector)
transformerSelector
- Transformer selectorpublic void addTransformer(ContentTransformer transformer)
transformer
- a content transformerpublic void addComponentTransformer(ContentTransformer transformer)
transformer
- a content transformerpublic void removeTransformer(ContentTransformer transformer)
transformer
- to be removed.public List<ContentTransformer> getTransformers()
public List<ContentTransformer> getAllTransformers()
public ContentTransformer getTransformer(String transformerName)
IllegalArgumentException
- if transformerName is not found.public ContentTransformer getTransformer(String sourceMimetype, String targetMimetype, TransformationOptions options)
public ContentTransformer getTransformer(String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options)
public List<ContentTransformer> getActiveTransformers(String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options)
Copyright © 2005–2017 Alfresco Software. All rights reserved.