Package org.dspace.core
Class ConfigurationManager
- java.lang.Object
-
- org.dspace.core.ConfigurationManager
-
public class ConfigurationManager extends Object
Deprecated.Please use org.dspace.services.ConfigurationService. See examples below.Class for reading the DSpace system configuration. The main configuration is read in as properties from a standard properties file.To specify a different configuration, the system property
dspace.dirshould be set to the DSpace installation directory.Other configuration files are read from the
configdirectory of the DSpace installation directory.- Version:
- $Revision$
- Author:
- Robert Tansley, Larry Stone - Interpolated values., Mark Diggory - General Improvements to detection, logging and loading., Tim Donohue - Refactored to wrap ConfigurationService
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedConfigurationManager()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleangetBooleanProperty(String property)Deprecated.Get a configuration property as a boolean.static booleangetBooleanProperty(String property, boolean defaultValue)Deprecated.Get a configuration property as a boolean, with default.static booleangetBooleanProperty(String module, String property)Deprecated.Get a module configuration property as a boolean.static booleangetBooleanProperty(String module, String property, boolean defaultValue)Deprecated.Get a module configuration property as a boolean, with default.static intgetIntProperty(String property)Deprecated.Get a configuration property as an integerstatic intgetIntProperty(String property, int defaultValue)Deprecated.Get a configuration property as an integer, with defaultstatic intgetIntProperty(String module, String property)Deprecated.Get a module configuration property as an integerstatic intgetIntProperty(String module, String property, int defaultValue)Deprecated.Get a module configuration property as an integer, with defaultstatic longgetLongProperty(String property)Deprecated.Get a configuration property as a longstatic longgetLongProperty(String property, int defaultValue)Deprecated.Get a configuration property as an long, with defaultstatic longgetLongProperty(String module, String property)Deprecated.Get a module configuration property as a longstatic longgetLongProperty(String module, String property, int defaultValue)Deprecated.Get a configuration property as an long, with defaultstatic PropertiesgetProperties()Deprecated.Returns all properties in main configurationstatic PropertiesgetProperties(String module)Deprecated.Returns all properties for a given modulestatic StringgetProperty(String property)Deprecated.Get a configuration propertystatic StringgetProperty(String module, String property)Deprecated.Get a module configuration property value.static booleanisConfigured()Deprecated.Identify if DSpace is properly configuredstatic Enumeration<?>propertyNames()Deprecated.Returns an enumeration of all the keys in the DSpace configurationstatic Enumeration<?>propertyNames(String module)Deprecated.Returns an enumeration of all the keys in a module configuration
-
-
-
Method Detail
-
isConfigured
public static boolean isConfigured()
Deprecated.Identify if DSpace is properly configured- Returns:
- boolean true if configured, false otherwise
-
getProperties
public static Properties getProperties()
Deprecated.Returns all properties in main configuration- Returns:
- properties - all non-modular properties
-
getProperties
public static Properties getProperties(String module)
Deprecated.Returns all properties for a given module- Parameters:
module- the name of the module- Returns:
- properties - all module's properties
-
getProperty
public static String getProperty(String property)
Deprecated.Get a configuration property- Parameters:
property- the name of the property- Returns:
- the value of the property, or
nullif the property does not exist.
-
getProperty
public static String getProperty(String module, String property)
Deprecated.Get a module configuration property value.- Parameters:
module- the name of the module, ornullfor regular configuration propertyproperty- the name (key) of the property- Returns:
- the value of the property, or
nullif the property does not exist
-
getIntProperty
public static int getIntProperty(String property)
Deprecated.Get a configuration property as an integer- Parameters:
property- the name of the property- Returns:
- the value of the property.
0is returned if the property does not exist. To differentiate between this case and when the property actually is zero, usegetProperty.
-
getIntProperty
public static int getIntProperty(String module, String property)
Deprecated.Get a module configuration property as an integer- Parameters:
module- the name of the moduleproperty- the name of the property- Returns:
- the value of the property.
0is returned if the property does not exist. To differentiate between this case and when the property actually is zero, usegetProperty.
-
getIntProperty
public static int getIntProperty(String property, int defaultValue)
Deprecated.Get a configuration property as an integer, with default- Parameters:
property- the name of the propertydefaultValue- value to return if property is not found or is not an Integer.- Returns:
- the value of the property.
defaultis returned if the property does not exist or is not an Integer. To differentiate between this case and when the property actually is false, usegetProperty.
-
getIntProperty
public static int getIntProperty(String module, String property, int defaultValue)
Deprecated.Get a module configuration property as an integer, with default- Parameters:
module- the name of the moduleproperty- the name of the propertydefaultValue- value to return if property is not found or is not an Integer.- Returns:
- the value of the property.
defaultis returned if the property does not exist or is not an Integer. To differentiate between this case and when the property actually is false, usegetProperty.
-
getLongProperty
public static long getLongProperty(String property)
Deprecated.Get a configuration property as a long- Parameters:
property- the name of the property- Returns:
- the value of the property.
0is returned if the property does not exist. To differentiate between this case and when the property actually is zero, usegetProperty.
-
getLongProperty
public static long getLongProperty(String module, String property)
Deprecated.Get a module configuration property as a long- Parameters:
module- the name of the moduleproperty- the name of the property- Returns:
- the value of the property.
0is returned if the property does not exist. To differentiate between this case and when the property actually is zero, usegetProperty.
-
getLongProperty
public static long getLongProperty(String property, int defaultValue)
Deprecated.Get a configuration property as an long, with default- Parameters:
property- the name of the propertydefaultValue- value to return if property is not found or is not a Long.- Returns:
- the value of the property.
defaultis returned if the property does not exist or is not an Integer. To differentiate between this case and when the property actually is false, usegetProperty.
-
getLongProperty
public static long getLongProperty(String module, String property, int defaultValue)
Deprecated.Get a configuration property as an long, with default- Parameters:
module- the module, ornullfor regular propertyproperty- the name of the propertydefaultValue- value to return if property is not found or is not a Long.- Returns:
- the value of the property.
defaultis returned if the property does not exist or is not an Integer. To differentiate between this case and when the property actually is false, usegetProperty.
-
getBooleanProperty
public static boolean getBooleanProperty(String property)
Deprecated.Get a configuration property as a boolean. True is indicated if the value of the property isTRUEorYES(case insensitive.)- Parameters:
property- the name of the property- Returns:
- the value of the property.
falseis returned if the property does not exist. To differentiate between this case and when the property actually is false, usegetProperty.
-
getBooleanProperty
public static boolean getBooleanProperty(String module, String property)
Deprecated.Get a module configuration property as a boolean. True is indicated if the value of the property isTRUEorYES(case insensitive.)- Parameters:
module- the module, ornullfor regular propertyproperty- the name of the property- Returns:
- the value of the property.
falseis returned if the property does not exist. To differentiate between this case and when the property actually is false, usegetProperty.
-
getBooleanProperty
public static boolean getBooleanProperty(String property, boolean defaultValue)
Deprecated.Get a configuration property as a boolean, with default. True is indicated if the value of the property isTRUEorYES(case insensitive.)- Parameters:
property- the name of the propertydefaultValue- value to return if property is not found.- Returns:
- the value of the property.
defaultis returned if the property does not exist. To differentiate between this case and when the property actually is false, usegetProperty.
-
getBooleanProperty
public static boolean getBooleanProperty(String module, String property, boolean defaultValue)
Deprecated.Get a module configuration property as a boolean, with default. True is indicated if the value of the property isTRUEorYES(case insensitive.)- Parameters:
module- module, ornullfor regular propertyproperty- the name of the propertydefaultValue- value to return if property is not found.- Returns:
- the value of the property.
defaultis returned if the property does not exist. To differentiate between this case and when the property actually is false, usegetProperty.
-
propertyNames
public static Enumeration<?> propertyNames()
Deprecated.Returns an enumeration of all the keys in the DSpace configurationAs ConfigurationManager is now deprecated, older code using this method should consider using ConfigurationService.getPropertyKeys() directly.
- Returns:
- an enumeration of all the keys in the DSpace configuration
-
propertyNames
public static Enumeration<?> propertyNames(String module)
Deprecated.Returns an enumeration of all the keys in a module configurationAs ConfigurationManager is now deprecated, older code using this method should consider using ConfigurationService.getPropertyKeys(String prefix) directly.
- Parameters:
module- module, ornullfor regular property- Returns:
- an enumeration of all the keys in the module configuration,
or
nullif the module does not exist.
-
-