Class TransformerConfigImpl

  • All Implemented Interfaces:
    java.util.EventListener, TransformerConfig, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener

    @Deprecated
    public class TransformerConfigImpl
    extends org.springframework.extensions.surf.util.AbstractLifecycleBean
    implements TransformerConfig
    Deprecated.
    The RenditionService is being replace by the simpler async RenditionService2.
    Provides access to transformer configuration and current performance data.
    Author:
    Alan Davis
    • Constructor Detail

      • TransformerConfigImpl

        public TransformerConfigImpl()
        Deprecated.
    • Method Detail

      • setMimetypeService

        public void setMimetypeService​(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
        Deprecated.
        Sets of the mimetype service.
        Parameters:
        mimetypeService -
      • setContentService

        public void setContentService​(ContentService contentService)
        Deprecated.
      • setContentTransformerRegistry

        public void setContentTransformerRegistry​(ContentTransformerRegistry transformerRegistry)
        Deprecated.
      • setTransformerDebug

        public void setTransformerDebug​(TransformerDebug transformerDebug)
        Deprecated.
      • setTransformerLog

        public void setTransformerLog​(TransformerLog transformerLog)
        Deprecated.
      • setTransformerDebugLog

        public void setTransformerDebugLog​(TransformerDebugLog transformerDebugLog)
        Deprecated.
      • setGlobalProperties

        public void setGlobalProperties​(java.util.Properties globalProperties)
        Deprecated.
      • setModuleService

        public void setModuleService​(ModuleService moduleService)
        Deprecated.
      • setDescriptorService

        public void setDescriptorService​(DescriptorService descriptorService)
        Deprecated.
      • initialise

        public void initialise()
        Deprecated.
        Called by spring after bean is initialised.
      • onBootstrap

        protected void onBootstrap​(org.springframework.context.ApplicationEvent event)
        Deprecated.
        Specified by:
        onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBean
      • onShutdown

        protected void onShutdown​(org.springframework.context.ApplicationEvent event)
        Deprecated.
        Specified by:
        onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBean
      • getProperty

        public java.lang.String getProperty​(java.lang.String name)
        Deprecated.
        Returns a transformer property value.
        Specified by:
        getProperty in interface TransformerConfig
        Parameters:
        name - of the property.
        Returns:
        a transformer property or null if not set.
      • getProperties

        public java.lang.String getProperties​(boolean changesOnly)
        Deprecated.
        Description copied from interface: TransformerConfig
        Returns a sorted set of all transformer properties, their values and includes comments about the properties.
        Specified by:
        getProperties in interface TransformerConfig
        Parameters:
        changesOnly - only custom values will be included.
        Returns:
        a multi-line String which is never {code null}.
      • setProperties

        public int setProperties​(java.lang.String propertyNamesAndValues)
        Deprecated.
        Sets a transformer property values. These will be stored in the database but on an MBean reset is cleared.
        Specified by:
        setProperties in interface TransformerConfig
        Parameters:
        propertyNamesAndValues - new line separated name and values
        Returns:
        the number of properties set.
      • removeProperties

        public int removeProperties​(java.lang.String propertyNames)
        Deprecated.
        Description copied from interface: TransformerConfig
        Removes transformer properties.
        Specified by:
        removeProperties in interface TransformerConfig
        Parameters:
        propertyNames - new line separated names. Any values will be ignored.
        Returns:
        the number of properties removed.
      • getStatistics

        public TransformerStatistics getStatistics​(ContentTransformer transformer,
                                                   java.lang.String sourceMimetype,
                                                   java.lang.String targetMimetype,
                                                   boolean createNew)
        Deprecated.
        Returns and creates if needed the TransformerStatistics object for the combination of transformer, sourceMimetype and targetMimetype. When transformer is null this is the system wide summary object for a combination of sourceMimetype and targetMimetype. When both sourceMimetype and targetMimetype are null this is the transformer's summary object. When all three parameters are null this is the system wide summary for all transformers.
        Specified by:
        getStatistics in interface TransformerConfig
        Parameters:
        transformer - the transformer for which data is being recorded.
        sourceMimetype - the source mimetype.
        targetMimetype - the source mimetype.
        createNew - indicates if a new object should be created if it does not exist.
        Returns:
        the requested TransformerStatistics.
      • getLimits

        public TransformationOptionLimits getLimits​(ContentTransformer transformer,
                                                    java.lang.String sourceMimetype,
                                                    java.lang.String targetMimetype,
                                                    java.lang.String use)
        Deprecated.
        Returns the limits defined for the combination of transformer, sourceMimetype and targetMimetype. When the transformer is null, this is a default value. When both sourceMimetype and targetMimetype are null this is a default for the specified transformer.
        Specified by:
        getLimits in interface TransformerConfig
        use - to which the limits will be put. For example "index", "webpreview", "doclib", "syncRule", "aysncRule". null is the default.
        Returns:
        the combined (takes into account defaults from higher levels) limits for the combination.
      • isSupportedTransformation

        public boolean isSupportedTransformation​(ContentTransformer transformer,
                                                 java.lang.String sourceMimetype,
                                                 java.lang.String targetMimetype,
                                                 TransformationOptions options)
        Deprecated.
        Returns true if the supplied mimetype transformation pair is allowed by the list of supported and unsupported transformations.
        Specified by:
        isSupportedTransformation in interface TransformerConfig
        options - not currently used
      • getPriority

        public int getPriority​(ContentTransformer transformer,
                               java.lang.String sourceMimetype,
                               java.lang.String targetMimetype)
        Deprecated.
        Returns the priority of the specified transformer for the the combination of source and target mimetype.
        Specified by:
        getPriority in interface TransformerConfig
        Returns:
        the priority. To support the historical concept of EXPLICIT transformers, all such transformers are given a TransformerConfig.PRIORITY_EXPLICIT (50). By default transformers have a default of 100.
      • getBlacklist

        public java.util.List<org.alfresco.service.cmr.repository.NodeRef> getBlacklist​(ContentTransformer transformer,
                                                                                        java.lang.String sourceMimetype,
                                                                                        java.lang.String targetMimetype)
        Deprecated.
        Returns a list of blacklisted NodeRefs of the specified transformer for the the combination of source and target mimetype.
        Specified by:
        getBlacklist in interface TransformerConfig
        Returns:
        the blacklist or null is none.
      • strictMimetypeCheck

        public boolean strictMimetypeCheck​(java.lang.String declaredMimetype,
                                           java.lang.String detectedMimetype)
        Deprecated.
        When strict mimetype checking is performed before a transformation, this method is called. There are a few issues with the Tika mimetype detection. As a result we still allow some transformations to take place even if there is a discrepancy between the detected and declared mimetypes.
        Specified by:
        strictMimetypeCheck in interface TransformerConfig
        Parameters:
        declaredMimetype - the mimetype on the source node
        detectedMimetype - returned by Tika having looked at the content.
        Returns:
        true if the transformation should take place. This includes the case where the detectedMimetype is null (returned by Tika when the mimetypes are the same), or the supplied pair of mimetypes have been added to the transformer.strict.mimetype.check.whitelist.
      • getThresholdCount

        public int getThresholdCount​(ContentTransformer transformer,
                                     java.lang.String sourceMimetype,
                                     java.lang.String targetMimetype)
        Deprecated.
        Returns the threshold of the transformer. It is only after this number of transformation attempts that the average time is used.
        Specified by:
        getThresholdCount in interface TransformerConfig
        Returns:
        the threshold.