Pepper 3.7.0
A highly extensible plattform for conversion and
|
This class represents all properties to customize Pepper. More...
Inherits PepperConfiguration.
Public Member Functions | |
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. | |
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. | |
String | getPlugInPath () |
Returns the plugIn path, where to find the OSGi bundles. | |
List< String > | getDropInPaths () |
Returns the dropin paths, where to find the OSGi bundles. | |
String | getPepperEMail () |
Returns the eMail address of SaltNPepper. | |
String | getPepperHomepage () |
Returns the homepage address of SaltNPepper. | |
File | getOSGiProfileFile () |
Returns the path of the OSGi profile file. | |
String | getSharedPackages () |
Returns the content of property PROP_OSGI_SHAREDPACKAGES . | |
int | getConsoleWidth () |
Returns the width of the output console. | |
Static Public Member Functions | |
static File | findPepperHome () |
Extracts the home path of pepper and returns it. | |
Static Public Attributes | |
static final String | PROP_PREFIX = "pepper." |
prefix of all properties | |
static final String | ENV_PEPPER_HOME = "PEPPER_HOME" |
Name of the environment variable specifying the pepper home path. | |
static final String | PROP_PEPPER_HOME = PROP_PREFIX + "home" |
Name of the system property specifying the pepper home path. | |
static final String | PROP_CONSOLE_WIDTH = PROP_PREFIX + "console.width" |
Name of property to determine the width of outout console. | |
static final String | KEY_PEPPER_HOME = "$" + ENV_PEPPER_HOME |
A key for using the a variable for the pepper home path inside of property files. | |
static final String | FILE_PEPPER_PROP = "pepper.properties" |
Name of the file containing all pepper properties. | |
static final String | FILE_PEPPER_TEST_PROP = "pepper-test.properties" |
Name of the file containing all pepper properties. | |
static final String | FILE_PEPPER_CONF = "conf" |
Folder, where to find all configuration files for Pepper. | |
static final String | PROP_PLUGIN_PATH = PROP_PREFIX + "plugin.path" |
name of the property of where to find the plugin path | |
static final String | PROP_DROPIN_PATHS = PROP_PREFIX + "dropin.paths" |
name of the property of where to find the dropin paths (comma seperated) | |
static final String | PROP_OSGI_PROFILE = PROP_PREFIX + "osgi.profile" |
name of the property of the location of the osgi profile | |
static final String | PROP_OSGI_SHAREDPACKAGES = PROP_PREFIX + Constants.FRAMEWORK_SYSTEMPACKAGES |
name of the property of the location of the osgi profile | |
This class represents all properties to customize Pepper.
This class is derived from the general class 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.
To initialize the configuration, if no File
or Properties
are passed via the constructor, please call method load()
or one of the other load methods.
You can call the simple constructor PepperProperties()
having no parameters. This constructor will make use of the pepper home path mechanism and assumes a file named {@value #FILE_PEPPER_PROP} in the pepper home path
This class uses a location called pepper home path, where it assumes all resources necessary to run Pepper. If no customization for these resources is given, default values are assumed. The pepper home path if not explicitly given is detected in the following order:
org.corpus_tools.pepper.cli.PepperStarterConfiguration.PepperStarterConfiguration | ( | File | propertiesFile | ) |
Creates a PepperStarterConfiguration
object, using the given file to read the properties to be load into the new created object.
propertiesFile | file containing the pepper properties |
|
static |
Extracts the home path of pepper and returns it.
The home path is searched in following order:
int org.corpus_tools.pepper.cli.PepperStarterConfiguration.getConsoleWidth | ( | ) |
Returns the width of the output console.
The width could be either 120 or 80.
List< String > org.corpus_tools.pepper.cli.PepperStarterConfiguration.getDropInPaths | ( | ) |
Returns the dropin paths, where to find the OSGi bundles.
File org.corpus_tools.pepper.cli.PepperStarterConfiguration.getOSGiProfileFile | ( | ) |
Returns the path of the OSGi profile file.
String org.corpus_tools.pepper.cli.PepperStarterConfiguration.getPepperEMail | ( | ) |
Returns the eMail address of SaltNPepper.
String org.corpus_tools.pepper.cli.PepperStarterConfiguration.getPepperHomepage | ( | ) |
Returns the homepage address of SaltNPepper.
String org.corpus_tools.pepper.cli.PepperStarterConfiguration.getPlugInPath | ( | ) |
Returns the plugIn path, where to find the OSGi bundles.
String org.corpus_tools.pepper.cli.PepperStarterConfiguration.getSharedPackages | ( | ) |
Returns the content of property PROP_OSGI_SHAREDPACKAGES
.
void org.corpus_tools.pepper.cli.PepperStarterConfiguration.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.
If this file does not exists, the properties are tried to load from the file FILE_PEPPER_PROP
in the same folder.
void org.corpus_tools.pepper.cli.PepperStarterConfiguration.load | ( | File | propertiesFile | ) |
Loads pepper properties from given file.
propertiesFile |
|
static |
Name of property to determine the width of outout console.
The width could be either 120 or 80.