Interface SynchronousTransformClient

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      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.
      default boolean isSupported​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef, java.lang.String targetMimetype, java.util.Map<java.lang.String,​java.lang.String> actualOptions, java.lang.String transformName, org.alfresco.service.cmr.repository.NodeService nodeService)
      Deprecated.
      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.
    • Method Detail

      • isSupported

        @Deprecated
        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.
        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.
        Parameters:
        sourceNodeRef - the NodeRef of the source content. Optional as it is only used in debug messages.
        sourceMimetype - the mimetype of the source content
        sourceSizeInBytes - 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 target
        actualOptions - 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.
      • isSupported

        @Deprecated
        default boolean isSupported​(org.alfresco.service.cmr.repository.NodeRef sourceNodeRef,
                                    java.lang.String targetMimetype,
                                    java.util.Map<java.lang.String,​java.lang.String> actualOptions,
                                    java.lang.String transformName,
                                    org.alfresco.service.cmr.repository.NodeService nodeService)
        Deprecated.
        Helper method to call isSupported(NodeRef, String, long, String, String, Map, String). Uses the nodeService and sourceNodeRef to work out the sourceMimetype, sourceSizeInBytes and contentUrl.
        Parameters:
        sourceNodeRef - the NodeRef of the source content.
        targetMimetype - the mimetype of the target
        actualOptions - 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.
        nodeService - to access the sourceNodeRef content property.
        Returns:
        true if it is supported.
      • transform

        @Deprecated
        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.Exception
        Deprecated.
        Requests a synchronous transform. Not used for renditions. The call to this method MUST be proceeded by a successful call to isSupported(NodeRef, String, long, String, String, Map, String) in the SAME Thread.
        Parameters:
        reader - of the source content
        writer - to the target node's content
        actualOptions - 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