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 and Description
      LogicalFile(java.lang.String lname, java.lang.String file)
      Used to create an instance of LogicalFile
      LogicalFile(java.lang.String lname, java.lang.String file, java.lang.String language, boolean cics, boolean sql, boolean dli)
      Used to create an instance of LogicalFile
      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 of LogicalFile
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addLogicalDependency(LogicalDependency logicalDependency)
      Adds a logical dependency to the list of dependencies for this file
      boolean equals(java.lang.Object obj) 
      java.util.List<ImpactFile> findImpacts(IRepositoryClient repositoryClient, java.util.List<java.lang.String> collections, java.lang.String searchPath) 
      java.lang.String getFile()
      Returns the path (usually relative to a source directory) of the physical file that was scanned
      java.lang.String getLanguage()
      Returns the coding language for this source file
      java.lang.String getLname()
      Returns the logical name of the file
      java.util.List<LogicalDependency> getLogicalDependencies()
      Returns the list of logical dependencies for this file
      int hashCode() 
      boolean isCICS()
      Returns flag indicating program contains EXEC CICS statements
      boolean isDLI()
      Returns flag indicating program contains EXEC DLI statements
      boolean isMQ()
      Returns flag indicating program contains MQ calls
      boolean isSQL()
      Returns flag indicating program contains EXEC SQL statements
      java.util.List<PhysicalDependency> resolveDependencies(java.lang.String searchPathString) 
      java.util.List<PhysicalDependency> resolveDependencies(java.lang.String searchPathString, java.util.List<java.lang.String> lnames) 
      java.util.List<PhysicalDependency> resolveDependencies(java.lang.String searchPathString, java.lang.String lname) 
      void setCICS(boolean value)
      Sets flag indicating program contains EXEC CICS statements
      void setDLI(boolean value)
      Sets flag indicating program contains EXEC DLI statements
      void setFile(java.lang.String file)
      Sets the path (usually relative to a source directory) of the physical file that was scanned
      void setLanguage(java.lang.String language)
      Set the coding language for this source file
      void setLname(java.lang.String lname)
      Sets the logical name of the file
      void setLogicalDependencies(java.util.List<LogicalDependency> logicalDependencies)
      Sets the list of logical dependencies for this file
      void setMQ(boolean value)
      Sets flag indicating program contains MQ calls
      void setSQL(boolean value)
      Sets flag indicating program contains EXEC SQL statements
      com.ibm.json.java.JSONObject toJSON()
      Returns a JSON representation of this object
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LogicalFile

        public LogicalFile(java.lang.String lname,
                           java.lang.String file)
        Used to create an instance of LogicalFile
        Parameters:
        lname - The logical name of the file. Ex MortgageApplication/cobol/epsnbrvl.cbl -> EPSNBRVL
        file - 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 of LogicalFile
        Parameters:
        lname - The logical name of the file. Ex MortgageApplication/cobol/epsnbrvl.cbl -> EPSNBRVL
        file - The file path of the physical file that was scanned (usually a relative path)
        language - The coding language of the source file
        dli - dependency
        sql - sql
        cics - 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 of LogicalFile
        Parameters:
        lname - The logical name of the file. Ex MortgageApplication/cobol/epsnbrvl.cbl -> EPSNBRVL
        file - The file path of the physical file that was scanned (usually a relative path)
        language - The coding language of the source file
        dli - dependency
        sql - sql
        cics - cics
        mq - mq
    • Method Detail

      • 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.ibm.json.java.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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object

<IBM Copyright © 2018 IBM Corp. All Rights Reserved.