|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.utils.Settings
public class Settings
Provides access to general application settings. The settings are retrieved from an settings.xml file.
Field Summary | |
---|---|
static java.lang.String |
APPLICATIONNAME
The name of the application, fx. |
static java.lang.String |
ARC_REPOSITORY_CLIENT
The class that implements the ArcRepositoryClient. |
static java.lang.String |
ARCREPOSITORY_GET_TIMEOUT
How many milliseconds we will wait before giving up on a lookup request to the Arcrepository |
static java.lang.String |
ARCREPOSITORY_STORE_RETRIES
Number of times to try sending a store message before failing, including the first attempt. |
static java.lang.String |
ARCREPOSITORY_STORE_TIMEOUT
Timeout in milliseconds before retrying when calling ArcRepositoryClient.store() |
static java.lang.String |
BITARCHIVE_ACCEPTABLE_HEARTBEAT_DELAY
If we haven't heard from a bit archive within this many milliseconds, we don't excpect it to be online and won't wait for them to reply on a batch job. |
static java.lang.String |
BITARCHIVE_BATCH_JOB_TIMEOUT
The BitarchiveMonitorServer will listen for BatchEndedMessages for this many milliseconds before it decides that a batch job is taking too long and returns just the replies it has received at that point. |
static java.lang.String |
BITARCHIVE_HEARTBEAT_FREQUENCY
The frequency in milliseconds of heartbeats that are sent by each BitarchiveServer to the BitarchiveMonitor. |
static java.lang.String |
BITARCHIVE_LIMIT_FOR_RECORD_DATATRANSFER_IN_FILE
When the length record exceeds this number, the contents of the record will be transferred using a RemoteFile. |
static java.lang.String |
BITARCHIVE_MIN_SPACE_LEFT
The minimum amount of bytes left *in any dir* that we will allow a bitarchive machine to accept uploads with. |
static java.lang.String |
BITARCHIVE_SERVER_FILEDIR
These are the directories where ARC files are stored (in a subdir). |
static java.lang.String |
CACHE_DIR
The name of the directory where cache data global to the entire machine can be stored. |
static java.lang.String |
CRAWLER_TIMEOUT_NON_RESPONDING
The timeout value (in seconds) used in HeritrixLauncher for aborting crawl. |
static java.lang.String |
DB_BACKUP_INIT_HOUR
The earliest time of day backup will be initiated, 0..24 hours. |
static java.lang.String |
DB_SPECIFICS_CLASS
The class that defines DB-specific methods |
static java.lang.String |
DB_URL
URL to use to connect to the database. |
(package private) static java.lang.String |
DEFAULT_FILEPATH
The default place where the settings file can be found. |
static java.lang.String |
DEFAULT_SEEDLIST
Default seed list to use when new domains are created. |
static java.lang.String |
DIR_ARCREPOSITORY_BITPRESERVATION
Absolute or relative path to dir containing results of file-list-batch-jobs and checksumming batch jobs for bit preservation |
static java.lang.String |
DIR_COMMONTEMPDIR
Common temporary directory for all applications. |
static java.lang.String |
DIRS_ARCREPOSITORY_ADMIN
Absolute/relative path to where the "central list of files and checksums" (admin.data) is written. |
static java.lang.String |
DOMAIN_CONFIG_MAXRATE
Default download rate for domain configuration. |
static java.lang.String |
DOMAIN_DEFAULT_CONFIG
The name of a configuration that is created by default and which is initially used for snapshot harvests. |
static java.lang.String |
DOMAIN_DEFAULT_ORDERXML
Name of order xml template used for domains if nothing else is specified (e.g. |
static java.lang.String |
ENVIRONMENT_BATCH_LOCATION
Default bit archive to use for batch jobs (if none is specified) |
static java.lang.String |
ENVIRONMENT_LOCATION_NAMES
The names of all institutional bit archive locations in the environment, e.g., "KB" and "SB". |
static java.lang.String |
ENVIRONMENT_NAME
The name of the environment in which this code is running, e.g. |
static java.lang.String |
ENVIRONMENT_THIS_CREDENTIALS
Credentials to enter in the GUI for "deleting" ARC files in this bit archive. |
static java.lang.String |
ENVIRONMENT_THIS_LOCATION
For archiving applications, which bit archive are you part of? |
static java.lang.String |
ERRORFACTOR_PERMITTED_BESTGUESS
Used when calculating expected size of a harvest of some configuration during job-creation process. |
static java.lang.String |
ERRORFACTOR_PERMITTED_PREVRESULT
Used when calculating expected size of a harvest of some configuration during job-creation process. |
static java.lang.String |
EXPECTED_AVERAGE_BYTES_PER_OBJECT
How many bytes the average object is expected to be on domains where we don't know any better. |
static java.lang.String |
FTP_COPYTO_RETRIES
The number of times FTPRemoteFile should try before giving up a copyTo operation. |
static java.lang.String |
FTP_SERVER_NAME
The default FTP-server used. |
static java.lang.String |
FTP_SERVER_PORT
The default FTP-server port used. |
static java.lang.String |
FTP_USER_NAME
The default FTP username. |
static java.lang.String |
FTP_USER_PASSWORD
The default FTP password. |
static java.lang.String |
HARVEST_CONTROLLER_ISRUNNING_FILE
The file used to signal that the harvest controller is running. |
static java.lang.String |
HARVEST_CONTROLLER_OLDJOBSDIR
The directory in which data from old jobs is kept after uploading. |
static java.lang.String |
HARVEST_CONTROLLER_PRIORITY
Pool to take jobs from |
static java.lang.String |
HARVEST_CONTROLLER_SERVERDIR
Each job gets a subdir of this dir. |
static java.lang.String |
HTTP_PORT_NUMBER
The *unique* (per host) port number that may or may not be used to serve http, but is frequently used to identify the process. |
static java.lang.String |
HTTPREMOTEFILE_PORT_NUMBER
HTTP remotefile port number. |
static java.lang.String |
INACTIVITY_TIMEOUT_IN_SECS
The timeout setting for aborting a crawl based on crawler-inactivity. |
static java.lang.String |
INDEXREQUEST_TIMEOUT
The amount of time, in milliseconds, we should wait for replies when issuing a call to generate an index over som jobs. |
static java.lang.String |
INDEXSERVER_CLIENT
The class instantiated to give access to indices. |
static java.lang.String |
JMS_BROKER_HOST
The JMS broker host contacted by the JMS connection. |
static java.lang.String |
JMS_BROKER_PORT
The port the JMS connection should use. |
static java.lang.String |
JMS_BROKER_VENDOR
Selects the broker vendor to be used. |
static java.lang.String |
JMX_HOST_NAME
The name of a JMX host. |
static java.lang.String |
JMX_HOST_PORT
The port of a JMX host. |
static java.lang.String |
JMX_HOSTS_NUMBER_SETTING
The number of different hosts where MBeanservers reside. |
static java.lang.String |
JMX_MONITOR_ROLE_PASSWORD_SETTING
The password needed to connect as 'monitorRole' to the MBeanservers. |
static java.lang.String |
JMX_PASSWORD_FILE
Which file to look for JMX passwords in. |
static java.lang.String |
JMX_PORT
Which port to use for JMX. |
static java.lang.String |
JMX_RMI_PORT
Which port to use for JMX's RMI communication. |
static java.lang.String |
JOBS_MAX_RELATIVE_SIZE_DIFFERENCE
The maximum allowed relative difference in expected number of objects retrieved in a single job definition. |
static java.lang.String |
JOBS_MAX_TOTAL_JOBSIZE
When this limit is exceeded no more configurations may be added to a job. |
static java.lang.String |
JOBS_MIN_ABSOLUTE_SIZE_DIFFERENCE
Size differences for jobs below this threshold are ignored, regardless of the limits for the relative size difference. |
static java.lang.String |
LANGUAGE_LOCALE
A locale the website is available as. |
static java.lang.String |
LANGUAGE_NAME
The native name of the language for the website locale. |
static java.lang.String |
LOGGING_HISTORY_SIZE
|
static java.lang.String |
MAIL_RECEIVER
The receiver of email notifications. |
static java.lang.String |
MAIL_SENDER
The sender of email notifications. |
static java.lang.String |
MAIL_SERVER
The mail server to use when sending mails. |
static java.lang.String |
MAX_CONFIGS_PER_JOB_CREATION
How many domain configurations we will process in one go before making jobs out of them. |
static java.lang.String |
MAX_DOMAIN_SIZE
Initial guess of #objects in an unknown domain |
static java.lang.String |
NOTIFICATIONS_CLASS
The implementation class for notifications. |
static java.lang.String |
REMOTE_FILE_CLASS
The class to use for RemoteFile objects. |
static java.lang.String |
SETTINGS_FILE_NAME_PROPERTY
The property name specifying the file name of the settings file. |
static java.lang.String |
SITESECTION_CLASS
The subclass of SiteSection that defines a part of the web interface. |
static java.lang.String |
SITESECTION_DEPLOYPATH
The URL path for this site section. |
static java.lang.String |
SITESECTION_WEBAPPLICATION
The directory or war-file containing the web application for a site section. |
static java.lang.String |
VALID_DOMAIN_REGEX
This setting describes a regular expression used to validate domains against. |
static java.lang.String |
VIEWERPROXY_DIR
The main directory for the ViewerProxy, used for storing the Lucene index for the jobs being viewed. |
static java.lang.String |
VIEWERPROXY_HOSTNAME
The name of the server used for viewerproxy links in the GUI. |
Method Summary | |
---|---|
static void |
create(java.lang.String key,
java.lang.String value)
Create a new setting. |
static java.lang.String |
get(java.lang.String key)
Gets a setting. |
static java.lang.String[] |
getAll(java.lang.String key)
Gets a list of settings. |
static int |
getInt(java.lang.String key)
Gets a setting as an int. |
static long |
getLong(java.lang.String key)
Gets a setting as a long. |
static java.lang.String |
getSettingsFilePath()
|
static void |
reload()
Reloads the settings. |
static void |
set(java.lang.String key,
java.lang.String... values)
Sets the key to one or more values. |
static void |
validateStrings()
Validate that the strings defined in this class are present in the settings.xml file. |
static void |
validateWithXSD()
Validate that the settings.xml file conforms to the XSD. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SETTINGS_FILE_NAME_PROPERTY
static final java.lang.String DEFAULT_FILEPATH
public static final java.lang.String DIR_COMMONTEMPDIR
public static final java.lang.String REMOTE_FILE_CLASS
public static final java.lang.String FTP_SERVER_NAME
public static final java.lang.String FTP_SERVER_PORT
public static final java.lang.String FTP_USER_NAME
public static final java.lang.String FTP_USER_PASSWORD
public static final java.lang.String FTP_COPYTO_RETRIES
public static final java.lang.String HTTPREMOTEFILE_PORT_NUMBER
public static final java.lang.String JMS_BROKER_VENDOR
public static final java.lang.String JMS_BROKER_HOST
public static final java.lang.String JMS_BROKER_PORT
public static final java.lang.String ENVIRONMENT_NAME
public static final java.lang.String HTTP_PORT_NUMBER
public static final java.lang.String ARC_REPOSITORY_CLIENT
public static final java.lang.String ARCREPOSITORY_GET_TIMEOUT
public static final java.lang.String ARCREPOSITORY_STORE_RETRIES
public static final java.lang.String ARCREPOSITORY_STORE_TIMEOUT
public static final java.lang.String INDEXSERVER_CLIENT
public static final java.lang.String INDEXREQUEST_TIMEOUT
public static final java.lang.String CACHE_DIR
public static final java.lang.String DEFAULT_SEEDLIST
public static final java.lang.String DOMAIN_DEFAULT_CONFIG
public static final java.lang.String DOMAIN_DEFAULT_ORDERXML
public static final java.lang.String DOMAIN_CONFIG_MAXRATE
public static final java.lang.String VALID_DOMAIN_REGEX
public static final java.lang.String DB_SPECIFICS_CLASS
public static final java.lang.String DB_URL
public static final java.lang.String DB_BACKUP_INIT_HOUR
public static final java.lang.String ERRORFACTOR_PERMITTED_PREVRESULT
public static final java.lang.String ERRORFACTOR_PERMITTED_BESTGUESS
public static final java.lang.String EXPECTED_AVERAGE_BYTES_PER_OBJECT
public static final java.lang.String MAX_DOMAIN_SIZE
public static final java.lang.String JOBS_MAX_RELATIVE_SIZE_DIFFERENCE
public static final java.lang.String JOBS_MIN_ABSOLUTE_SIZE_DIFFERENCE
public static final java.lang.String JOBS_MAX_TOTAL_JOBSIZE
public static final java.lang.String MAX_CONFIGS_PER_JOB_CREATION
public static final java.lang.String HARVEST_CONTROLLER_SERVERDIR
public static final java.lang.String HARVEST_CONTROLLER_OLDJOBSDIR
public static final java.lang.String HARVEST_CONTROLLER_PRIORITY
public static final java.lang.String INACTIVITY_TIMEOUT_IN_SECS
public static final java.lang.String CRAWLER_TIMEOUT_NON_RESPONDING
public static final java.lang.String HARVEST_CONTROLLER_ISRUNNING_FILE
public static final java.lang.String SITESECTION_CLASS
public static final java.lang.String SITESECTION_WEBAPPLICATION
public static final java.lang.String SITESECTION_DEPLOYPATH
public static final java.lang.String LANGUAGE_LOCALE
public static final java.lang.String LANGUAGE_NAME
public static final java.lang.String DIRS_ARCREPOSITORY_ADMIN
public static final java.lang.String ENVIRONMENT_LOCATION_NAMES
public static final java.lang.String ENVIRONMENT_BATCH_LOCATION
public static final java.lang.String BITARCHIVE_MIN_SPACE_LEFT
public static final java.lang.String BITARCHIVE_SERVER_FILEDIR
public static final java.lang.String BITARCHIVE_HEARTBEAT_FREQUENCY
public static final java.lang.String BITARCHIVE_ACCEPTABLE_HEARTBEAT_DELAY
public static final java.lang.String BITARCHIVE_BATCH_JOB_TIMEOUT
public static final java.lang.String ENVIRONMENT_THIS_LOCATION
public static final java.lang.String ENVIRONMENT_THIS_CREDENTIALS
public static final java.lang.String BITARCHIVE_LIMIT_FOR_RECORD_DATATRANSFER_IN_FILE
public static final java.lang.String DIR_ARCREPOSITORY_BITPRESERVATION
public static final java.lang.String VIEWERPROXY_HOSTNAME
public static final java.lang.String VIEWERPROXY_DIR
public static final java.lang.String APPLICATIONNAME
public static final java.lang.String LOGGING_HISTORY_SIZE
public static final java.lang.String MAIL_SERVER
public static final java.lang.String MAIL_RECEIVER
public static final java.lang.String MAIL_SENDER
public static final java.lang.String NOTIFICATIONS_CLASS
public static final java.lang.String JMX_PORT
public static final java.lang.String JMX_RMI_PORT
public static final java.lang.String JMX_PASSWORD_FILE
public static final java.lang.String JMX_MONITOR_ROLE_PASSWORD_SETTING
public static final java.lang.String JMX_HOSTS_NUMBER_SETTING
public static final java.lang.String JMX_HOST_NAME
public static final java.lang.String JMX_HOST_PORT
Method Detail |
---|
public static java.lang.String getSettingsFilePath()
public static void reload()
public static java.lang.String get(java.lang.String key) throws UnknownID, IOFailure, ArgumentNotValid
key
- name of the setting to retrieve
ArgumentNotValid
- if key is null or the empty string
UnknownID
- if no setting loaded matches key
IOFailure
- if no settings loaded.public static long getLong(java.lang.String key) throws UnknownID, IOFailure, ArgumentNotValid
key
- name of the setting to retrieve
ArgumentNotValid
- if key is null, the empty string or key is not parseable to long
UnknownID
- if no setting loaded matches key
IOFailure
- if no settings loaded.public static int getInt(java.lang.String key)
key
- name of the setting to retrieve
ArgumentNotValid
- if key is null, the empty string or key is not parseable to int
UnknownID
- if no setting loaded matches key
IOFailure
- if no settings loaded.public static java.lang.String[] getAll(java.lang.String key) throws UnknownID, IOFailure, ArgumentNotValid
key
- name of the setting to retrieve
ArgumentNotValid
- if key is null or the empty string
UnknownID
- if no setting loaded matches key
IOFailure
- if no settings loaded.public static void create(java.lang.String key, java.lang.String value) throws ArgumentNotValid
key
- the name of the settingvalue
- the value
ArgumentNotValid
- if key or value is null or the empty string,
or if a corresponding key already exists.
author: SSCpublic static void set(java.lang.String key, java.lang.String... values)
key
- The settings key to add this under, legal keys are
fields in this class.values
- The (ordered) list of values to put under this key.
ArgumentNotValid
- if key or values are null
UnknownID
- if the key does not already existpublic static void validateWithXSD()
public static void validateStrings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |