public class ScanFiles extends Object implements AppSpecKeys
Modifier and Type | Class and Description |
---|---|
protected static class |
ScanFiles.CompareURLByBaseName |
protected static class |
ScanFiles.Listing |
commandLineArgumentsKey, configurationURLsKey, documentFormatPluginClassNamesKey, drivePluginClassNamesKey, foProcessorPluginClassNamesKey, guiCustomizationURLsKey, guiSpecLocationKey, imageToolkitPluginClassNamesKey, installDirectoryKey, jarURLsKey, preferencePropertiesKey, spellCheckerPluginClassNamesKey, startErrorsKey, systemPropertiesKey, userPreferencesDirectoryKey, xmlCatalogURLsKey
Constructor and Description |
---|
ScanFiles()
Constructs a ScanFiles utility.
|
Modifier and Type | Method and Description |
---|---|
protected Object[] |
addonDirs(File installDir,
File userDir) |
protected static Properties |
configureProxies(File userDir) |
protected URL |
createURL(URL baseURL,
String path) |
protected void |
doScanAddonDir(File addonDir,
boolean testOsArch,
ArrayList<URL> confList) |
protected static String |
getNonEmptyProperty(String propName) |
protected File |
installDir() |
static boolean |
isMarkedAsRemoved(File dir) |
static boolean |
markAsRemoved(File dir,
String specFileName) |
protected static boolean |
removeMarked(File dir) |
static boolean |
retryRename(File from,
File to) |
protected void |
scanAddonDir(File addonDir,
boolean testOsArch) |
protected void |
scanAddonDirs(File installDir,
File userDir,
boolean testOsArch) |
protected void |
scanAddonListing(String[] paths,
URL baseURL,
boolean testOsArch) |
void |
scanFiles(File installDir,
File userDir,
boolean testOsArch,
Map<String,Object> appSpecs)
Scans the installation directory and, optionally, the
user preferences directory in order to populate a map
specifying how to assemble and configure the application.
|
void |
scanFiles(Map<String,Object> appSpecs)
Scans the installation directory and the user preferences directory
in order to populate a map specifying how to assemble and configure
the application.
|
protected String |
serviceImpl(URL jarURL,
String serviceName) |
protected boolean |
skipAddonDir(File addonDir,
File[] files) |
static File |
userPreferencesDir()
Returns the user preferences directory.
|
protected static final String addonBaseName
protected static final String addonPathProperty
protected static final String addonPathPropertyRef
protected static final String userPreferencesDirProperty
protected static final String userPreferencesDirPropertyRef
protected static final String drivePluginSuffix
protected static final String foProcessorPluginSuffix
protected static final String imageToolkitPluginSuffix
protected static final String spellCheckerPluginSuffix
protected static final String documentFormatPluginSuffix
protected static final String configurationSuffix
protected static final String xmlCatalogSuffix
protected static final String dictionarySuffix
protected static final String guiCustomizationBaseName
protected static final String drivePluginService
protected static final String foProcessorPluginService
protected static final String imageToolkitPluginService
protected static final String spellCheckerPluginService
protected static final String documentFormatPluginService
protected static final ScanFiles.CompareURLByBaseName compareURLByBaseName
public ScanFiles()
public void scanFiles(Map<String,Object> appSpecs) throws RuntimeException
appSpecs
- map populated by this methodRuntimeException
protected File installDir() throws RuntimeException
RuntimeException
public void scanFiles(File installDir, File userDir, boolean testOsArch, Map<String,Object> appSpecs)
installDir
- the installation directoryuserDir
- the user preferences directory.
May be null
.testOsArch
- if true
, JAR files containing
native libraries not compatible with the current
operating system/architecture are ignoredappSpecs
- map populated by this methodOsArchUtil
public static final File userPreferencesDir()
null
or a non-existent path.protected static final Properties configureProxies(File userDir)
protected void scanAddonDir(File addonDir, boolean testOsArch)
protected void doScanAddonDir(File addonDir, boolean testOsArch, ArrayList<URL> confList)
protected static final boolean removeMarked(File dir)
public static final boolean isMarkedAsRemoved(File dir)