public class TransformationOptionsImpl extends Object implements TransformationOptions, org.gytheio.util.Mergable<TransformationOptions>
| Constructor and Description |
|---|
TransformationOptionsImpl() |
TransformationOptionsImpl(TransformationOptionsImpl origOptions) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSourceOptions(TransformationSourceOptions sourceOptions)
Adds the given sourceOptions to the sourceOptionsMap.
|
protected Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> |
deepCopySourceOptionsMap(Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> origMap) |
Map<String,Serializable> |
getAdditionalOptions()
Gets the additional transformation options not explicitly modeled in an
implementation.
|
Boolean |
getIncludeEmbedded()
If the source content includes embedded resources,
should the transformer attempt to transform these
as well?
Not many transformers do support embedded resources,
so this option will only affect those that can.
|
int |
getPageLimit()
Get the page limit before returning EOF.
|
<T extends TransformationSourceOptions> |
getSourceOptions(Class<T> clazz)
Gets the appropriate source options for the given mimetype if available.
|
Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> |
getSourceOptionsMap()
Gets the map of
TransformationSourceOptions class to an object of that class holding
the source options values. |
long |
getTimeoutMs()
Gets the timeout (ms) on the InputStream after which an IOExecption is thrown
to terminate very slow transformations or a subprocess is terminated (killed).
|
void |
merge(TransformationOptions override) |
void |
setAdditionalOptions(Map<String,Serializable> additionalOptions)
Sets the additional transformation options not explicitly modeled in an
implementation.
|
void |
setIncludeEmbedded(Boolean includeEmbedded)
If the source content includes embedded resources,
should the transformer attempt to transform these
as well?
Not many transformers do support embedded resources,
so this option will only affect those that can.
|
void |
setPageLimit(int pageLimit)
Set the number of pages read from the source before returning EOF.
|
void |
setSourceOptionsList(Collection<TransformationSourceOptions> sourceOptionsList)
Sets the list of source options further describing how the source should
be transformed based on its mimetype.
|
void |
setSourceOptionsMap(Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> sourceOptionsMap)
Sets the map of
TransformationSourceOptions class to an object of that class holding
the source options values. |
void |
setTimeoutMs(long timeoutMs)
Sets a timeout (ms) on the InputStream after which an IOExecption is thrown
to terminate very slow transformations or to terminate (kill) a subprocess.
|
String |
toString() |
protected String |
toStringSourceOptions()
Builds the source options to string.
|
public TransformationOptionsImpl()
public TransformationOptionsImpl(TransformationOptionsImpl origOptions)
public void merge(TransformationOptions override)
merge in interface org.gytheio.util.Mergable<TransformationOptions>protected Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> deepCopySourceOptionsMap(Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> origMap)
public Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> getSourceOptionsMap()
TransformationOptionsTransformationSourceOptions class to an object of that class holding
the source options values.getSourceOptionsMap in interface TransformationOptionspublic void setSourceOptionsMap(Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> sourceOptionsMap)
TransformationOptionsTransformationSourceOptions class to an object of that class holding
the source options values.setSourceOptionsMap in interface TransformationOptionspublic void setSourceOptionsList(Collection<TransformationSourceOptions> sourceOptionsList)
TransformationOptionssetSourceOptionsList in interface TransformationOptionssourceOptionsList - the source options listpublic <T extends TransformationSourceOptions> T getSourceOptions(Class<T> clazz)
TransformationOptionsgetSourceOptions in interface TransformationOptionspublic void addSourceOptions(TransformationSourceOptions sourceOptions)
TransformationOptionsNote that if source options of the same class already exists a new merged source options object is added.
addSourceOptions in interface TransformationOptionspublic long getTimeoutMs()
TransformationOptionsgetTimeoutMs in interface TransformationOptionspublic void setTimeoutMs(long timeoutMs)
TransformationOptionssetTimeoutMs in interface TransformationOptionstimeoutMs - in milliseconds. If less than or equal to zero (the default)
there is no timeout.
If greater than zero the readLimitTimeMs must not be set.public int getPageLimit()
TransformationOptionsgetPageLimit in interface TransformationOptionspublic void setPageLimit(int pageLimit)
TransformationOptionssetPageLimit in interface TransformationOptionspageLimit - the number of pages to be read from the source. If less
than or equal to zero (the default) no limit is applied.public void setIncludeEmbedded(Boolean includeEmbedded)
TransformationOptionssetIncludeEmbedded in interface TransformationOptionsincludeEmbedded - the include embedded flag.public Boolean getIncludeEmbedded()
TransformationOptionsgetIncludeEmbedded in interface TransformationOptionspublic Map<String,Serializable> getAdditionalOptions()
TransformationOptionsgetAdditionalOptions in interface TransformationOptionspublic void setAdditionalOptions(Map<String,Serializable> additionalOptions)
TransformationOptionssetAdditionalOptions in interface TransformationOptionsadditionalOptions - the additional options mapprotected String toStringSourceOptions()
We can't rely on a framework here because we need full serialization for messaging.
Copyright © 2017 Alfresco Software. All rights reserved.