public class PepperStarterConfiguration
extends org.corpus_tools.pepper.common.PepperConfiguration
Properties and provides some shortcuts
to access specific pepper properties. By default the properties are loaded
from folder FILE_PEPPER_CONF. If the file
FILE_PEPPER_TEST_PROP exists, this one will be taken, otherwise the
system tries to load file FILE_PEPPER_PROP. This behavior can be
changed by explicitly passing a properties file. File or Properties are
passed via the constructor, please call method load() or one of the
other load methods.
#PepperProperties() having no
parameters. This constructor will make use of the pepper home path mechanism
and assumes a file named "pepper.properties" in the pepper home path
| Modifier and Type | Field and Description |
|---|---|
static String |
ENV_PEPPER_HOME
Name of the environment variable specifying the pepper home path.
|
static String |
FILE_PEPPER_CONF
Folder, where to find all configuration files for Pepper
|
static String |
FILE_PEPPER_PROP
Name of the file containing all pepper properties.
|
static String |
FILE_PEPPER_TEST_PROP
Name of the file containing all pepper properties.
|
static String |
KEY_PEPPER_HOME
A key for using the a variable for the pepper home path inside of
property files.
|
static String |
PROP_CONSOLE_WIDTH
Name of property to determine the width of outout console.
|
static String |
PROP_DROPIN_PATHS
name of the property of where to find the dropin paths (comma seperated)
|
static String |
PROP_OSGI_PROFILE
name of the property of the location of the osgi profile
|
static String |
PROP_OSGI_SHAREDPACKAGES
name of the property of the location of the osgi profile
|
static String |
PROP_PEPPER_HOME
Name of the system property specifying the pepper home path.
|
static String |
PROP_PLUGIN_PATH
name of the property of where to find the plugin path
|
static String |
PROP_PREFIX
prefix of all properties
|
ALL_PROP_NAMES, DEFAULT_WORKSPACE, EMAIL, ENV_PEPPER_MODULE_RESOURCES, FILE_CONF_FILE, FILE_CONF_FOLDER, FILE_CONF_TEST_FILE, HOMEPAGE, PROP_CALL_GC_AFTER_DOCUMENT, PROP_COMPUTE_PERFORMANCE, PROP_DETAILED_STATUS_REPORT, PROP_KEEP_TEMP_DOCS, PROP_MAX_AMOUNT_OF_SDOCUMENTS, PROP_MEMORY_POLICY, PROP_PEPPER_MODULE_RESOURCES, PROP_REPORT_INTERVAL, PROP_TEMP_FOLDER, PROP_WORKSPACE, SOURCES_RESOURCESdefaults| Constructor and Description |
|---|
PepperStarterConfiguration()
Creates a
PepperStarterConfiguration object, without setting any
property. |
PepperStarterConfiguration(File propertiesFile)
Creates a
PepperStarterConfiguration object, using the given file
to read the properties to be load into the new created object. |
| Modifier and Type | Method and Description |
|---|---|
static File |
findPepperHome()
Extracts the home path of pepper and returns it.
|
int |
getConsoleWidth()
Returns the width of the output console.
|
List<String> |
getDropInPaths()
Returns the dropin paths, where to find the OSGi bundles.
|
File |
getOSGiProfileFile()
Returns the path of the OSGi profile file
|
String |
getPepperEMail()
Returns the eMail address of SaltNPepper.
|
String |
getPepperHomepage()
Returns the homepage address of SaltNPepper.
|
String |
getPlugInPath()
Returns the plugIn path, where to find the OSGi bundles.
|
String |
getSharedPackages()
Returns the content of property
PROP_OSGI_SHAREDPACKAGES. |
void |
load()
For test purposes, properties are load from the file
FILE_PEPPER_TEST_PROP, which is assumed to be in the
FILE_PEPPER_CONF folder in the pepper home path. |
void |
load(File propertiesFile)
Loads pepper properties from given file.
|
getConfFolder, getDetaialedStatReport, getGcAfterDocumentSleep, getKeepDocuments, getMaxAmountOfDocuments, getMemPolicy, getReportInterval, getTempPath, getWorkspace, load, setConfFoldergetProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamespublic static final String PROP_PREFIX
public static final String ENV_PEPPER_HOME
public static final String PROP_PEPPER_HOME
public static final String PROP_CONSOLE_WIDTH
public static final String KEY_PEPPER_HOME
public static final String FILE_PEPPER_PROP
public static final String FILE_PEPPER_TEST_PROP
public static final String FILE_PEPPER_CONF
public static final String PROP_PLUGIN_PATH
public static final String PROP_DROPIN_PATHS
public static final String PROP_OSGI_PROFILE
public static final String PROP_OSGI_SHAREDPACKAGES
public PepperStarterConfiguration()
PepperStarterConfiguration object, without setting any
property.public PepperStarterConfiguration(File propertiesFile)
PepperStarterConfiguration object, using the given file
to read the properties to be load into the new created object.propertiesFile - file containing the pepper propertiespublic static File findPepperHome()
public void load()
FILE_PEPPER_TEST_PROP, which is assumed to be in the
FILE_PEPPER_CONF folder in the pepper home path. If this file
does not exists, the properties are tried to load from the file
FILE_PEPPER_PROP in the same folder.public void load(File propertiesFile)
load in class org.corpus_tools.pepper.common.PepperConfigurationpropertiesFile - public String getPlugInPath()
public List<String> getDropInPaths()
public String getPepperEMail()
public String getPepperHomepage()
public File getOSGiProfileFile()
public String getSharedPackages()
PROP_OSGI_SHAREDPACKAGES.public int getConsoleWidth()
Copyright © 2009–2016 Humboldt-Universität zu Berlin, INRIA. All rights reserved.