Class TransformerConfigImpl
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.repo.content.transform.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
-
-
Field Summary
-
Fields inherited from interface org.alfresco.repo.content.transform.TransformerConfig
ALL_SUFFIXES, AMP, ANY, AVAILABLE, BLACKLIST, CONTENT, DEBUG_ENTRIES, DEFAULT_TRANSFORMER, EDITION, ENTRIES, ERROR_TIME, EXTENSIONS, FAILOVER, INITIAL_COUNT, INITIAL_TIME, LIMIT_PAIR_SUFFIXES, LIMIT_SUFFIXES, LOG_ENTRIES, MAX_PAGES, MAX_SOURCE_SIZE_K_BYTES, MIMETYPES, NO_SUFFIXES, PAGE_LIMIT, PIPE, PIPELINE, PREFIX, PRIORITY, PRIORITY_DEFAULT, PRIORITY_EXPLICIT, READ_LIMIT_K_BYTES, READ_LIMIT_TIME_MS, SEPARATORS, STRICT_MIMETYPE_CHECK_WHITELIST_MIMETYPES, SUMMARY_TRANSFORMER_NAME, SUPPORTED, THRESHOLD_COUNT, TIMEOUT_MS, TRANSFORMER, USE
-
-
Constructor Summary
Constructors Constructor Description TransformerConfigImpl()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete 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.TransformationOptionLimitsgetLimits(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.intgetPriority(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.java.lang.StringgetProperties(boolean changesOnly)Deprecated.Returns a sorted set of all transformer properties, their values and includes comments about the properties.java.lang.StringgetProperty(java.lang.String name)Deprecated.Returns a transformer property value.TransformerStatisticsgetStatistics(ContentTransformer transformer, java.lang.String sourceMimetype, java.lang.String targetMimetype, boolean createNew)Deprecated.Returns and creates if needed theTransformerStatisticsobject for the combination of transformer, sourceMimetype and targetMimetype.intgetThresholdCount(ContentTransformer transformer, java.lang.String sourceMimetype, java.lang.String targetMimetype)Deprecated.Returns the threshold of the transformer.voidinitialise()Deprecated.Called by spring after bean is initialised.booleanisSupportedTransformation(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.protected voidonBootstrap(org.springframework.context.ApplicationEvent event)Deprecated.protected voidonShutdown(org.springframework.context.ApplicationEvent event)Deprecated.intremoveProperties(java.lang.String propertyNames)Deprecated.Removes transformer properties.voidsetContentService(ContentService contentService)Deprecated.voidsetContentTransformerRegistry(ContentTransformerRegistry transformerRegistry)Deprecated.voidsetDescriptorService(DescriptorService descriptorService)Deprecated.voidsetGlobalProperties(java.util.Properties globalProperties)Deprecated.voidsetMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)Deprecated.Sets of the mimetype service.voidsetModuleService(ModuleService moduleService)Deprecated.intsetProperties(java.lang.String propertyNamesAndValues)Deprecated.Sets a transformer property values.voidsetTransformerDebug(TransformerDebug transformerDebug)Deprecated.voidsetTransformerDebugLog(TransformerDebugLog transformerDebugLog)Deprecated.voidsetTransformerLog(TransformerLog transformerLog)Deprecated.booleanstrictMimetypeCheck(java.lang.String declaredMimetype, java.lang.String detectedMimetype)Deprecated.When strict mimetype checking is performed before a transformation, this method is called.
-
-
-
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:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent event)
Deprecated.- Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
getProperty
public java.lang.String getProperty(java.lang.String name)
Deprecated.Returns a transformer property value.- Specified by:
getPropertyin interfaceTransformerConfig- Parameters:
name- of the property.- Returns:
- a transformer property or
nullif not set.
-
getProperties
public java.lang.String getProperties(boolean changesOnly)
Deprecated.Description copied from interface:TransformerConfigReturns a sorted set of all transformer properties, their values and includes comments about the properties.- Specified by:
getPropertiesin interfaceTransformerConfig- 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:
setPropertiesin interfaceTransformerConfig- 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:TransformerConfigRemoves transformer properties.- Specified by:
removePropertiesin interfaceTransformerConfig- 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 theTransformerStatisticsobject 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:
getStatisticsin interfaceTransformerConfig- 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:
getLimitsin interfaceTransformerConfiguse- to which the limits will be put. For example "index", "webpreview", "doclib", "syncRule", "aysncRule".nullis 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:
isSupportedTransformationin interfaceTransformerConfigoptions- 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:
getPriorityin interfaceTransformerConfig- 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:
getBlacklistin interfaceTransformerConfig- 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:
strictMimetypeCheckin interfaceTransformerConfig- Parameters:
declaredMimetype- the mimetype on the source nodedetectedMimetype- 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:
getThresholdCountin interfaceTransformerConfig- Returns:
- the threshold.
-
-