Class TransformationOptions

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    ImageTransformationOptions, RuntimeExecutableContentTransformerOptions, SWFTransformationOptions

    @Deprecated
    @AlfrescoPublicApi
    public class TransformationOptions
    extends java.lang.Object
    implements java.lang.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
    • Constructor Summary

      Constructors 
      Constructor Description
      TransformationOptions()
      Deprecated.
      Default constructor
      TransformationOptions​(java.util.Map<java.lang.String,​java.lang.Object> optionsMap)
      Deprecated.
      Constructor.
      TransformationOptions​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, org.alfresco.service.namespace.QName sourceContentProperty, org.alfresco.service.cmr.repository.NodeRef targetNodeRef, org.alfresco.service.namespace.QName targetContentProperty)
      Deprecated.
      Constructor
      TransformationOptions​(TransformationOptions options)
      Deprecated.
      Deep clone constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addSourceOptions​(TransformationSourceOptions sourceOptions)
      Deprecated.
      Adds the given sourceOptions to the sourceOptionsMap.
      protected TransformationOptions clone()
      Deprecated.
       
      void copyFrom​(TransformationOptions otherOptions)
      Deprecated.
      Does the work of copying the given other TransformationOptions values to this one
      TransformationOptions deepCopy()
      Deprecated.
      Creates a clone of the TransformationOptions
      boolean equals​(java.lang.Object obj)
      Deprecated.
       
      java.lang.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.
      TransformationOptionLimits getLimits()
      Deprecated.
      Returns max and limit values for time, size and pages in a single operation.
      int getMaxPages()
      Deprecated.
      Get the maximum number of pages read before an exception is thrown.
      long getMaxSourceSizeKBytes()
      Deprecated.
      Gets the maximum source content size, to skip transformations where the source is just too large to expect it to perform.
      int getPageLimit()
      Deprecated.
      Get the page limit before returning EOF.
      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.
      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.
      org.alfresco.service.namespace.QName getSourceContentProperty()
      Deprecated.
      Get the source content property
      org.alfresco.service.cmr.repository.NodeRef getSourceNodeRef()
      Deprecated.
      Gets the source node reference
      <T extends TransformationSourceOptions>
      T
      getSourceOptions​(java.lang.Class<T> clazz)
      Deprecated.
      Gets the appropriate source options for the given mimetype if available.
      java.util.Collection<TransformationSourceOptions> getSourceOptionsList()
      Deprecated.
      Gets the immutable list of source options further describing how the source should be transformed based on its mimetype.
      protected java.util.Map<java.lang.Class<? extends TransformationSourceOptions>,​TransformationSourceOptions> getSourceOptionsMap()
      Deprecated.
      Gets the map of source options further describing how the source should be transformed based on its mimetype
      org.alfresco.service.namespace.QName getTargetContentProperty()
      Deprecated.
      Get the target content property
      org.alfresco.service.cmr.repository.NodeRef getTargetNodeRef()
      Deprecated.
      Get the target node reference
      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).
      java.lang.String getUse()
      Deprecated.
      The use to which the transform will be put.
      int hashCode()
      Deprecated.
       
      void set​(java.util.Map<java.lang.String,​java.lang.Object> optionsMap)
      Deprecated.
      Sets options from the supplied map.
      void setIncludeEmbedded​(java.lang.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.
      void setLimits​(TransformationOptionLimits limits)
      Deprecated.
      Sets max and limit values for time, size and pages in a single operation.
      void setMaxPages​(int maxPages)
      Deprecated.
      Set the number of pages read from the source before an exception is thrown.
      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.
      void setPageLimit​(int pageLimit)
      Deprecated.
      Set the number of pages read from the source before returning EOF.
      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.
      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.
      void setSourceContentProperty​(org.alfresco.service.namespace.QName sourceContentProperty)
      Deprecated.
      Set the source content property
      void setSourceNodeRef​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
      Deprecated.
      Set the source node reference
      void setSourceOptionsList​(java.util.Collection<TransformationSourceOptions> sourceOptionsList)
      Deprecated.
      Sets the list of source options further describing how the source should be transformed based on its mimetype.
      void setTargetContentProperty​(org.alfresco.service.namespace.QName targetContentProperty)
      Deprecated.
      Set the target content property
      void setTargetNodeRef​(org.alfresco.service.cmr.repository.NodeRef targetNodeRef)
      Deprecated.
      Set the taget node reference
      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.
      void setUse​(java.lang.String use)
      Deprecated.
      The use to which the transform will be put.
      java.util.Map<java.lang.String,​java.lang.Object> toMap()
      Deprecated.
      Convert the transformation options into a map.
      java.lang.String toString()
      Deprecated.
       
      java.lang.String toString​(boolean includeLimits)
      Deprecated.
       
      java.lang.String toStringAll()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • OPT_SOURCE_NODEREF

        public static final java.lang.String OPT_SOURCE_NODEREF
        Deprecated.
        Option map names to preserve backward compatibility
        See Also:
        Constant Field Values
      • OPT_SOURCE_CONTENT_PROPERTY

        public static final java.lang.String OPT_SOURCE_CONTENT_PROPERTY
        Deprecated.
        See Also:
        Constant Field Values
      • OPT_TARGET_NODEREF

        public static final java.lang.String OPT_TARGET_NODEREF
        Deprecated.
        See Also:
        Constant Field Values
      • OPT_TARGET_CONTENT_PROPERTY

        public static final java.lang.String OPT_TARGET_CONTENT_PROPERTY
        Deprecated.
        See Also:
        Constant Field Values
      • OPT_INCLUDE_EMBEDDED

        public static final java.lang.String OPT_INCLUDE_EMBEDDED
        Deprecated.
        See Also:
        Constant Field Values
      • relaxedBooleanTypeConverter

        public static org.alfresco.service.cmr.repository.datatype.TypeConverter.Converter<java.lang.String,​java.lang.Boolean> relaxedBooleanTypeConverter
        Deprecated.
    • Constructor Detail

      • TransformationOptions

        public TransformationOptions()
        Deprecated.
        Default constructor
      • TransformationOptions

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

        public TransformationOptions​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
                                     org.alfresco.service.namespace.QName sourceContentProperty,
                                     org.alfresco.service.cmr.repository.NodeRef targetNodeRef,
                                     org.alfresco.service.namespace.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​(java.util.Map<java.lang.String,​java.lang.Object> optionsMap)
        Deprecated.
        Constructor. Creates a transformation options object from a map. Provided for back ward compatibility.
        Parameters:
        optionsMap - options map
    • Method Detail

      • clone

        protected TransformationOptions clone()
                                       throws java.lang.CloneNotSupportedException
        Deprecated.
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.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​(java.util.Map<java.lang.String,​java.lang.Object> optionsMap)
        Deprecated.
        Sets options from the supplied map.
      • setSourceNodeRef

        public void setSourceNodeRef​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
        Deprecated.
        Set the source node reference
        Parameters:
        sourceNodeRef - the source node reference
      • getSourceNodeRef

        public org.alfresco.service.cmr.repository.NodeRef getSourceNodeRef()
        Deprecated.
        Gets the source node reference
        Returns:
        NodeRef the source node reference
      • setSourceContentProperty

        public void setSourceContentProperty​(org.alfresco.service.namespace.QName sourceContentProperty)
        Deprecated.
        Set the source content property
        Parameters:
        sourceContentProperty - the source content property
      • getSourceContentProperty

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

        public void setTargetNodeRef​(org.alfresco.service.cmr.repository.NodeRef targetNodeRef)
        Deprecated.
        Set the taget node reference
        Parameters:
        targetNodeRef - the target node reference
      • getTargetNodeRef

        public org.alfresco.service.cmr.repository.NodeRef getTargetNodeRef()
        Deprecated.
        Get the target node reference
        Returns:
        the target node reference
      • setTargetContentProperty

        public void setTargetContentProperty​(org.alfresco.service.namespace.QName targetContentProperty)
        Deprecated.
        Set the target content property
        Parameters:
        targetContentProperty - the target content property
      • getTargetContentProperty

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

        public void setIncludeEmbedded​(java.lang.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 java.lang.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​(java.lang.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 java.lang.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 java.util.Map<java.lang.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
      • setSourceOptionsList

        public void setSourceOptionsList​(java.util.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​(java.lang.Class<T> clazz)
        Deprecated.
        Gets the appropriate source options for the given mimetype if available.
        Returns:
        the source options for the mimetype
      • toString

        public java.lang.String toString​(boolean includeLimits)
        Deprecated.
      • toString

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

        public java.lang.String toStringAll()
        Deprecated.
      • hashCode

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

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