Package com.ibm.dbb.dependency
Class SearchPathImpactFinder
- java.lang.Object
-
- com.ibm.dbb.dependency.SearchPathImpactFinder
-
public class SearchPathImpactFinder extends java.lang.Object
The SearchPathImpactFinder class is used to search the DBB Metadata Store collections for any programs or intermediate source files that contains a reference to a changed source file. The returned list of impacted files from the resolveImpactedFiles method can then be used to determine which programs should be rebuilt due to a updated build dependency.Search path
TheSearchPathImpactFinder
constructor requires a searchPath argument that is a simple formatted String used to identify what changed files should impact analysis be performed on. Examples of search paths are listed below.// Search path using specific file extensions
String copybookImpacts = "search:/u/build/repo?path=** /*.cpy;** /*.copy";
// Targeted search path with specific directories
String copybookImpacts = "search:/u/build/repo?path=MortgageApplication/copybook/*.cpy";
-
-
Constructor Summary
Constructors Constructor Description SearchPathImpactFinder(java.lang.String searchPath, java.lang.String buildGroup, java.util.List<java.lang.String> collections)
Used to create an instance of theSearchPathImpactFinder
for Impact Analysis over the list of collections within the provided Build Group.SearchPathImpactFinder(java.lang.String searchPath, java.lang.String buildGroup, java.util.List<java.lang.String> collections, boolean disableCache)
Used to create an instance of theSearchPathImpactFinder
for Impact Analysis over the list of collections within the provided Build Group.SearchPathImpactFinder(java.lang.String searchPath, java.util.List<java.lang.String> collections)
Deprecated.As of release 2.0.2, replaced bySearchPathImpactFinder(String, String, List)
SearchPathImpactFinder(java.lang.String searchPath, java.util.List<java.lang.String> collections, boolean disableCache)
Deprecated.As of release 2.0.2, replaced bySearchPathImpactFinder(String, String, List, boolean)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<ImpactFile>
findImpactedFiles(java.lang.String changedFile, java.lang.String sourceDir)
This method uses themethod to retrieve the file's list of {@link LogicalDependency} to resolve.
java.util.List<java.lang.String>
getCollections()
Returns the list of collections for the impact finderjava.lang.String
getSearchPath()
Returns the dependency search path for the impact finderboolean
isDisableCache()
Returnstrue
if the LogicalFile cache is disabled.
-
-
-
Constructor Detail
-
SearchPathImpactFinder
@Deprecated public SearchPathImpactFinder(java.lang.String searchPath, java.util.List<java.lang.String> collections)
Deprecated.As of release 2.0.2, replaced bySearchPathImpactFinder(String, String, List)
Used to create an instance of theSearchPathImpactFinder
for Impact Analysis over a list of legacy collections.- Parameters:
searchPath
- Dependency search pathcollections
- A list of DBB collections to run impact queries against
-
SearchPathImpactFinder
@Deprecated public SearchPathImpactFinder(java.lang.String searchPath, java.util.List<java.lang.String> collections, boolean disableCache)
Deprecated.As of release 2.0.2, replaced bySearchPathImpactFinder(String, String, List, boolean)
Used to create an instance of theSearchPathImpactFinder
for Impact Analysis over a list of legacy collections- Parameters:
searchPath
- Dependency search pathcollections
- A list of DBB collections to run impact queries againstdisableCache
- Used to disable the logical file cache.
-
SearchPathImpactFinder
public SearchPathImpactFinder(java.lang.String searchPath, java.lang.String buildGroup, java.util.List<java.lang.String> collections)
Used to create an instance of theSearchPathImpactFinder
for Impact Analysis over the list of collections within the provided Build Group.- Parameters:
searchPath
- Dependency search pathbuildGroup
- The Build Group which contains the list of collectionscollections
- A list of DBB collections to run impact queries against
-
SearchPathImpactFinder
public SearchPathImpactFinder(java.lang.String searchPath, java.lang.String buildGroup, java.util.List<java.lang.String> collections, boolean disableCache)
Used to create an instance of theSearchPathImpactFinder
for Impact Analysis over the list of collections within the provided Build Group.- Parameters:
searchPath
- Dependency search pathbuildGroup
- The Build Group which contains the list of collectionscollections
- A list of DBB collections to run impact queries againstdisableCache
- Used to disable the logical file cache.
-
-
Method Detail
-
findImpactedFiles
public java.util.Set<ImpactFile> findImpactedFiles(java.lang.String changedFile, java.lang.String sourceDir) throws BuildException, DependencyException, java.io.IOException
This method uses themethod to retrieve the file's list of {@link LogicalDependency} to resolve.
- Parameters:
changedFile
- The changed source file to do impact analysis onsourceDir
- The source directory which contains the source file- Returns:
- a list of
ImpactFile
for each source file impacted by this file being changed - Throws:
BuildException
- If no scanner for the source file is not registeredDependencyException
- If an error occurs during dependency resolutionjava.io.IOException
- If an IO error occurs during dependency resolution
-
getSearchPath
public java.lang.String getSearchPath()
Returns the dependency search path for the impact finder
-
getCollections
public java.util.List<java.lang.String> getCollections()
Returns the list of collections for the impact finder
-
isDisableCache
public boolean isDisableCache()
Returnstrue
if the LogicalFile cache is disabled.
-
-