Class CIFSContentComparator

  • All Implemented Interfaces:
    ContentComparator

    public class CIFSContentComparator
    extends java.lang.Object
    implements ContentComparator
    Compares content for to see if content is equal.

    Most mimetypes can simply be binary compared but for some mimetypes there may be trivial differences so a binary compare is not sufficient.

    In particular MS Project and MS Excel write to header fields without changing content.

    Author:
    mrogers
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init()  
      boolean isContentEqual​(org.alfresco.service.cmr.repository.ContentReader existingContent, java.io.File newFile)
      Are the two content items equal?
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CIFSContentComparator

        public CIFSContentComparator()
    • Method Detail

      • init

        public void init()
      • isContentEqual

        public boolean isContentEqual​(org.alfresco.service.cmr.repository.ContentReader existingContent,
                                      java.io.File newFile)
        Description copied from interface: ContentComparator
        Are the two content items equal?

        For most cases a simple binary comparison is sufficient but some mimetypes trivial changes need to be discarded.

        Specified by:
        isContentEqual in interface ContentComparator
        newFile - file
        Returns:
        true content is equal, false content is different.