org.entityfs.util.dirdiff
Class CopyUnmatchedMasterEntityStrategy
java.lang.Object
org.entityfs.util.dirdiff.CopyUnmatchedMasterEntityStrategy
- All Implemented Interfaces:
- UnmatchedMasterEntityStrategy
public class CopyUnmatchedMasterEntityStrategy
- extends Object
- implements UnmatchedMasterEntityStrategy
This UnmatchedMasterEntityStrategy
copies an unmatched master entity
to the target directory. The attributes of the copied entity are preserved,
if possible.
Since objects of this class contains no mutable internal state, the singleton
instance INSTANCE
may be used instead of instantiating this class.
- Since:
- 1.0
- Author:
- Karl Gustafsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final CopyUnmatchedMasterEntityStrategy INSTANCE
CopyUnmatchedMasterEntityStrategy
public CopyUnmatchedMasterEntityStrategy()
handle
public void handle(EntityView ev,
DirectoryView master,
DirectoryView target)
- Description copied from interface:
UnmatchedMasterEntityStrategy
- Handle an entity in the master directory that did not have a matching
entity in the target directory.
- Specified by:
handle
in interface UnmatchedMasterEntityStrategy
- Parameters:
ev
- The entity without match.master
- The master directory. Locked for reading. (This method
should not release the lock.)target
- The target directory. Locked for writing. (This method
should not release the lock.)