Package org.alfresco.repo.rendition2
Class SwitchingSynchronousTransformClient
- java.lang.Object
-
- org.alfresco.repo.rendition2.SwitchingSynchronousTransformClient
-
- All Implemented Interfaces:
SynchronousTransformClient
@Deprecated public class SwitchingSynchronousTransformClient extends java.lang.Object implements SynchronousTransformClient
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. Class provides the switch between Local and Legacy transforms.- Author:
- adavis
-
-
Constructor Summary
Constructors Constructor Description SwitchingSynchronousTransformClient(SynchronousTransformClient primary, SynchronousTransformClient secondary)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanisSupported(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, 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)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 (Strings) plus the data contained in the Transformer objects registered with this class.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
-
-
-
-
Constructor Detail
-
SwitchingSynchronousTransformClient
public SwitchingSynchronousTransformClient(SynchronousTransformClient primary, SynchronousTransformClient secondary)
Deprecated.
-
-
Method Detail
-
isSupported
public boolean isSupported(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, 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)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 (Strings) plus the data contained in the Transformer objects registered with this class.- Specified by:
isSupportedin interfaceSynchronousTransformClient- Parameters:
sourceNodeRef- the NodeRef of the source content. Optional as it is only used in debug messages.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.- 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) throws java.lang.ExceptionDeprecated.Description copied from interface:SynchronousTransformClientRequests a synchronous transform. Not used for renditions. The call to this method MUST be proceeded by a successful call toSynchronousTransformClient.isSupported(NodeRef, String, long, String, String, Map, String)in the SAME Thread.- Specified by:
transformin interfaceSynchronousTransformClient- 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- Throws:
java.lang.Exception
-
-