Package org.alfresco.transform.registry
Class TransformServiceRegistryImpl
java.lang.Object
org.alfresco.transform.registry.AbstractTransformRegistry
org.alfresco.transform.registry.TransformServiceRegistryImpl
- All Implemented Interfaces:
org.alfresco.transform.registry.TransformServiceRegistry,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
LocalTransformServiceRegistry
public abstract class TransformServiceRegistryImpl
extends org.alfresco.transform.registry.AbstractTransformRegistry
implements org.springframework.beans.factory.InitializingBean
Used by clients to work out if a transformation is supported by the Transform Service.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlongfindMaxSize(String sourceMimetype, String targetMimetype, Map<String, String> actualOptions, String renditionName) findTransformerName(String sourceMimetype, long sourceSizeInBytes, String targetMimetype, Map<String, String> actualOptions, String renditionName) List<org.alfresco.transform.registry.SupportedTransform>findTransformers(String sourceMimetype, String targetMimetype, Map<String, String> actualOptions, String renditionName) Works out an ordered list of transformer that will be used to transform content of a given source mimetype into a target mimetype given a list of actual transform option names and values (Strings) plus the data contained in the Transform objects registered with this class.org.quartz.CronExpressiongetData()protected booleanorg.quartz.CronExpressionprotected abstract org.apache.commons.logging.LoggetLog()booleanprotected voidprotected voidabstract booleanvoidsetCronExpression(org.quartz.CronExpression cronExpression) voidsetEnabled(boolean enabled) protected voidsetFirstTime(boolean firstTime) voidsetInitialAndOnErrorCronExpression(org.quartz.CronExpression initialAndOnErrorCronExpression) voidsetJsonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper) voidsetShutdownIndicator(ShutdownIndicator shutdownIndicator) Methods inherited from class org.alfresco.transform.registry.AbstractTransformRegistry
getBaseUrlIfTesting, isSupported, registerMethods 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
-
enabled
protected boolean enabled
-
-
Constructor Details
-
TransformServiceRegistryImpl
public TransformServiceRegistryImpl()
-
-
Method Details
-
setJsonObjectMapper
public void setJsonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper) -
getCronExpression
public org.quartz.CronExpression getCronExpression() -
setCronExpression
public void setCronExpression(org.quartz.CronExpression cronExpression) -
getInitialAndOnErrorCronExpression
public org.quartz.CronExpression getInitialAndOnErrorCronExpression() -
setInitialAndOnErrorCronExpression
public void setInitialAndOnErrorCronExpression(org.quartz.CronExpression initialAndOnErrorCronExpression) -
setShutdownIndicator
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
createData
-
getData
- Specified by:
getDatain classorg.alfresco.transform.registry.AbstractTransformRegistry
-
readConfig
- Throws:
IOException
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) -
setFirstTime
protected void setFirstTime(boolean firstTime) -
getFirstTime
protected boolean getFirstTime() -
getLog
protected abstract org.apache.commons.logging.Log getLog() -
logError
- Specified by:
logErrorin classorg.alfresco.transform.registry.AbstractTransformRegistry
-
logWarn
- Overrides:
logWarnin classorg.alfresco.transform.registry.AbstractTransformRegistry
-
findTransformerName
public String findTransformerName(String sourceMimetype, long sourceSizeInBytes, String targetMimetype, Map<String, String> actualOptions, String renditionName) - Specified by:
findTransformerNamein interfaceorg.alfresco.transform.registry.TransformServiceRegistry- Overrides:
findTransformerNamein classorg.alfresco.transform.registry.AbstractTransformRegistry
-
findMaxSize
public long findMaxSize(String sourceMimetype, String targetMimetype, Map<String, String> actualOptions, String renditionName) - Specified by:
findMaxSizein interfaceorg.alfresco.transform.registry.TransformServiceRegistry- Overrides:
findMaxSizein classorg.alfresco.transform.registry.AbstractTransformRegistry
-
findTransformers
public List<org.alfresco.transform.registry.SupportedTransform> findTransformers(String sourceMimetype, String targetMimetype, Map<String, String> actualOptions, String renditionName) Works out an ordered list of transformer that will be used to transform content of a given source mimetype into a target mimetype given a list of actual transform option names and values (Strings) plus the data contained in the Transform objects registered with this class. These are ordered by size and priority.- Parameters:
sourceMimetype- the mimetype of the source contenttargetMimetype- the mimetype of the targetactualOptions- 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.
-