Class LocalTransformServiceRegistry

    • Constructor Detail

      • LocalTransformServiceRegistry

        public LocalTransformServiceRegistry()
    • Method Detail

      • setPipelineConfigDir

        public void setPipelineConfigDir​(java.lang.String pipelineConfigDir)
      • getPipelineConfigDir

        public java.lang.String getPipelineConfigDir()
      • setProperties

        public void setProperties​(java.util.Properties properties)
        The Alfresco global properties.
      • setMimetypeService

        public void setMimetypeService​(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
      • getMimetypeService

        public org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
      • setTransformerDebug

        public void setTransformerDebug​(TransformerDebug transformerDebug)
      • setStrictMimeTypeCheck

        public void setStrictMimeTypeCheck​(boolean strictMimeTypeCheck)
      • setRetryTransformOnDifferentMimeType

        public void setRetryTransformOnDifferentMimeType​(boolean retryTransformOnDifferentMimeType)
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class TransformServiceRegistryImpl
        Throws:
        java.lang.Exception
      • getBaseUrlIfTesting

        protected java.lang.String getBaseUrlIfTesting​(java.lang.String name,
                                                       java.lang.String baseUrl)
      • getProperty

        protected java.lang.String getProperty​(java.lang.String name,
                                               java.lang.String defaultValue)
        Gets a property from an alfresco global property but falls back to a System property with the same name to allow dynamic creation of transformers without having to have an AMP to add the alfresco global property.
      • getMaxSize

        public long getMaxSize​(java.lang.String sourceMimetype,
                               java.lang.String targetMimetype,
                               java.util.Map<java.lang.String,​java.lang.String> options,
                               java.lang.String renditionName)
        Description copied from interface: TransformServiceRegistry
        Returns the maximun size (in bytes) of the source content that can be transformed.
        Specified by:
        getMaxSize in interface TransformServiceRegistry
        Overrides:
        getMaxSize in class TransformServiceRegistryImpl
        Parameters:
        sourceMimetype - the mimetype of the source content
        targetMimetype - the mimetype of the target
        options - the actual name value pairs available that could be passed to the Transform Service.
        renditionName - (optional) name for the set of options and target mimetype. If supplied is used to cache results to avoid having to work out if a given transformation is supported a second time. The sourceMimetype and sourceSizeInBytes may still change. In the case of ACS this is the rendition name.
        Returns:
        the maximum size (in bytes) of the source content that can be transformed. If -1 there is no limit, but if 0 the transform is not supported.
      • transform

        public void transform​(org.alfresco.service.cmr.repository.ContentReader reader,
                              org.alfresco.service.cmr.repository.ContentWriter writer,
                              java.util.Map<java.lang.String,​java.lang.String> actualOptions,
                              java.lang.String renditionName,
                              org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getLocalTransform

        public LocalTransform getLocalTransform​(java.util.Map<java.lang.String,​java.lang.String> actualOptions,
                                                java.lang.String renditionName,
                                                java.lang.String sourceMimetype,
                                                java.lang.String targetMimetype,
                                                long sourceSizeInBytes)