public class ConfigureFileLocator extends java.lang.Object implements ConfigureLocatorInterface
Modifier and Type | Field and Description |
---|---|
(package private) java.io.File |
extractFile |
protected java.util.Vector<java.lang.String> |
paths |
(package private) boolean |
projectExtracted |
Constructor and Description |
---|
ConfigureFileLocator()
Constructor for ConfigureLocator
|
Modifier and Type | Method and Description |
---|---|
CaseInsensitiveFile |
extractConfigPath(java.lang.String rootDir,
java.lang.String configPath)
Extract project and test assets to a Temp directory if embedded inside a JAR file.
|
(package private) java.io.File |
getExtractionDirectory()
Deduce a Temp directory or user-specified extraction directory for JAR extraction.
|
ConfigureInterface |
locateConfigureInterface(java.lang.String rootDir,
java.lang.String configPath)
Attempt to locate DRIVER configuration data.
|
java.io.File |
locateRootDir(java.lang.String rootDir)
Attempt to locate DRIVER root/install directory.
|
protected ConfigureInterface |
uniqueConfigureInterface(java.io.File candidate)
return a valid ConfigureInterface with the candidate path signature only once.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfigureLocator
protected java.util.Vector<java.lang.String> paths
boolean projectExtracted
java.io.File extractFile
public ConfigureFileLocator()
public java.io.File locateRootDir(java.lang.String rootDir)
ConfigureLocatorInterface
locateRootDir
in interface ConfigureLocatorInterface
rootDir
- -- The rootDir may be a String
containing a path to a directory, or to a file, or to some
other type of object as needed by the specific implementation.
ConfigureLocatorInterface.locateRootDir(String)
protected ConfigureInterface uniqueConfigureInterface(java.io.File candidate)
public ConfigureInterface locateConfigureInterface(java.lang.String rootDir, java.lang.String configPath)
ConfigureLocatorInterface
locateConfigureInterface
in interface ConfigureLocatorInterface
rootDir
- -- The rootDir may be a String
containing a path to a directory, or to a file, or to some
other type of object as needed by the specific implementation.configPath
- -- The configPath may be a String
containing a path to a directory, or to a file, or to some
other type of object as needed by the specific implementation.
The rootDir and configPath may be used in combination to resolve to the ConfigureInterface.
ConfigureLocatorInterface.locateConfigureInterface(String, String)
java.io.File getExtractionDirectory() throws java.io.IOException
The routine will seek the System.getProperty("safs.project.extract") to extract to an alternative directory instead of the Temp directory.
JVM Arg: -Dsafs.project.extract=<absolute path to extraction directory>
java.io.IOException
public CaseInsensitiveFile extractConfigPath(java.lang.String rootDir, java.lang.String configPath)
The routine will seek the System.getProperty("safs.project.extract") to extract to an alternative directory instead of the Temp directory.
All assets should be stored in rootDir that exists in JAR file.
the ini file (configPath) is a file in that directory.
rootDir
- - required name of a project root directory to seek in the main class JAR file.configPath
- -- required name of a configuration file to seek in the project root directory.MainClass
Copyright © SAS Institute. All Rights Reserved.