Package com.ibm.dbb.dependency
Class LogicalFile
- java.lang.Object
-
- com.ibm.dbb.dependency.LogicalFile
-
public class LogicalFile extends java.lang.Object
The LogicalFile class represents scanned source file dependency data stored in a repository collection. It is comprised of the following fields:- lname - The logical name of the file. Ex MortgageApplication/cobol/epsnbrvl.cbl -> EPSNBRVL
- file - This is the path of the file that was scanned. This is usually a relative path i.e. a path relative to a root source directory. This allows the file to be used as a key even when the root directory may change as when using a Git SCM where many local copies on different machines may be used.
- language - This is the coding language of the source file
- cics - Flag indicating the file contains EXEC CICS statements
- sql - Flag indicating the file contains EXEC SQL statements
- dli - Flag indicating the file contains EXEC DLI statements
- mq - Flag indicating the file contains CALL MQ* statements
- logicalDependencies - This is the list of dependencies identified for this file.
-
-
Constructor Summary
Constructors Constructor Description LogicalFile(java.lang.String lname, java.lang.String file)
Used to create an instance ofLogicalFile
LogicalFile(java.lang.String lname, java.lang.String file, java.lang.String language, boolean cics, boolean sql, boolean dli)
Used to create an instance ofLogicalFile
LogicalFile(java.lang.String lname, java.lang.String file, java.lang.String language, boolean cics, boolean sql, boolean dli, boolean mq)
Used to create an instance ofLogicalFile
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLogicalDependency(LogicalDependency logicalDependency)
Adds a logical dependency to the list of dependencies for this fileboolean
equals(java.lang.Object obj)
java.lang.String
getFile()
Returns the path (usually relative to a source directory) of the physical file that was scannedjava.lang.String
getLanguage()
Returns the coding language for this source filejava.lang.String
getLname()
Returns the logical name of the filejava.util.List<LogicalDependency>
getLogicalDependencies()
Returns the list of logical dependencies for this fileint
hashCode()
boolean
isCICS()
Returns flag indicating program contains EXEC CICS statementsboolean
isDLI()
Returns flag indicating program contains EXEC DLI statementsboolean
isMQ()
Returns flag indicating program contains MQ callsboolean
isSQL()
Returns flag indicating program contains EXEC SQL statementsjava.util.List<PhysicalDependency>
resolveDependencies(java.lang.String searchPathString)
Retrieves the list of the Physical Dependencies, resolved according to the searchPathStringjava.util.List<PhysicalDependency>
resolveDependencies(java.lang.String searchPathString, java.lang.String lname)
Retrieves the list of Physical Dependencies with the input logical name, resolved according to the searchPathStringjava.util.List<PhysicalDependency>
resolveDependencies(java.lang.String searchPathString, java.util.List<java.lang.String> lnames)
Retrieves the list of Physical Dependencies matching the logical names input, resolved according to the searchPathStringjava.util.List<PhysicalDependency>
resolveDependencies(java.util.List<com.ibm.dbb.dependency.internal.SearchPath> searchPathList)
Retrieves the list of the Physical Dependencies, resolved according to the searchPathStringjava.util.List<PhysicalDependency>
resolveDependencies(java.util.List<com.ibm.dbb.dependency.internal.SearchPath> searchPathList, java.util.List<java.lang.String> lnames)
Retrieves the list of Physical Dependencies matching the logical names input, resolved according to the searchPathStringvoid
setCICS(boolean value)
Sets flag indicating program contains EXEC CICS statementsvoid
setDLI(boolean value)
Sets flag indicating program contains EXEC DLI statementsvoid
setFile(java.lang.String file)
Sets the path (usually relative to a source directory) of the physical file that was scannedvoid
setLanguage(java.lang.String language)
Set the coding language for this source filevoid
setLname(java.lang.String lname)
Sets the logical name of the filevoid
setLogicalDependencies(java.util.List<LogicalDependency> logicalDependencies)
Sets the list of logical dependencies for this filevoid
setMQ(boolean value)
Sets flag indicating program contains MQ callsvoid
setSQL(boolean value)
Sets flag indicating program contains EXEC SQL statementscom.google.gson.JsonObject
toJSON()
Returns a JSON representation of this objectjava.lang.String
toString()
-
-
-
Constructor Detail
-
LogicalFile
public LogicalFile(java.lang.String lname, java.lang.String file)
Used to create an instance ofLogicalFile
- Parameters:
lname
- The logical name of the file. Ex MortgageApplication/cobol/epsnbrvl.cbl -> EPSNBRVLfile
- The file path of the physical file that was scanned (usually a relative path)
-
LogicalFile
public LogicalFile(java.lang.String lname, java.lang.String file, java.lang.String language, boolean cics, boolean sql, boolean dli)
Used to create an instance ofLogicalFile
- Parameters:
lname
- The logical name of the file. Ex MortgageApplication/cobol/epsnbrvl.cbl -> EPSNBRVLfile
- The file path of the physical file that was scanned (usually a relative path)language
- The coding language of the source filedli
- dependencysql
- sqlcics
- cics
-
LogicalFile
public LogicalFile(java.lang.String lname, java.lang.String file, java.lang.String language, boolean cics, boolean sql, boolean dli, boolean mq)
Used to create an instance ofLogicalFile
- Parameters:
lname
- The logical name of the file. Ex MortgageApplication/cobol/epsnbrvl.cbl -> EPSNBRVLfile
- The file path of the physical file that was scanned (usually a relative path)language
- The coding language of the source filedli
- dependencysql
- sqlcics
- cicsmq
- mq
-
-
Method Detail
-
resolveDependencies
public java.util.List<PhysicalDependency> resolveDependencies(java.lang.String searchPathString) throws BuildException, java.io.IOException
Retrieves the list of the Physical Dependencies, resolved according to the searchPathString- Parameters:
searchPathString
- the search path string to match against- Returns:
- the list of Physical Dependencies
- Throws:
BuildException
- on invalid searchPathString or error walking the search file treejava.io.IOException
- on error walking the search file tree
-
resolveDependencies
public java.util.List<PhysicalDependency> resolveDependencies(java.util.List<com.ibm.dbb.dependency.internal.SearchPath> searchPathList) throws DependencyException, BuildException, java.io.IOException
Retrieves the list of the Physical Dependencies, resolved according to the searchPathString- Parameters:
searchPathList
- - the list of SearchPath objects to match against- Returns:
- the list of Physical Dependencies
- Throws:
BuildException
- on invalid searchPathString or error walking the search file treejava.io.IOException
- on error walking the search file treeDependencyException
-
resolveDependencies
public java.util.List<PhysicalDependency> resolveDependencies(java.lang.String searchPathString, java.lang.String lname) throws BuildException, java.io.IOException
Retrieves the list of Physical Dependencies with the input logical name, resolved according to the searchPathString- Parameters:
searchPathString
- the search path string to match againstlname
- the logical name to match against- Returns:
- the list of physical dependencies
- Throws:
BuildException
- on invalid searchPathString or error walking the search file treejava.io.IOException
- on error walking the search file tree
-
resolveDependencies
public java.util.List<PhysicalDependency> resolveDependencies(java.lang.String searchPathString, java.util.List<java.lang.String> lnames) throws BuildException, java.io.IOException
Retrieves the list of Physical Dependencies matching the logical names input, resolved according to the searchPathString- Parameters:
searchPathString
- the search path string to match againstlnames
- a list of logical names to match against or null if ommitted- Returns:
- the list of Physical Dependencies
- Throws:
BuildException
- on invalid searchPathString or error walking the search file treejava.io.IOException
- on error walking the search file tree
-
resolveDependencies
public java.util.List<PhysicalDependency> resolveDependencies(java.util.List<com.ibm.dbb.dependency.internal.SearchPath> searchPathList, java.util.List<java.lang.String> lnames) throws BuildException, java.io.IOException
Retrieves the list of Physical Dependencies matching the logical names input, resolved according to the searchPathString- Parameters:
searchPathList
- the list of SearchPath objects to match againstlnames
- a list of logical names to match against or null if ommitted- Returns:
- the list of Physical Dependencies
- Throws:
BuildException
- on invalid searchPathString or error walking the search file treejava.io.IOException
- on error walking the search file tree
-
getLname
public java.lang.String getLname()
Returns the logical name of the file
-
setLname
public void setLname(java.lang.String lname)
Sets the logical name of the file- Parameters:
lname
- the logical name of the file
-
getFile
public java.lang.String getFile()
Returns the path (usually relative to a source directory) of the physical file that was scanned
-
setFile
public void setFile(java.lang.String file)
Sets the path (usually relative to a source directory) of the physical file that was scanned- Parameters:
file
- the path of the physical file that was scanned
-
getLogicalDependencies
public java.util.List<LogicalDependency> getLogicalDependencies()
Returns the list of logical dependencies for this file
-
setLogicalDependencies
public void setLogicalDependencies(java.util.List<LogicalDependency> logicalDependencies)
Sets the list of logical dependencies for this file- Parameters:
logicalDependencies
- the list of the logical dependencies for this file
-
addLogicalDependency
public void addLogicalDependency(LogicalDependency logicalDependency)
Adds a logical dependency to the list of dependencies for this file- Parameters:
logicalDependency
- the logical dependency to be added
-
getLanguage
public java.lang.String getLanguage()
Returns the coding language for this source file
-
isCICS
public boolean isCICS()
Returns flag indicating program contains EXEC CICS statements
-
setCICS
public void setCICS(boolean value)
Sets flag indicating program contains EXEC CICS statements- Parameters:
value
- boolean indicating program contains EXEC CICS statements
-
isSQL
public boolean isSQL()
Returns flag indicating program contains EXEC SQL statements
-
setSQL
public void setSQL(boolean value)
Sets flag indicating program contains EXEC SQL statements- Parameters:
value
- boolean indicating program contains EXEC SQL statements
-
isDLI
public boolean isDLI()
Returns flag indicating program contains EXEC DLI statements
-
setDLI
public void setDLI(boolean value)
Sets flag indicating program contains EXEC DLI statements- Parameters:
value
- boolean indicating program contains EXEC DLI statements
-
setLanguage
public void setLanguage(java.lang.String language)
Set the coding language for this source file- Parameters:
language
- the coding language for this source file
-
isMQ
public boolean isMQ()
Returns flag indicating program contains MQ calls
-
setMQ
public void setMQ(boolean value)
Sets flag indicating program contains MQ calls- Parameters:
value
- boolean indicating program contains MQ calls
-
toJSON
public com.google.gson.JsonObject toJSON()
Returns a JSON representation of this object- Returns:
- the JSON representation of this object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-