Class LocalTransformServiceRegistry
java.lang.Object
org.alfresco.transform.registry.AbstractTransformRegistry
org.alfresco.transform.registry.TransformServiceRegistryImpl
org.alfresco.repo.content.transform.LocalTransformServiceRegistry
- All Implemented Interfaces:
org.alfresco.transform.registry.TransformServiceRegistry,org.springframework.beans.factory.InitializingBean
public class LocalTransformServiceRegistry
extends TransformServiceRegistryImpl
implements org.springframework.beans.factory.InitializingBean
Implements
TransformServiceRegistry providing a mechanism of validating if a local transformation (based on LocalTransform request is supported.- Author:
- adavis
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.alfresco.transform.registry.TransformServiceRegistryImpl
TransformServiceRegistryImpl.Data -
Field Summary
FieldsFields inherited from class org.alfresco.transform.registry.TransformServiceRegistryImpl
enabled -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlongfindMaxSize(String sourceMimetype, String targetMimetype, Map<String, String> options, String renditionName) getData()org.alfresco.httpclient.HttpClientConfiggetLocalTransform(String sourceMimetype, long sourceSizeInBytes, String targetMimetype, Map<String, String> actualOptions, String renditionName) protected org.apache.commons.logging.LoggetLog()protected StringgetProperty(String name, 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.booleanisSupported(org.alfresco.transform.config.CoreFunction function, LocalTransform transform) Returnstrueif thefunctionis supported by the transform.booleanprotected voidregister(org.alfresco.transform.config.Transformer transformer, Map<String, Set<org.alfresco.transform.config.TransformOption>> transformOptions, String baseUrl, String readFrom) voidsetHttpClientConfig(org.alfresco.httpclient.HttpClientConfig httpClientConfig) voidsetMimetypeService(MimetypeService mimetypeService) voidsetNodeService(NodeService nodeService) voidsetPipelineConfigDir(String pipelineConfigDir) voidsetProperties(Properties properties) The Alfresco global properties.voidsetRetryTransformOnDifferentMimeType(boolean retryTransformOnDifferentMimeType) voidsetStrictMimeTypeCheck(boolean strictMimeTypeCheck) voidsetTransformerDebug(TransformerDebug transformerDebug) Methods inherited from class org.alfresco.transform.registry.TransformServiceRegistryImpl
findTransformerName, findTransformers, getCronExpression, getFirstTime, getInitialAndOnErrorCronExpression, isEnabled, logError, logWarn, setCronExpression, setEnabled, setFirstTime, setInitialAndOnErrorCronExpression, setJsonObjectMapper, setShutdownIndicatorMethods inherited from class org.alfresco.transform.registry.AbstractTransformRegistry
getBaseUrlIfTesting, isSupportedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.transform.registry.TransformServiceRegistry
isSupported
-
Field Details
-
LOCAL_TRANSFORMER
- See Also:
-
URL
- See Also:
-
-
Constructor Details
-
LocalTransformServiceRegistry
public LocalTransformServiceRegistry()
-
-
Method Details
-
getHttpClientConfig
public org.alfresco.httpclient.HttpClientConfig getHttpClientConfig() -
setNodeService
-
setHttpClientConfig
public void setHttpClientConfig(org.alfresco.httpclient.HttpClientConfig httpClientConfig) -
setPipelineConfigDir
-
getPipelineConfigDir
-
setProperties
The Alfresco global properties. -
setMimetypeService
-
getMimetypeService
-
setTransformerDebug
-
setStrictMimeTypeCheck
public void setStrictMimeTypeCheck(boolean strictMimeTypeCheck) -
setRetryTransformOnDifferentMimeType
public void setRetryTransformOnDifferentMimeType(boolean retryTransformOnDifferentMimeType) -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classTransformServiceRegistryImpl- Throws:
Exception
-
readConfig
- Specified by:
readConfigin classTransformServiceRegistryImpl- Throws:
IOException
-
getData
- Overrides:
getDatain classTransformServiceRegistryImpl
-
createData
- Overrides:
createDatain classTransformServiceRegistryImpl
-
register
protected void register(org.alfresco.transform.config.Transformer transformer, Map<String, Set<org.alfresco.transform.config.TransformOption>> transformOptions, String baseUrl, String readFrom) - Overrides:
registerin classorg.alfresco.transform.registry.AbstractTransformRegistry
-
getLog
protected org.apache.commons.logging.Log getLog()- Specified by:
getLogin classTransformServiceRegistryImpl
-
getProperty
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. -
findMaxSize
public long findMaxSize(String sourceMimetype, String targetMimetype, Map<String, String> options, String renditionName) - Specified by:
findMaxSizein interfaceorg.alfresco.transform.registry.TransformServiceRegistry- Overrides:
findMaxSizein classTransformServiceRegistryImpl
-
getLocalTransform
-
isSupported
public boolean isSupported(org.alfresco.transform.config.CoreFunction function, LocalTransform transform) Returnstrueif thefunctionis supported by the transform. Not all transforms are able to support all functionality, as newer features may have been introduced into the core t-engine code since it was released.- Parameters:
function- to be checked.transform- the local transform.- Returns:
trueis supported,falseotherwise.
-