copySettings(File newOrderFileName, String newSettingsDirectory) Creates a replica of the settings file structure in another directory
(fully recursive, includes all per host settings).
public void
deleteSettingsObject(CrawlerSettings settings) Delete a settings object from persistent storage.
Deletes the file represented by the submitted settings object.
initialize(File source) Initialize the SettingsHandler from a source.
This method builds the settings data structure and initializes it with
settings from the order file given as a parameter.
readSettingsObject(CrawlerSettings settings, File f) Read the CrawlerSettings object from a specific file.
Parameters: settings - the settings object to be updated with data from thepersistent storage. Parameters: f - the file to read from.
settingsToFilename(CrawlerSettings settings) Resolves the filename for a settings object into a file path.
It will also create the directory structure leading to this file
if it doesn't exist.
Parameters: settings - the settings object to get file path for.
Creates a replica of the settings file structure in another directory
(fully recursive, includes all per host settings). The SettingsHandler
will then refer to the new files.
Observe that this method should only be called after the SettingsHandler
has been initialized.
Parameters: newOrderFileName - where the new order file should be saved. Parameters: newSettingsDirectory - the top level directory of the per host/domainsettings files. throws: IOException -
Delete a settings object from persistent storage.
Deletes the file represented by the submitted settings object. All empty
directories that are parents to the files path are also deleted.
Parameters: settings - the settings object to delete.
Transforms a relative path so that it is relative to the location of the
order file. If an absolute path is given, it will be returned unchanged.
The location of it's order file is always considered as the 'working'
directory for any given settings.
Parameters: path - A relative path to a file (or directory) The same path modified so that it is relative to the file levellocation of the order file for the settings handler.
Initialize the SettingsHandler.
This method builds the settings data structure and initializes it with
settings from the order file given to the constructor.
Initialize the SettingsHandler from a source.
This method builds the settings data structure and initializes it with
settings from the order file given as a parameter. The intended use is
to create a new order file based on a default (template) order file.
Parameters: source - the order file to initialize from.
Read the CrawlerSettings object from a specific file.
Parameters: settings - the settings object to be updated with data from thepersistent storage. Parameters: f - the file to read from. the updated settings object or null if there was no data for thisin the persistent storage.
Resolves the filename for a settings object into a file path.
It will also create the directory structure leading to this file
if it doesn't exist.
Parameters: settings - the settings object to get file path for. the file path for this settings object.
Write a CrawlerSettings object to a specified file.
This method is similar to
XMLSettingsHandler.writeSettingsObject(CrawlerSettings) except that it uses the submitted File object instead of trying to
resolve where the file should be written.
Parameters: settings - the settings object to be serialized. Parameters: filename - the file to which the settings object should be written.
Fields inherited from org.archive.crawler.settings.SettingsHandler