public class TransformationOptionsImpl extends Object implements TransformationOptions
| Modifier and Type | Field and Description |
|---|---|
protected static String |
TO_STR_DEL |
protected static String |
TO_STR_KEY_VAL |
protected static String |
TO_STR_OBJ_END |
protected static String |
TO_STR_OBJ_START |
protected static String |
TO_STR_SET_END |
protected static String |
TO_STR_SET_START |
| Constructor and Description |
|---|
TransformationOptionsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSourceOptions(TransformationSourceOptions sourceOptions)
Adds the given sourceOptions to the sourceOptionsMap.
|
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 |
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 static String |
toString(Object object)
Builds the JSON toString of the given object through methods
annotated with
ToStringProperty. |
protected String |
toStringSourceOptions()
Builds the source options to string.
|
protected static final String TO_STR_KEY_VAL
protected static final String TO_STR_OBJ_START
protected static final String TO_STR_OBJ_END
protected static final String TO_STR_SET_START
protected static final String TO_STR_SET_END
protected static final String TO_STR_DEL
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 setIncludeEmbedded(Boolean includeEmbedded)
TransformationOptionssetIncludeEmbedded in interface TransformationOptionsincludeEmbedded - the include embedded flag.public Boolean getIncludeEmbedded()
TransformationOptionsgetIncludeEmbedded 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 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.
protected static String toString(Object object)
ToStringProperty.
We can't rely on a framework here because we need full serialization for messaging.
object - Copyright © 2014 Alfresco Software. All rights reserved.