|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.modzdetector.ModzDetector
public class ModzDetector
Provides a service to determine whether resource content has been modified compared to a registry.
The registry contains a map of names to hashes (implemented by the HashAlgorithm).
Resources are loaded using a strategy defined in the registry on a per-resource basis. The two main
strategies are filesystem loading and classpath loading. The ResourceAccessor implementation
provides the concrete mechanism for acquiring the InputStream in the case of filesystem loading and
the ClassLoader in the case of classpath loading.
| Field Summary | |
|---|---|
static java.io.FileFilter |
OPEN_FILTER
|
| Constructor Summary | |
|---|---|
ModzDetector(ResourceAccessor resourceAccessor)
|
|
ModzDetector(ResourceAccessor resourceAccessor,
HashAlgorithm hashAlgorithm)
|
|
ModzDetector(ResourceAccessor resourceAccessor,
HashAlgorithm hashAlgorithm,
StreamMapper streamMapper)
|
|
| Method Summary | |
|---|---|
java.util.List<java.lang.String> |
getAddedFiles(java.io.File rootDirectory)
Gets a report of what files were added using the default registry file, loaded off the classpath. |
java.util.List<java.lang.String> |
getAddedFiles(java.io.InputStream registryStream,
java.io.File root,
java.io.FileFilter filter)
Searches the given root directory for all file paths beneath it that are not registered. |
Modifications |
getModifiedFiles()
Gets a report of what files were modified using the default registry file, loaded off the classpath. |
Modifications |
getModifiedFiles(java.io.InputStream registryStream)
Gets a report of what files were modified using the registry in the given registryStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.io.FileFilter OPEN_FILTER
| Constructor Detail |
|---|
public ModzDetector(ResourceAccessor resourceAccessor)
public ModzDetector(ResourceAccessor resourceAccessor,
HashAlgorithm hashAlgorithm)
public ModzDetector(ResourceAccessor resourceAccessor,
HashAlgorithm hashAlgorithm,
StreamMapper streamMapper)
| Method Detail |
|---|
public Modifications getModifiedFiles()
throws ModzRegistryException
ModzRegistryException
public Modifications getModifiedFiles(java.io.InputStream registryStream)
throws ModzRegistryException
registryStream - a properties file, additionally a properly formed registry.
ModzRegistryException
public java.util.List<java.lang.String> getAddedFiles(java.io.File rootDirectory)
throws ModzRegistryException
ModzRegistryException
public java.util.List<java.lang.String> getAddedFiles(java.io.InputStream registryStream,
java.io.File root,
java.io.FileFilter filter)
throws ModzRegistryException
registryStream - the registry.root - the root of the file path to search for additional resources.
ModzRegistryException - if something untoward occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||