public abstract class AbstractDependencyScanner extends java.lang.Object implements IDependencyScanner
protected Object runScan(String file, InputStream is, String encoding); protected abstract LogicalFile createLogicalFile(String file, Object scanMetadata);
Constructor and Description |
---|
AbstractDependencyScanner() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createLogicalName(java.lang.String fileName)
Create a logical name from a file name, for example: /u/user/test/cobol/myfile.cbl
will create logical name MYFILE
|
LogicalFile |
scan(java.lang.String file,
java.io.InputStream inputStream)
Deprecated.
As of release 2.0.1, replaced by
scanStream(String, InputStream) |
LogicalFile |
scan(java.lang.String file,
java.io.InputStream inputStream,
java.lang.String encoding)
Deprecated.
As of release 2.0.1, replaced by
scanStream(String, InputStream, String) |
LogicalFile |
scan(java.lang.String file,
java.lang.String sourceDir)
Scan and collect logical dependency of a file
|
LogicalFile |
scan(java.lang.String file,
java.lang.String sourceDir,
java.lang.String encoding)
Scan and collect logical dependency of a file
|
java.util.List<LogicalFile> |
scanArchive(java.lang.String archive,
java.lang.String sourceDir)
Scan and collect logical dependencies from an archive
|
java.util.List<LogicalFile> |
scanArchive(java.lang.String archive,
java.lang.String sourceDir,
java.lang.String encoding)
Scan and collect logical dependencies from an archive
|
LogicalFile |
scanArchivedFile(java.lang.String archive,
java.lang.String sourceDir,
java.lang.String file)
Scan and collect the logical dependency from an archived file
|
LogicalFile |
scanArchivedFile(java.lang.String archive,
java.lang.String sourceDir,
java.lang.String file,
java.lang.String encoding)
Scan and collect the logical dependency from an archived file
|
LogicalFile |
scanStream(java.lang.String file,
java.io.InputStream inputStream)
Scan and collect logical dependency of a file
|
LogicalFile |
scanStream(java.lang.String file,
java.io.InputStream inputStream,
java.lang.String encoding)
Scan and collect logical dependency of a file
|
public LogicalFile scan(java.lang.String file, java.lang.String sourceDir) throws java.io.FileNotFoundException
scan
in interface IDependencyScanner
file
- the relative path of the file, or absolute path if sourceDir is null.sourceDir
- absolute path to the directory where the file is located, or null to use an absolute file path.LogicalFile
java.io.FileNotFoundException
- an exception occurredpublic LogicalFile scan(java.lang.String file, java.lang.String sourceDir, java.lang.String encoding) throws java.io.FileNotFoundException
scan
in interface IDependencyScanner
file
- the relative path of the file, or absolute path if sourceDir is null.sourceDir
- absolute path to the directory where the file is located, or null to use an absolute file path.encoding
- the encoding to be used to read the content of the fileLogicalFile
java.io.FileNotFoundException
- an exception occurredpublic LogicalFile scanStream(java.lang.String file, java.io.InputStream inputStream)
file
- the name of the fileinputStream
- the file contentLogicalFile
public LogicalFile scanStream(java.lang.String file, java.io.InputStream inputStream, java.lang.String encoding)
file
- the name of the fileinputStream
- the file contentencoding
- the encoding to be used to read the content of the fileLogicalFile
@Deprecated public LogicalFile scan(java.lang.String file, java.io.InputStream inputStream)
scanStream(String, InputStream)
scan
in interface IDependencyScanner
file
- the name of the fileinputStream
- the file contentLogicalFile
@Deprecated public LogicalFile scan(java.lang.String file, java.io.InputStream inputStream, java.lang.String encoding)
scanStream(String, InputStream, String)
scan
in interface IDependencyScanner
file
- the name of the fileinputStream
- the file contentencoding
- the encoding to be used to read the content of the fileLogicalFile
public java.util.List<LogicalFile> scanArchive(java.lang.String archive, java.lang.String sourceDir) throws BuildException
scanArchive
in interface IDependencyScanner
archive
- the name of the archivesourceDir
- the directory where the archive can be locatedList<LogicalFile>
BuildException
- an exception occurredpublic java.util.List<LogicalFile> scanArchive(java.lang.String archive, java.lang.String sourceDir, java.lang.String encoding) throws BuildException
scanArchive
in interface IDependencyScanner
archive
- the name of the archivesourceDir
- the directory where the archive can be locatedencoding
- the encoding of the file contentList<LogicalFile>
BuildException
- an exception occurredpublic LogicalFile scanArchivedFile(java.lang.String archive, java.lang.String sourceDir, java.lang.String file) throws BuildException
scanArchivedFile
in interface IDependencyScanner
archive
- the name of the archivesourceDir
- the directory where the archive can be locatedfile
- the name of the fileLogicalFile
BuildException
- an exception occurredpublic LogicalFile scanArchivedFile(java.lang.String archive, java.lang.String sourceDir, java.lang.String file, java.lang.String encoding) throws BuildException
scanArchivedFile
in interface IDependencyScanner
archive
- the name of the archivesourceDir
- the directory where the archive can be locatedfile
- the name of the fileencoding
- the encodingLogicalFile
BuildException
- an exception occurredpublic java.lang.String createLogicalName(java.lang.String fileName)
fileName
- the name of the file on HFS<IBM Copyright © 2018 IBM Corp. All Rights Reserved.