Class TransformationOptions
java.lang.Object
org.alfresco.service.cmr.repository.TransformationOptions
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ImageTransformationOptions,RuntimeExecutableContentTransformerOptions,SWFTransformationOptions
@Deprecated
@AlfrescoPublicApi
public class TransformationOptions
extends Object
implements Cloneable
Deprecated.
The RenditionService is being replace by the simpler async RenditionService2.
Class containing values of options that are passed to content transformers. These options
are used to determine the applicability of a content transformer and also during the
transformation process to provide context or parameter values.
This base class provides some common, optional contextual information about the source and target nodes and properties used by the transformation.
- Since:
- 3.0.0
- Author:
- Roy Wetherall
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.static final StringDeprecated.Option map names to preserve backward compatibilitystatic final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static TypeConverter.Converter<String,Boolean> Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Default constructorTransformationOptions(Map<String, Object> optionsMap) Deprecated.Constructor.TransformationOptions(NodeRef sourceNodeRef, QName sourceContentProperty, NodeRef targetNodeRef, QName targetContentProperty) Deprecated.ConstructorDeprecated.Deep clone constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSourceOptions(TransformationSourceOptions sourceOptions) Deprecated.Adds the given sourceOptions to the sourceOptionsMap.protected TransformationOptionsclone()Deprecated.voidcopyFrom(TransformationOptions otherOptions) Deprecated.Does the work of copying the given other TransformationOptions values to this onedeepCopy()Deprecated.Creates a clone of the TransformationOptionsbooleanDeprecated.Deprecated.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.Deprecated.Returns max and limit values for time, size and pages in a single operation.intDeprecated.Get the maximum number of pages read before an exception is thrown.longDeprecated.Gets the maximum source content size, to skip transformations where the source is just too large to expect it to perform.intDeprecated.Get the page limit before returning EOF.longDeprecated.Gets the limit in terms of the about of data read to limit transformations where only the start of the content is needed.longDeprecated.Gets the limit in terms of the amount of data read (by time) to limit transformations where only the start of the content is needed.Deprecated.Get the source content propertyDeprecated.Gets the source node reference<T extends TransformationSourceOptions>
TgetSourceOptions(Class<T> clazz) Deprecated.Gets the appropriate source options for the given mimetype if available.Deprecated.Gets the immutable list of source options further describing how the source should be transformed based on its mimetype.protected Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> Deprecated.Gets the map of source options further describing how the source should be transformed based on its mimetypeDeprecated.Get the target content propertyDeprecated.Get the target node referencelongDeprecated.Gets the timeout (ms) on the InputStream after which an IOExecption is thrown to terminate very slow transformations or a subprocess is terminated (killed).getUse()Deprecated.The use to which the transform will be put.inthashCode()Deprecated.voidDeprecated.Sets options from the supplied map.voidsetIncludeEmbedded(Boolean includeEmbedded) Deprecated.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.voidsetLimits(TransformationOptionLimits limits) Deprecated.Sets max and limit values for time, size and pages in a single operation.voidsetMaxPages(int maxPages) Deprecated.Set the number of pages read from the source before an exception is thrown.voidsetMaxSourceSizeKBytes(long maxSourceSizeKBytes) Deprecated.Sets a maximum source content size, to skip transformations where the source is just too large to expect it to perform.voidsetPageLimit(int pageLimit) Deprecated.Set the number of pages read from the source before returning EOF.voidsetReadLimitKBytes(long readLimitKBytes) Deprecated.Sets a limit in terms of the about of data read to limit transformations where only the start of the content is needed.voidsetReadLimitTimeMs(long readLimitTimeMs) Deprecated.Sets a limit in terms of the amount of data read (by time) to limit transformations where only the start of the content is needed.voidsetSourceContentProperty(QName sourceContentProperty) Deprecated.Set the source content propertyvoidsetSourceNodeRef(NodeRef sourceNodeRef) Deprecated.Set the source node referencevoidsetSourceOptionsList(Collection<TransformationSourceOptions> sourceOptionsList) Deprecated.Sets the list of source options further describing how the source should be transformed based on its mimetype.voidsetTargetContentProperty(QName targetContentProperty) Deprecated.Set the target content propertyvoidsetTargetNodeRef(NodeRef targetNodeRef) Deprecated.Set the taget node referencevoidsetTimeoutMs(long timeoutMs) Deprecated.Sets a timeout (ms) on the InputStream after which an IOExecption is thrown to terminate very slow transformations or to terminate (kill) a subprocess.voidDeprecated.The use to which the transform will be put.toMap()Deprecated.Convert the transformation options into a map.toString()Deprecated.toString(boolean includeLimits) Deprecated.Deprecated.
-
Field Details
-
OPT_SOURCE_NODEREF
Deprecated.Option map names to preserve backward compatibility- See Also:
-
OPT_SOURCE_CONTENT_PROPERTY
Deprecated.- See Also:
-
OPT_TARGET_NODEREF
Deprecated.- See Also:
-
OPT_TARGET_CONTENT_PROPERTY
Deprecated.- See Also:
-
OPT_INCLUDE_EMBEDDED
Deprecated.- See Also:
-
OPT_USE
Deprecated.- See Also:
-
relaxedBooleanTypeConverter
Deprecated.
-
-
Constructor Details
-
TransformationOptions
public TransformationOptions()Deprecated.Default constructor -
TransformationOptions
Deprecated.Deep clone constructor -
TransformationOptions
public TransformationOptions(NodeRef sourceNodeRef, QName sourceContentProperty, NodeRef targetNodeRef, QName targetContentProperty) Deprecated.Constructor- Parameters:
sourceNodeRef- the source node referencesourceContentProperty- the source content propertytargetNodeRef- the target node referencetargetContentProperty- the target content property
-
TransformationOptions
Deprecated.Constructor. Creates a transformation options object from a map. Provided for back ward compatibility.- Parameters:
optionsMap- options map
-
-
Method Details
-
clone
Deprecated.- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
copyFrom
Deprecated.Does the work of copying the given other TransformationOptions values to this one- Parameters:
otherOptions- the options to copy
-
deepCopy
Deprecated.Creates a clone of the TransformationOptions- Returns:
- a copy of the options
-
set
Deprecated.Sets options from the supplied map. -
setSourceNodeRef
Deprecated.Set the source node reference- Parameters:
sourceNodeRef- the source node reference
-
getSourceNodeRef
Deprecated.Gets the source node reference- Returns:
- NodeRef the source node reference
-
setSourceContentProperty
Deprecated.Set the source content property- Parameters:
sourceContentProperty- the source content property
-
getSourceContentProperty
Deprecated.Get the source content property- Returns:
- the source content property
-
setTargetNodeRef
Deprecated.Set the taget node reference- Parameters:
targetNodeRef- the target node reference
-
getTargetNodeRef
Deprecated.Get the target node reference- Returns:
- the target node reference
-
setTargetContentProperty
Deprecated.Set the target content property- Parameters:
targetContentProperty- the target content property
-
getTargetContentProperty
Deprecated.Get the target content property- Returns:
- the target property
-
setIncludeEmbedded
Deprecated.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.- Parameters:
includeEmbedded- the include embedded flag.
-
getIncludeEmbedded
Deprecated.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.- Returns:
- true, false, or null for the default for the transformer
-
setUse
Deprecated.The use to which the transform will be put. Initially used to select different transformation limits depending on the use: "Index", "Preview"...- Parameters:
use- to which the transform will be put.
-
getUse
Deprecated.The use to which the transform will be put. Initially used to select different transformation limits depending on the use: "Index", "Preview"...- Returns:
- the use - may be null
-
getTimeoutMs
public long getTimeoutMs()Deprecated.Gets the timeout (ms) on the InputStream after which an IOExecption is thrown to terminate very slow transformations or a subprocess is terminated (killed).- Returns:
- timeoutMs in milliseconds. If less than or equal to zero (the default) there is no timeout.
-
setTimeoutMs
public void setTimeoutMs(long timeoutMs) Deprecated.Sets a timeout (ms) on the InputStream after which an IOExecption is thrown to terminate very slow transformations or to terminate (kill) a subprocess.- Parameters:
timeoutMs- in milliseconds. If less than or equal to zero (the default) there is no timeout. If greater than zero thereadLimitTimeMsmust not be set.
-
getReadLimitTimeMs
public long getReadLimitTimeMs()Deprecated.Gets the limit in terms of the amount of data read (by time) to limit transformations where only the start of the content is needed. After this limit is reached the InputStream reports end of file.- Returns:
- readLimitBytes if less than or equal to zero (the default) there is no limit.
-
setReadLimitTimeMs
public void setReadLimitTimeMs(long readLimitTimeMs) Deprecated.Sets a limit in terms of the amount of data read (by time) to limit transformations where only the start of the content is needed. After this limit is reached the InputStream reports end of file.- Parameters:
readLimitTimeMs- if less than or equal to zero (the default) there is no limit. If greater than zero thetimeoutMsmust not be set.
-
getMaxSourceSizeKBytes
public long getMaxSourceSizeKBytes()Deprecated.Gets the maximum source content size, to skip transformations where the source is just too large to expect it to perform. If the source is larger the transformer indicates it is not available.- Returns:
- maxSourceSizeKBytes if less than or equal to zero (the default) there is no limit.
-
setMaxSourceSizeKBytes
public void setMaxSourceSizeKBytes(long maxSourceSizeKBytes) Deprecated.Sets a maximum source content size, to skip transformations where the source is just too large to expect it to perform. If the source is larger the transformer indicates it is not available.- Parameters:
maxSourceSizeKBytes- if less than or equal to zero (the default) there is no limit. If greater than zero thereadLimitKBytesmust not be set.
-
getReadLimitKBytes
public long getReadLimitKBytes()Deprecated.Gets the limit in terms of the about of data read to limit transformations where only the start of the content is needed. After this limit is reached the InputStream reports end of file.- Returns:
- readLimitKBytes if less than or equal to zero (the default) no limit should be applied.
-
setReadLimitKBytes
public void setReadLimitKBytes(long readLimitKBytes) Deprecated.Sets a limit in terms of the about of data read to limit transformations where only the start of the content is needed. After this limit is reached the InputStream reports end of file.- Parameters:
readLimitKBytes- if less than or equal to zero (the default) there is no limit. If greater than zero themaxSourceSizeKBytesmust not be set.
-
getMaxPages
public int getMaxPages()Deprecated.Get the maximum number of pages read before an exception is thrown.- Returns:
- If less than or equal to zero (the default) no limit should be applied.
-
setMaxPages
public void setMaxPages(int maxPages) Deprecated.Set the number of pages read from the source before an exception is thrown.- Parameters:
maxPages- the number of pages to be read from the source. If less than or equal to zero (the default) no limit is applied.
-
getPageLimit
public int getPageLimit()Deprecated.Get the page limit before returning EOF.- Returns:
- If less than or equal to zero (the default) no limit should be applied.
-
setPageLimit
public void setPageLimit(int pageLimit) Deprecated.Set the number of pages read from the source before returning EOF.- Parameters:
pageLimit- the number of pages to be read from the source. If less than or equal to zero (the default) no limit is applied.
-
getLimits
Deprecated.Returns max and limit values for time, size and pages in a single operation. -
setLimits
Deprecated.Sets max and limit values for time, size and pages in a single operation. -
getSourceOptionsMap
protected Map<Class<? extends TransformationSourceOptions>,TransformationSourceOptions> getSourceOptionsMap()Deprecated.Gets the map of source options further describing how the source should be transformed based on its mimetype- Returns:
- the source mimetype to source options map
-
getSourceOptionsList
Deprecated.Gets the immutable list of source options further describing how the source should be transformed based on its mimetype. UseaddSourceOptions(TransformationSourceOptions)to add source options.- Returns:
- the source options list
-
setSourceOptionsList
Deprecated.Sets the list of source options further describing how the source should be transformed based on its mimetype.- Parameters:
sourceOptionsList- the source options list
-
addSourceOptions
Deprecated.Adds the given sourceOptions to the sourceOptionsMap.Note that if source options of the same class already exists a new merged source options object is added.
- Parameters:
sourceOptions- TransformationSourceOptions
-
getSourceOptions
Deprecated.Gets the appropriate source options for the given mimetype if available.- Returns:
- the source options for the mimetype
-
toMap
Deprecated.Convert the transformation options into a map.Basic options (optional) are:
OPT_SOURCE_NODEREFOPT_SOURCE_CONTENT_PROPERTYOPT_TARGET_NODEREFOPT_TARGET_CONTENT_PROPERTYOPT_INCLUDE_EMBEDDEDOPT_USETransformationOptionLimits.OPT_TIMEOUT_MSTransformationOptionLimits.OPT_READ_LIMIT_TIME_MSTransformationOptionLimits.OPT_MAX_SOURCE_SIZE_K_BYTESTransformationOptionLimits.OPT_READ_LIMIT_K_BYTESTransformationOptionLimits.OPT_MAX_PAGESTransformationOptionLimits.OPT_PAGE_LIMIT
Override this method to append option values to the map. Derived classes should call the base class before appending further values and returning the result.
-
toString
Deprecated. -
toString
Deprecated. -
toStringAll
Deprecated. -
hashCode
public int hashCode()Deprecated. -
equals
Deprecated.
-