Package com.ibm.dbb.dependency
Class PhysicalDependency
- java.lang.Object
-
- com.ibm.dbb.dependency.LogicalDependency
-
- com.ibm.dbb.dependency.PhysicalDependency
-
public class PhysicalDependency extends LogicalDependency
The PhysicalDependency class represents a logical dependency that has been processed by theDependencyResolver. It may or may not have been resolved to a physical file on the build file system. If unresolved then the resolved flag is set tofalseand the three resolution fields (collection, sourceDir, file) are set tonull.
-
-
Constructor Summary
Constructors Constructor Description PhysicalDependency()PhysicalDependency(LogicalDependency dependency)Public ConstructorPhysicalDependency(LogicalDependency dependency, java.lang.String collection, java.lang.String sourceDir, java.lang.String file)Public Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetArchive()Returns the archive path for this dependencyjava.lang.StringgetCollection()Returns the repository collection name the dependency was located injava.lang.StringgetFile()Returns the resolved physical file for this dependencyjava.lang.StringgetSourceDir()Returns the root source directory the physical file will be located ininthashCode()booleanisExcluded()Flag indicating if the PhysicalDependency was excluded from searchPath find() (likely due to path)booleanisResolved()Flag indicating if the logical dependency was resolved to a physical filevoidparseFromJSON(com.google.gson.JsonObject jsonObject)Sets the logical name, library, and category according to a JSON representation of the objectvoidsetArchive(java.lang.String archive)Sets the archive path for this dependencyvoidsetCollection(java.lang.String collection)Sets the repository collection name the dependency was located invoidsetExcluded(boolean excluded)Set the flag indicating if the PhysicalDependency was excluded from searchvoidsetFile(java.lang.String file)Sets the resolved physical file for this dependencyvoidsetResolved(boolean value)Set the flag indicating if the logical dependency was resolved to a physical filevoidsetSourceDir(java.lang.String sourceDir)Sets the root source directory the physical file will be located incom.google.gson.JsonObjecttoJSON()Returns a JSON representation of the objectjava.lang.StringtoString()-
Methods inherited from class com.ibm.dbb.dependency.LogicalDependency
getCategory, getLibrary, getLname, setCategory, setLibrary, setLname
-
-
-
-
Constructor Detail
-
PhysicalDependency
public PhysicalDependency()
-
PhysicalDependency
public PhysicalDependency(LogicalDependency dependency)
Public Constructor- Parameters:
dependency- Logical dependency this physical dependency is based on
-
PhysicalDependency
public PhysicalDependency(LogicalDependency dependency, java.lang.String collection, java.lang.String sourceDir, java.lang.String file)
Public Constructor- Parameters:
dependency- Logical dependency this physical dependency is base oncollection- Repository collection name the dependency was located insourceDir- The root source directory the physical file is located infile- The resolved file for this dependency
-
-
Method Detail
-
getCollection
public java.lang.String getCollection()
Returns the repository collection name the dependency was located in- Returns:
- the repository collection name the dependendcy was located in
-
setCollection
public void setCollection(java.lang.String collection)
Sets the repository collection name the dependency was located in- Parameters:
collection- the repository collection name the dependency was located in
-
getSourceDir
public java.lang.String getSourceDir()
Returns the root source directory the physical file will be located in- Returns:
- the root source diredctory the physical fiel will be located in
-
setSourceDir
public void setSourceDir(java.lang.String sourceDir)
Sets the root source directory the physical file will be located in- Parameters:
sourceDir- the root source directory the physical file will be located in
-
getFile
public java.lang.String getFile()
Returns the resolved physical file for this dependency- Returns:
- the resolved physical file for this dependency
-
setFile
public void setFile(java.lang.String file)
Sets the resolved physical file for this dependency- Parameters:
file- the resolved physical file for this dependency
-
getArchive
public java.lang.String getArchive()
Returns the archive path for this dependency- Returns:
- archive the absolute path to the archive
-
setArchive
public void setArchive(java.lang.String archive)
Sets the archive path for this dependency- Parameters:
archive- the absolute path to the archive
-
isResolved
public boolean isResolved()
Flag indicating if the logical dependency was resolved to a physical file- Returns:
- the flag indicating if the logical dependency was resolved to a physical file
-
setResolved
public void setResolved(boolean value)
Set the flag indicating if the logical dependency was resolved to a physical file- Parameters:
value- the flag indicating if the logical dependency was resolved to a physical file
-
isExcluded
public boolean isExcluded()
Flag indicating if the PhysicalDependency was excluded from searchPath find() (likely due to path)
-
setExcluded
public void setExcluded(boolean excluded)
Set the flag indicating if the PhysicalDependency was excluded from search- Parameters:
value- the flag indicating if PhysicalDependency was found
-
hashCode
public int hashCode()
- Overrides:
hashCodein classLogicalDependency
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classLogicalDependency
-
toJSON
public com.google.gson.JsonObject toJSON()
Description copied from class:LogicalDependencyReturns a JSON representation of the object- Overrides:
toJSONin classLogicalDependency- Returns:
- the JSON representation of the object
-
parseFromJSON
public void parseFromJSON(com.google.gson.JsonObject jsonObject)
Description copied from class:LogicalDependencySets the logical name, library, and category according to a JSON representation of the object- Overrides:
parseFromJSONin classLogicalDependency- Parameters:
jsonObject- the JSON representation of the object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classLogicalDependency
-
-