Class TransformServiceRegistryImpl
- java.lang.Object
-
- org.alfresco.transform.client.registry.AbstractTransformRegistry
-
- org.alfresco.transform.client.registry.TransformServiceRegistryImpl
-
- All Implemented Interfaces:
org.alfresco.transform.client.registry.TransformServiceRegistry,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
LocalTransformServiceRegistry
public abstract class TransformServiceRegistryImpl extends org.alfresco.transform.client.registry.AbstractTransformRegistry implements org.springframework.beans.factory.InitializingBeanUsed by clients to work out if a transformation is supported by the Transform Service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTransformServiceRegistryImpl.Data
-
Field Summary
Fields Modifier and Type Field Description protected booleanenabled
-
Constructor Summary
Constructors Constructor Description TransformServiceRegistryImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()TransformServiceRegistryImpl.DatacreateData()List<org.alfresco.transform.client.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.CronExpressiongetCronExpression()TransformServiceRegistryImpl.DatagetData()protected booleangetFirstTime()org.quartz.CronExpressiongetInitialAndOnErrorCronExpression()protected abstract org.apache.commons.logging.LoggetLog()booleanisEnabled()protected voidlogError(String msg)abstract booleanreadConfig()voidsetCronExpression(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.client.registry.AbstractTransformRegistry
findMaxSize, findTransformerName, register, registerAll
-
-
-
-
Method Detail
-
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
public void setShutdownIndicator(ShutdownIndicator shutdownIndicator)
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
createData
public TransformServiceRegistryImpl.Data createData()
-
getData
public TransformServiceRegistryImpl.Data getData()
- Specified by:
getDatain classorg.alfresco.transform.client.registry.AbstractTransformRegistry
-
readConfig
public abstract boolean readConfig() throws IOException- 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
protected void logError(String msg)
- Specified by:
logErrorin classorg.alfresco.transform.client.registry.AbstractTransformRegistry
-
findTransformers
public List<org.alfresco.transform.client.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.
-
-