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 Details

  • Constructor Details

    • TransformationOptions

      public TransformationOptions()
      Deprecated.
      Default constructor
    • TransformationOptions

      public TransformationOptions(TransformationOptions options)
      Deprecated.
      Deep clone constructor
    • TransformationOptions

      public TransformationOptions(NodeRef sourceNodeRef, QName sourceContentProperty, NodeRef targetNodeRef, QName targetContentProperty)
      Deprecated.
      Constructor
      Parameters:
      sourceNodeRef - the source node reference
      sourceContentProperty - the source content property
      targetNodeRef - the target node reference
      targetContentProperty - the target content property
    • TransformationOptions

      public TransformationOptions(Map<String,Object> optionsMap)
      Deprecated.
      Constructor. Creates a transformation options object from a map. Provided for back ward compatibility.
      Parameters:
      optionsMap - options map
  • Method Details

    • clone

      Deprecated.
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • copyFrom

      public void copyFrom(TransformationOptions otherOptions)
      Deprecated.
      Does the work of copying the given other TransformationOptions values to this one
      Parameters:
      otherOptions - the options to copy
    • deepCopy

      public TransformationOptions deepCopy()
      Deprecated.
      Creates a clone of the TransformationOptions
      Returns:
      a copy of the options
    • set

      public void set(Map<String,Object> optionsMap)
      Deprecated.
      Sets options from the supplied map.
    • setSourceNodeRef

      public void setSourceNodeRef(NodeRef sourceNodeRef)
      Deprecated.
      Set the source node reference
      Parameters:
      sourceNodeRef - the source node reference
    • getSourceNodeRef

      public NodeRef getSourceNodeRef()
      Deprecated.
      Gets the source node reference
      Returns:
      NodeRef the source node reference
    • setSourceContentProperty

      public void setSourceContentProperty(QName sourceContentProperty)
      Deprecated.
      Set the source content property
      Parameters:
      sourceContentProperty - the source content property
    • getSourceContentProperty

      public QName getSourceContentProperty()
      Deprecated.
      Get the source content property
      Returns:
      the source content property
    • setTargetNodeRef

      public void setTargetNodeRef(NodeRef targetNodeRef)
      Deprecated.
      Set the taget node reference
      Parameters:
      targetNodeRef - the target node reference
    • getTargetNodeRef

      public NodeRef getTargetNodeRef()
      Deprecated.
      Get the target node reference
      Returns:
      the target node reference
    • setTargetContentProperty

      public void setTargetContentProperty(QName targetContentProperty)
      Deprecated.
      Set the target content property
      Parameters:
      targetContentProperty - the target content property
    • getTargetContentProperty

      public QName getTargetContentProperty()
      Deprecated.
      Get the target content property
      Returns:
      the target property
    • setIncludeEmbedded

      public void setIncludeEmbedded(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.
      Parameters:
      includeEmbedded - the include embedded flag.
    • getIncludeEmbedded

      public Boolean 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

      public void setUse(String use)
      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

      public String 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 the readLimitTimeMs must 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 the timeoutMs must 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 the readLimitKBytes must 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 the maxSourceSizeKBytes must 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

      public TransformationOptionLimits getLimits()
      Deprecated.
      Returns max and limit values for time, size and pages in a single operation.
    • setLimits

      public void setLimits(TransformationOptionLimits limits)
      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

      public Collection<TransformationSourceOptions> getSourceOptionsList()
      Deprecated.
      Gets the immutable list of source options further describing how the source should be transformed based on its mimetype. Use addSourceOptions(TransformationSourceOptions) to add source options.
      Returns:
      the source options list
    • setSourceOptionsList

      public void setSourceOptionsList(Collection<TransformationSourceOptions> sourceOptionsList)
      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

      public void addSourceOptions(TransformationSourceOptions sourceOptions)
      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

      public <T extends TransformationSourceOptions> T getSourceOptions(Class<T> clazz)
      Deprecated.
      Gets the appropriate source options for the given mimetype if available.
      Returns:
      the source options for the mimetype
    • toMap

      public Map<String,Object> toMap()
      Deprecated.
    • toString

      public String toString(boolean includeLimits)
      Deprecated.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • toStringAll

      public String toStringAll()
      Deprecated.
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Deprecated.
      Overrides:
      equals in class Object