Package org.alfresco.repo.rendition2
Class LocalSynchronousTransformClient
- java.lang.Object
-
- org.alfresco.repo.rendition2.LocalSynchronousTransformClient
-
- All Implemented Interfaces:
SynchronousTransformClient<LocalTransform>,org.springframework.beans.factory.InitializingBean
@Deprecated public class LocalSynchronousTransformClient extends java.lang.Object implements SynchronousTransformClient<LocalTransform>, org.springframework.beans.factory.InitializingBean
Deprecated.Request synchronous transforms. Used in refactoring deprecated code, which called Legacy transforms, so that it will first try a Local transform, falling back to Legacy if not available. Transforms take place using transforms available on the local machine (based onLocalTransform).- Author:
- adavis
-
-
Field Summary
-
Fields inherited from interface org.alfresco.repo.rendition2.SynchronousTransformClient
IS_SUPPORTED_NOT_CALLED
-
-
Constructor Summary
Constructors Constructor Description LocalSynchronousTransformClient()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()Deprecated.java.util.Map<java.lang.String,java.lang.String>convertOptions(TransformationOptions options)Deprecated.LocalTransformgetSupportedBy()Deprecated.booleanisSupported(java.lang.String sourceMimetype, long sourceSizeInBytes, java.lang.String contentUrl, java.lang.String targetMimetype, java.util.Map<java.lang.String,java.lang.String> actualOptions, java.lang.String transformName, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)Deprecated.Works out if it is possible to transform content of a given source mimetype and size into a target mimetype given a list of actual transform option names and values.voidsetConverter(TransformationOptionsConverter converter)Deprecated.voidsetLocalTransformServiceRegistry(LocalTransformServiceRegistry localTransformServiceRegistry)Deprecated.voidsetSupportedBy(LocalTransform localTransform)Deprecated.voidtransform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, java.util.Map<java.lang.String,java.lang.String> actualOptions, java.lang.String transformName, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)Deprecated.Requests a synchronous transform.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.rendition2.SynchronousTransformClient
isSupported, isSupported
-
-
-
-
Method Detail
-
setLocalTransformServiceRegistry
public void setLocalTransformServiceRegistry(LocalTransformServiceRegistry localTransformServiceRegistry)
Deprecated.
-
setConverter
public void setConverter(TransformationOptionsConverter converter)
Deprecated.
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.ExceptionDeprecated.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception
-
isSupported
public boolean isSupported(java.lang.String sourceMimetype, long sourceSizeInBytes, java.lang.String contentUrl, java.lang.String targetMimetype, java.util.Map<java.lang.String,java.lang.String> actualOptions, java.lang.String transformName, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)Deprecated.Description copied from interface:SynchronousTransformClientWorks out if it is possible to transform content of a given source mimetype and size into a target mimetype given a list of actual transform option names and values.- Specified by:
isSupportedin interfaceSynchronousTransformClient<LocalTransform>- Parameters:
sourceMimetype- the mimetype of the source contentsourceSizeInBytes- the size in bytes of the source content. Ignored if negative.contentUrl- The url of the content. Optional as it is only used in debug messages.targetMimetype- the mimetype of the targetactualOptions- the actual name value pairs available that could be passed to the Transform Service.transformName- (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.sourceNodeRef- the NodeRef of the source content. Optional as it is only used in debug messages.- Returns:
- true if it is supported.
-
transform
public void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, java.util.Map<java.lang.String,java.lang.String> actualOptions, java.lang.String transformName, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)Deprecated.Description copied from interface:SynchronousTransformClientRequests a synchronous transform. Not used for renditions. The call to this method should be proceeded by a successful call toSynchronousTransformClient.isSupported(String, long, String, String, Map, String, NodeRef)ideally in the SAMEThread. If this is not possible, the thread that has calledisSupported, should then callSynchronousTransformClient.getSupportedBy(). The returned value then needs to used as a parameter toSynchronousTransformClient.setSupportedBy(Object)by the thread that is about to calltransform.- Specified by:
transformin interfaceSynchronousTransformClient<LocalTransform>- Parameters:
reader- of the source contentwriter- to the target node's contentactualOptions- the actual name value pairs available that could be passed to the Transform Service.transformName- (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.sourceNodeRef- the source node
-
getSupportedBy
@Deprecated public LocalTransform getSupportedBy()
Deprecated.Description copied from interface:SynchronousTransformClientOnly needed ifisSupportedandtransformare called in differentThreads. See the description inSynchronousTransformClient.transform(ContentReader, ContentWriter, Map, String, NodeRef).- Specified by:
getSupportedByin interfaceSynchronousTransformClient<LocalTransform>
-
setSupportedBy
@Deprecated public void setSupportedBy(LocalTransform localTransform)
Deprecated.Description copied from interface:SynchronousTransformClientOnly needed ifisSupportedandtransformare called in differentThreads. See the description inSynchronousTransformClient.transform(ContentReader, ContentWriter, Map, String, NodeRef).- Specified by:
setSupportedByin interfaceSynchronousTransformClient<LocalTransform>
-
convertOptions
@Deprecated public java.util.Map<java.lang.String,java.lang.String> convertOptions(TransformationOptions options)
Deprecated.- Specified by:
convertOptionsin interfaceSynchronousTransformClient<LocalTransform>
-
-