Interface XMPHandler


  • public interface XMPHandler
    The XMPHandler interface defines the functionality needed to read and write XMP meta info to and from Asset. There can be only one active implementation at any given time. Highest ranked service will be used if more than one implementations are available.
    • Method Detail

      • isSupported

        boolean isSupported​(String mimeType)
        Checks if the provided mime type is supported by the implementation
        Parameters:
        mimeType - to be checked
        Returns:
        true if the given mime type is supported
      • readXmp

        @Deprecated
        XMPMeta readXmp​(Asset asset)
                 throws IOException
        Deprecated.
        Read xmp packet from the original binary
        Parameters:
        asset - asset to read xmp from
        Returns:
        XMPMeta
        Throws:
        IOException - if fails to read xmp
      • readXmpMetadata

        XMPMetadata readXmpMetadata​(Asset asset)
                             throws IOException
        Read xmp packet from the original binary
        Parameters:
        asset - asset to read xmp metadata from
        Returns:
        XMPMetaData
        Throws:
        IOException - if fails to read xmp
      • writeXmp

        void writeXmp​(Asset asset,
                      byte[] xmpBytes)
               throws IOException
        Write xmp bytes back to the original binary
        Parameters:
        asset - asset to write xmp bytes back to
        xmpBytes - xmp bytes to be written back
        Throws:
        IOException - if fails to write back xmp to the binary
      • writeXmp

        @Deprecated
        void writeXmp​(Asset asset,
                      XMPMeta xmpMeta)
               throws IOException
        Deprecated.
        Write xmp meta back to the original binary
        Parameters:
        asset - asset to write xmp meta back to
        xmpMeta - object
        Throws:
        IOException - if fails to write back xmp to the binary
      • writeXmp

        void writeXmp​(Asset asset,
                      byte[] xmpBytes,
                      boolean createVersion)
               throws IOException
        Write xmp bytes back to the original binary
        Parameters:
        asset - asset asset to write xmp bytes back to
        xmpBytes - xmp bytes to be written back
        createVersion - if true then create versions of the asset on each writeback
        Throws:
        IOException - if fails to write back xmp to the binary
      • writeXmp

        void writeXmp​(Asset asset,
                      XMPMeta xmpMeta,
                      boolean createVersion)
               throws IOException
        Write xmp meta back to the original binary
        Parameters:
        asset - asset to write xmp meta back to
        xmpMeta - object
        createVersion - if true then create versions of the asset on each writeback
        Throws:
        IOException - if fails to write back xmp to the binary
      • writeXmp

        void writeXmp​(Asset asset,
                      byte[] xmpBytes,
                      XMPWriteBackOptions writeBackOptions)
               throws IOException
        Write xmp bytes back to the original/renditions' binary
        Parameters:
        asset - asset to write xmp bytes back to
        xmpBytes - xmp bytes to be written back
        writeBackOptions - the XMP write back options
        Throws:
        IOException - if fails to write back xmp to the binary
      • writeXmpMetadata

        void writeXmpMetadata​(Asset asset,
                              XMPMetadata xmpMetadata,
                              XMPWriteBackOptions writeBackOptions)
                       throws IOException
        Write xmp meta back to the original binary
        Parameters:
        asset - asset to write xmp meta back to
        xmpMetadata - object
        writeBackOptions - the XMP write back options
        Throws:
        IOException - if fails to write back xmp to the binary
      • writeXmp

        void writeXmp​(Asset asset,
                      XMPMeta xmpMeta,
                      XMPWriteBackOptions writeBackOptions)
               throws IOException
        Write xmp meta back to the original/renditions' binary
        Parameters:
        asset - asset to write xmp meta back to
        xmpMeta - object
        writeBackOptions - the XMP write back options
        Throws:
        IOException - if fails to write back xmp to the binary