|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuxeo.ecm.platform.transform.transformer.AbstractTransformer
public abstract class AbstractTransformer
Abstract transformer.
Define default transformer implementation.
org.nuxeo.ecm.platform.transform.interfaces,
Serialized Form| Field Summary | |
|---|---|
protected Map<String,Map<String,Serializable>> |
defaultOptions
|
protected static Log |
log
|
protected String |
name
|
protected List<String> |
pluginsChain
|
| Constructor Summary | |
|---|---|
protected |
AbstractTransformer()
|
protected |
AbstractTransformer(String name,
List<String> pluginsChain)
|
| Method Summary | |
|---|---|
protected Blob[] |
filterSourcesFor(Blob[] blobs,
Plugin plugin)
Filter input blobs sources for a given plugin. |
protected TransformDocument[] |
filterSourcesFor(TransformDocument[] sources,
Plugin plugin)
Filter input transform document sources for a given plugin. |
Map<String,Map<String,Serializable>> |
getDefaultOptions()
Returns the default transformer options. |
String |
getMimeTypeDestination()
Returns the mimetype destination this transformer will return as a result. |
List<String> |
getMimeTypeSources()
Returns the mimetype source types this transformer is expecting. |
String |
getName()
Returns the transformer name. |
protected static TransformService |
getNXTransform()
|
List<Plugin> |
getPluginChains()
Returns the list of plugins chain this transformer will use. |
protected Map<String,Serializable> |
mergeOptionsFor(Plugin plugin,
Map<String,Serializable> options)
Merge options from a given plugin with the ones the transformer defines for this as overrid purpose plugin. |
void |
setDefaultOptions(Map<String,Map<String,Serializable>> defaultOptions)
Sets plugin default options. |
void |
setName(String name)
Sets the transformer name. |
void |
setPluginChains(List<String> pluginsChain)
Sets the plugin chains given plugin names. |
List<TransformDocument> |
transform(Map<String,Map<String,Serializable>> options,
Blob... blobs)
Transforms given sources and plugin options. |
List<TransformDocument> |
transform(Map<String,Map<String,Serializable>> options,
TransformDocument... sources)
Transforms given sources and plugin options. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Log log
protected String name
protected Map<String,Map<String,Serializable>> defaultOptions
protected List<String> pluginsChain
| Constructor Detail |
|---|
protected AbstractTransformer()
protected AbstractTransformer(String name,
List<String> pluginsChain)
| Method Detail |
|---|
protected static TransformService getNXTransform()
public Map<String,Map<String,Serializable>> getDefaultOptions()
TransformerThe map keys are plugin names. The map values are maps which have string as keys and serializable objects as values.
getDefaultOptions in interface Transformerpublic String getMimeTypeDestination()
TransformerInformation taken from the last plugin defined in the plugins chain.
getMimeTypeDestination in interface Transformerpublic List<String> getMimeTypeSources()
TransformerInformation taken from the first plugin defined in the plugins chain.
getMimeTypeSources in interface Transformerpublic String getName()
Transformer
getName in interface Transformerpublic List<Plugin> getPluginChains()
TransformerThe plugins are registered in the order the transformer should call them to get the expected result.
getPluginChains in interface Transformerpublic void setDefaultOptions(Map<String,Map<String,Serializable>> defaultOptions)
TransformerThe hashmap keys are plugin names. The hashmap values are hashmaps which have string as keys and serializable objects as values.
setDefaultOptions in interface Transformerpublic void setPluginChains(List<String> pluginsChain)
Transformer
setPluginChains in interface TransformerpluginsChain - list of strings representing plugin namespublic void setName(String name)
Transformer
setName in interface Transformername - string containing the tranformer's name
public List<TransformDocument> transform(Map<String,Map<String,Serializable>> options,
Blob... blobs)
Transformer
transform in interface Transformeroptions - plugin options (the keys are the plugin names)blobs - list of sources as StreamingBlob instances.
public List<TransformDocument> transform(Map<String,Map<String,Serializable>> options,
TransformDocument... sources)
Transformer
transform in interface Transformeroptions - plugin options (the keys are the plugin names)sources - list of sources as TransformDocument instances
protected TransformDocument[] filterSourcesFor(TransformDocument[] sources,
Plugin plugin)
Note the discrimination is done plugin instance side.
sources - : transform documents instances.plugin - : a Nuxeo Transform Plugin instance.
protected Blob[] filterSourcesFor(Blob[] blobs,
Plugin plugin)
Note the discrimination is done plugin instance side.
sources - : Nuxeo Core blob instances.plugin - : a Nuxeo Transform Plugin instance.
protected Map<String,Serializable> mergeOptionsFor(Plugin plugin,
Map<String,Serializable> options)
plugin - : a Nuxeo Transform plugin
|
Nuxeo Enterprise Platform 5.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||