org.alfresco.filesys.repo
Class CIFSContentComparator

java.lang.Object
  extended by org.alfresco.filesys.repo.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.


Constructor Summary
CIFSContentComparator()
           
 
Method Summary
 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
Returns:
true content is equal, false content is different.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.