Class RuntimeExecutableContentTransformerWorker

  • All Implemented Interfaces:
    ContentTransformerWorker, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

    @Deprecated
    @AlfrescoPublicApi
    public class RuntimeExecutableContentTransformerWorker
    extends ContentTransformerHelper
    implements ContentTransformerWorker, org.springframework.beans.factory.InitializingBean
    Deprecated.
    The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
    This configurable wrapper is able to execute any command line transformation that accepts an input and an output file on the command line.

    The following parameters are use:

    • target - full path to the source file
    • source - full path to the target file
    Provided that the command executed ultimately transforms the source file and leaves the result in the target file, the transformation should be successful.

    NOTE: It is only the contents of the files that can be transformed. Any attempt to modify the source or target file metadata will, at best, have no effect, but may ultimately lead to the transformation failing. This is because the files provided are both temporary files that reside in a location outside the system's content store.

    This transformer requires the setting of the explicitTransformations property.

    Since:
    1.1
    Author:
    Derek Hulley
    See Also:
    RuntimeExec
    • Constructor Detail

      • RuntimeExecutableContentTransformerWorker

        public RuntimeExecutableContentTransformerWorker()
        Deprecated.
    • Method Detail

      • setCheckCommand

        public void setCheckCommand​(org.alfresco.util.exec.RuntimeExec checkCommand)
        Deprecated.
        Set the runtime executer that will be called as part of the initialisation to determine if the transformer is able to function. This is optional, but allows the transformer registry to detect and avoid using this instance if it is not working.

        The command will be considered to have failed if the

        Parameters:
        checkCommand - the initialisation check command
      • setTransformCommand

        public void setTransformCommand​(org.alfresco.util.exec.RuntimeExec transformCommand)
        Deprecated.
        Set the runtime executer that will called to perform the actual transformation.
        Parameters:
        transformCommand - the runtime transform command
      • setErrorCodes

        public void setErrorCodes​(java.lang.String errCodesStr)
        Deprecated.
        A comma or space separated list of values that, if returned by the executed command, indicate an error value. This defaults to "1, 2".
        Parameters:
        errCodesStr - String
      • afterPropertiesSet

        public void afterPropertiesSet()
        Deprecated.
        Executes the check command, if present. Any errors will result in this component being rendered unusable within the transformer registry, but may still be called directly.
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • isAvailable

        public boolean isAvailable()
        Deprecated.
        Signals whether this transformer is available.
        Specified by:
        isAvailable in interface ContentTransformerWorker
        Returns:
        true, if is available
      • getVersionString

        public java.lang.String getVersionString()
        Deprecated.
        Gets the version string captured from the check command.
        Specified by:
        getVersionString in interface ContentTransformerWorker
        Returns:
        the version string