org.rhq.core.util.updater
Class ChangesFileHashcodeMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap<String,String>
          extended by org.rhq.core.util.updater.FileHashcodeMap
              extended by org.rhq.core.util.updater.ChangesFileHashcodeMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>, NavigableMap<String,String>, SortedMap<String,String>

public class ChangesFileHashcodeMap
extends FileHashcodeMap

Same as a FileHashcodeMap but also holds additional data about changes that were detected after a FileHashcodeMap.rescan(java.io.File, java.util.regex.Pattern, boolean).

Author:
John Mazzitelli
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
 
Fields inherited from class org.rhq.core.util.updater.FileHashcodeMap
DELETED_FILE_HASHCODE, UNKNOWN_DIR_HASHCODE, UNKNOWN_FILE_HASHCODE
 
Constructor Summary
ChangesFileHashcodeMap(FileHashcodeMap original)
          Creates an file/hashcode map populated with a map of original file data.
 
Method Summary
 Map<String,String> getAdditions()
           
 Map<String,String> getChanges()
           
 Map<String,String> getDeletions()
           
 Set<String> getIgnored()
           
 Set<String> getSkipped()
           
 
Methods inherited from class org.rhq.core.util.updater.FileHashcodeMap
containsKey, convertPath, generateFileHashcodeMap, get, getUnknownContent, loadFromFile, put, remove, rescan, storeToFile
 
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, putAll, size, subMap, subMap, tailMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

ChangesFileHashcodeMap

public ChangesFileHashcodeMap(FileHashcodeMap original)
Creates an file/hashcode map populated with a map of original file data. Changes/additions/deletions to this original data can be tracked separately in this new object. This object will copy this original data such that its starting content will mimic the original. As things are added, deleted, changed, this object's internal map should be changed to reflect the new data, as well as that new data individually tracked in the separate getAdditions(), getDeletions(), getChanges() maps. This is the responsibility of the originator of this map object.

Parameters:
original - contains original file data that this object will copy
Method Detail

getDeletions

public Map<String,String> getDeletions()
Returns:
the data on files that were deleted from the original

getAdditions

public Map<String,String> getAdditions()
Returns:
the data on files that were added to the original

getChanges

public Map<String,String> getChanges()
Returns:
the data on files that were changed from the original

getIgnored

public Set<String> getIgnored()
Returns:
the files and directories that were ignored and thus not known if these are true additions or changes

getSkipped

public Set<String> getSkipped()
Returns:
the files and directories located directly under the root deploy dir that were skipped. These are files/directories that are considered unrelated to the deployment and should be left alone.


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.