Interface TransformerConfig

  • All Known Implementing Classes:
    TransformerConfigImpl

    @Deprecated
    @AlfrescoPublicApi
    public interface TransformerConfig
    Deprecated.
    The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
    Provides access to transformer configuration and current performance data.
    Author:
    Alan Davis
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Collection<java.lang.String> ALL_SUFFIXES
      Deprecated.
      All suffixes to property names used to transformer configuration
      static java.lang.String AMP
      Deprecated.
      The suffix to property names to indicate which Alfresco AMPs the transformer is available with.
      static java.lang.String ANY
      Deprecated.
      Wild card mimetype and mimetype extension.
      static java.lang.String AVAILABLE
      Deprecated.
      The suffix to property names to indicate that a transformer is available.
      static java.lang.String BLACKLIST
      Deprecated.
      The suffix to property names for the blacklist.
      static java.lang.String CONTENT
      Deprecated.
      Prefix before the transformer name of all property names that contain transformer information
      static java.lang.String DEBUG_ENTRIES
      Deprecated.
      The number of debug lines to keep.
      static java.lang.String DEFAULT_TRANSFORMER
      Deprecated.
      The 'transformer name' for system wide defaults for all transformers
      static java.lang.String EDITION
      Deprecated.
      The suffix to property names to indicate which Alfresco version the transformer is available with.
      static java.lang.String ENTRIES
      Deprecated.
       
      static java.lang.String ERROR_TIME
      Deprecated.
      The suffix to property names for the error time.
      static java.lang.String EXTENSIONS
      Deprecated.
      The separator between the transformer name and two mimetype extensions in a property name.
      static java.lang.String FAILOVER
      Deprecated.
      The suffix to property names for creating dynamic failover transformers
      static java.lang.String INITIAL_COUNT
      Deprecated.
      The suffix to property names for the the average count.
      static java.lang.String INITIAL_TIME
      Deprecated.
      The suffix to property names for the the average time.
      static java.lang.String[][] LIMIT_PAIR_SUFFIXES
      Deprecated.
      Suffix pairs (max and limit values) to property names used to define transformation limits
      static java.util.Collection<java.lang.String> LIMIT_SUFFIXES
      Deprecated.
      Suffixes to property names used to define transformation limits
      static java.lang.String LOG_ENTRIES
      Deprecated.
      The number of log lines to keep.
      static java.lang.String MAX_PAGES
      Deprecated.
       
      static java.lang.String MAX_SOURCE_SIZE_K_BYTES
      Deprecated.
      Suffixes for limits.
      static java.lang.String MIMETYPES
      Deprecated.
      The separator between the transformer name and wildcarded mimetypes rather than extensions in a property name.
      static java.util.Collection<java.lang.String> NO_SUFFIXES
      Deprecated.
      No suffixes to property names used to define transformer settings.
      static java.lang.String PAGE_LIMIT
      Deprecated.
       
      static char PIPE
      Deprecated.
      Separator between transformers and mimetype extensions in a dynamic compound property value.
      static java.lang.String PIPELINE
      Deprecated.
      The suffix to property names for creating dynamic complex transformers
      static java.lang.String PREFIX
      Deprecated.
      The combined content and transformer name prefix of for all property names that contain transformer information
      static java.lang.String PRIORITY
      Deprecated.
      The suffix to property names for the priority.
      static int PRIORITY_DEFAULT
      Deprecated.
      By default transformers have a priority of 100.
      static int PRIORITY_EXPLICIT
      Deprecated.
      To support the historical concept of EXPLICIT transformers, all such transformers are given a PRIORITY_EXPLICIT (50).
      static java.lang.String READ_LIMIT_K_BYTES
      Deprecated.
       
      static java.lang.String READ_LIMIT_TIME_MS
      Deprecated.
       
      static java.lang.String[] SEPARATORS
      Deprecated.
      Both extension and minetype separators.
      static java.lang.String STRICT_MIMETYPE_CHECK_WHITELIST_MIMETYPES
      Deprecated.
      A white list of declared and detected mimetypes, that don't match, but should still be transformed.
      static java.lang.String SUMMARY_TRANSFORMER_NAME
      Deprecated.
      Name given to the 'SUMMARY' dummy (does not exist) transformer that gathers data from all root level transformations
      static java.lang.String SUPPORTED
      Deprecated.
      The suffix to property names for supported and unsupported combinations.
      static java.lang.String THRESHOLD_COUNT
      Deprecated.
      The suffix to property names for the threshold count.
      static java.lang.String TIMEOUT_MS
      Deprecated.
       
      static java.lang.String TRANSFORMER
      Deprecated.
      Prefix for all transformer names
      static java.lang.String USE
      Deprecated.
      An optional separator appended after the normal suffix and following value that identifies the 'use' or 'application' of the property.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      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.
      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.
      int getPriority​(ContentTransformer contentTransformerHelper, 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.
      java.lang.String getProperties​(boolean changesOnly)
      Deprecated.
      Returns a sorted set of all transformer properties, their values and includes comments about the properties.
      java.lang.String getProperty​(java.lang.String name)
      Deprecated.
      Returns a transformer property value.
      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.
      int getThresholdCount​(ContentTransformer contentTransformerHelper, java.lang.String sourceMimetype, java.lang.String targetMimetype)
      Deprecated.
      Returns the threshold of the transformer.
      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.
      int removeProperties​(java.lang.String propertyNames)
      Deprecated.
      Removes transformer properties.
      int setProperties​(java.lang.String propertyNamesAndValues)
      Deprecated.
      Sets a transformer property values.
      boolean strictMimetypeCheck​(java.lang.String declaredMimetype, java.lang.String detectedMimetype)
      Deprecated.
      When strict mimetype checking is performed before a transformation, this method is called.
    • Field Detail

      • ANY

        static final java.lang.String ANY
        Deprecated.
        Wild card mimetype and mimetype extension.
        See Also:
        Constant Field Values
      • CONTENT

        static final java.lang.String CONTENT
        Deprecated.
        Prefix before the transformer name of all property names that contain transformer information
        See Also:
        Constant Field Values
      • TRANSFORMER

        static final java.lang.String TRANSFORMER
        Deprecated.
        Prefix for all transformer names
        See Also:
        Constant Field Values
      • PREFIX

        static final java.lang.String PREFIX
        Deprecated.
        The combined content and transformer name prefix of for all property names that contain transformer information
        See Also:
        Constant Field Values
      • DEFAULT_TRANSFORMER

        static final java.lang.String DEFAULT_TRANSFORMER
        Deprecated.
        The 'transformer name' for system wide defaults for all transformers
        See Also:
        Constant Field Values
      • SUMMARY_TRANSFORMER_NAME

        static final java.lang.String SUMMARY_TRANSFORMER_NAME
        Deprecated.
        Name given to the 'SUMMARY' dummy (does not exist) transformer that gathers data from all root level transformations
        See Also:
        Constant Field Values
      • USE

        static final java.lang.String USE
        Deprecated.
        An optional separator appended after the normal suffix and following value that identifies the 'use' or 'application' of the property. Example uses include 'index' 'doclib' and 'preview'. The corresponding configuration value is only used in the context of the specified usage.
        See Also:
        Constant Field Values
      • EXTENSIONS

        static final java.lang.String EXTENSIONS
        Deprecated.
        The separator between the transformer name and two mimetype extensions in a property name.
        See Also:
        Constant Field Values
      • MIMETYPES

        static final java.lang.String MIMETYPES
        Deprecated.
        The separator between the transformer name and wildcarded mimetypes rather than extensions in a property name. Effectively equivalent to multiple properties using the EXTENSIONS.
        See Also:
        Constant Field Values
      • SEPARATORS

        static final java.lang.String[] SEPARATORS
        Deprecated.
        Both extension and minetype separators.
      • PIPELINE

        static final java.lang.String PIPELINE
        Deprecated.
        The suffix to property names for creating dynamic complex transformers
        See Also:
        Constant Field Values
      • FAILOVER

        static final java.lang.String FAILOVER
        Deprecated.
        The suffix to property names for creating dynamic failover transformers
        See Also:
        Constant Field Values
      • AVAILABLE

        static final java.lang.String AVAILABLE
        Deprecated.
        The suffix to property names to indicate that a transformer is available. If not specified, defaults to true, indicating it may be selected rather only being available as a component of another transformer.
        See Also:
        Constant Field Values
      • PIPE

        static final char PIPE
        Deprecated.
        Separator between transformers and mimetype extensions in a dynamic compound property value.
        See Also:
        Constant Field Values
      • SUPPORTED

        static final java.lang.String SUPPORTED
        Deprecated.
        The suffix to property names for supported and unsupported combinations.
        See Also:
        Constant Field Values
      • PRIORITY

        static final java.lang.String PRIORITY
        Deprecated.
        The suffix to property names for the priority.
        See Also:
        Constant Field Values
      • BLACKLIST

        static final java.lang.String BLACKLIST
        Deprecated.
        The suffix to property names for the blacklist.
        See Also:
        Constant Field Values
      • EDITION

        static final java.lang.String EDITION
        Deprecated.
        The suffix to property names to indicate which Alfresco version the transformer is available with. If not specified it is not restricted. So if set to "Enterprise" it is not available to Community.
        See Also:
        AMP, Constant Field Values
      • AMP

        static final java.lang.String AMP
        Deprecated.
        The suffix to property names to indicate which Alfresco AMPs the transformer is available with. The value should be the AMP's ID. If not specified it is not restricted.
        See Also:
        EDITION, Constant Field Values
      • THRESHOLD_COUNT

        static final java.lang.String THRESHOLD_COUNT
        Deprecated.
        The suffix to property names for the threshold count.
        See Also:
        Constant Field Values
      • ERROR_TIME

        static final java.lang.String ERROR_TIME
        Deprecated.
        The suffix to property names for the error time.
        See Also:
        Constant Field Values
      • INITIAL_TIME

        static final java.lang.String INITIAL_TIME
        Deprecated.
        The suffix to property names for the the average time. Only used in the initial setup of TransformerData. This is a historical property used by the 'Transformation Server' to set an effective priority.
        See Also:
        Constant Field Values
      • INITIAL_COUNT

        static final java.lang.String INITIAL_COUNT
        Deprecated.
        The suffix to property names for the the average count. Only used in the initial setup of TransformerData. This is a historical property used by the 'Transformation Server' to set an effective priority.
        See Also:
        Constant Field Values
      • MAX_SOURCE_SIZE_K_BYTES

        static final java.lang.String MAX_SOURCE_SIZE_K_BYTES
        Deprecated.
        Suffixes for limits.
        See Also:
        Constant Field Values
      • READ_LIMIT_K_BYTES

        static final java.lang.String READ_LIMIT_K_BYTES
        Deprecated.
        See Also:
        Constant Field Values
      • READ_LIMIT_TIME_MS

        static final java.lang.String READ_LIMIT_TIME_MS
        Deprecated.
        See Also:
        Constant Field Values
      • PRIORITY_EXPLICIT

        static final int PRIORITY_EXPLICIT
        Deprecated.
        To support the historical concept of EXPLICIT transformers, all such transformers are given a PRIORITY_EXPLICIT (50). By default transformers have a default of 10. A value of 5 allows better transformers to be added later.
        See Also:
        Constant Field Values
      • PRIORITY_DEFAULT

        static final int PRIORITY_DEFAULT
        Deprecated.
        By default transformers have a priority of 100.
        See Also:
        Constant Field Values
      • LIMIT_SUFFIXES

        static final java.util.Collection<java.lang.String> LIMIT_SUFFIXES
        Deprecated.
        Suffixes to property names used to define transformation limits
      • LIMIT_PAIR_SUFFIXES

        static final java.lang.String[][] LIMIT_PAIR_SUFFIXES
        Deprecated.
        Suffix pairs (max and limit values) to property names used to define transformation limits
      • ALL_SUFFIXES

        static final java.util.Collection<java.lang.String> ALL_SUFFIXES
        Deprecated.
        All suffixes to property names used to transformer configuration
      • NO_SUFFIXES

        static final java.util.Collection<java.lang.String> NO_SUFFIXES
        Deprecated.
        No suffixes to property names used to define transformer settings.
      • DEBUG_ENTRIES

        static final java.lang.String DEBUG_ENTRIES
        Deprecated.
        The number of debug lines to keep. Turned off if <= 0.
        See Also:
        Constant Field Values
      • LOG_ENTRIES

        static final java.lang.String LOG_ENTRIES
        Deprecated.
        The number of log lines to keep. Turned off if <= 0.
        See Also:
        Constant Field Values
      • STRICT_MIMETYPE_CHECK_WHITELIST_MIMETYPES

        static final java.lang.String STRICT_MIMETYPE_CHECK_WHITELIST_MIMETYPES
        Deprecated.
        A white list of declared and detected mimetypes, that don't match, but should still be transformed.
    • Method Detail

      • getProperty

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

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

        int removeProperties​(java.lang.String propertyNames)
        Deprecated.
        Removes transformer properties.
        Parameters:
        propertyNames - new line separated names. Any values will be ignored.
        Returns:
        the number of properties removed.
        Throws:
        java.lang.IllegalArgumentException - if the properties were not set or the list contains errors.
      • setProperties

        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.
        Parameters:
        propertyNamesAndValues - new line separated name and values
        Returns:
        the number of properties set.
        Throws:
        java.lang.IllegalArgumentException - the list contains errors.
      • getStatistics

        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.
        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

        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.
        Parameters:
        transformer -
        sourceMimetype -
        targetMimetype -
        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

        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.
        Parameters:
        transformer -
        sourceMimetype -
        targetMimetype -
        options - not currently used
      • getPriority

        int getPriority​(ContentTransformer contentTransformerHelper,
                        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.
        Parameters:
        contentTransformerHelper -
        sourceMimetype -
        targetMimetype -
        Returns:
        the priority. To support the historical concept of EXPLICIT transformers, all such transformers are given a PRIORITY_EXPLICIT (50). By default transformers have a default of 100.
      • getBlacklist

        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.
        Parameters:
        transformer -
        sourceMimetype -
        targetMimetype -
        Returns:
        the blacklist or null is none.
      • strictMimetypeCheck

        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.
        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

        int getThresholdCount​(ContentTransformer contentTransformerHelper,
                              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.
        Parameters:
        contentTransformerHelper -
        sourceMimetype -
        targetMimetype -
        Returns:
        the threshold.