Class SystemData
java.lang.Object
org.deltava.util.system.SystemData
- All Implemented Interfaces:
Serializable
A singleton object containing all of the configuration data for the application. This object is internally synchronized
to allow thread-safe read and write access to the configuration data.
- Since:
- 1.0
- Version:
- 11.3
- Author:
- Luke
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Adds a property.static String
Returns a property value.static Airline
getAirline
(String airlineCode) Returns an Airline object.static Collection
<Airline> Returns all airlines for the current web application.static Airport
getAirport
(String airportCode) Returns an Airport object.Returns all Airports.static AirlineInformation
Returns an Airline Information object, which is data about other virtual airlines on this server.static Collection
<AirlineInformation> getApps()
Returns information about all virtual airlines on this server.static boolean
getBoolean
(String propertyName) Returns a boolean property value.static double
Returns a floating point property value.static int
Returns an integer property value.static int
Returns an integer property value.static org.gvagroup.pool.ConnectionPool
<Connection> static org.gvagroup.pool.JedisPool
static long
Returns a long integer property value.static Object
Returns a property value.static boolean
Returns whether a particular property exists.static void
init()
Initializes the System data with the default loader.static void
Initializes SystemData object.
-
Field Details
-
AUTHENTICATOR
- See Also:
-
TASK_POOL
- See Also:
-
ECON_DATA
- See Also:
-
JDBC_POOL
- See Also:
-
JEDIS_POOL
- See Also:
-
CFG_NAME
- See Also:
-
LOADER_NAME
- See Also:
-
-
Method Details
-
init
Initializes SystemData object.- Parameters:
loaderClassName
- the data loader class nameclearData
- TRUE if existing data should be cleared, otherwise FALSE
-
init
public static void init()Initializes the System data with the default loader.- See Also:
-
has
Returns whether a particular property exists.- Parameters:
propertyName
- the property name- Returns:
- TRUE if the property exists, otherwise FALSE
-
getObject
-
getBoolean
Returns a boolean property value.- Parameters:
propertyName
- the property name- Returns:
- TRUE if the object is a boolean value and TRUE, otherwise FALSE
-
getInt
Returns an integer property value.- Parameters:
propertyName
- the property namedefValue
- the default value- Returns:
- the property value, or the default if not an integer
-
getInt
Returns an integer property value.- Parameters:
propertyName
- the property name- Returns:
- the property value, or 0 if not an integer
-
getLong
Returns a long integer property value.- Parameters:
propertyName
- the property namedefValue
- the default value- Returns:
- the property value, or defValue if not a long
-
getDouble
Returns a floating point property value.- Parameters:
propertyName
- the property namedefValue
- the default value- Returns:
- the property value, or defValue if not a double
-
get
-
add
-
getAirport
Returns an Airport object.- Parameters:
airportCode
- the Airport code (IATA or ICAO)- Returns:
- the Airport bean, or null if not found
- Throws:
IllegalStateException
- if the "airports" property has not been added- See Also:
-
getAirports
-
getAirline
Returns an Airline object.- Parameters:
airlineCode
- the Airline code- Returns:
- the Airline bean, or null if not found
- Throws:
IllegalStateException
- if the "airlines" property has not been added
-
getAirlines
Returns all airlines for the current web application.- Returns:
- a Collection of Airline beans
-
getApp
Returns an Airline Information object, which is data about other virtual airlines on this server.- Parameters:
airlineCode
- the airline code, or null if the current airline- Returns:
- the AirlineInformation bean, or null if not found
- Throws:
IllegalStateException
- if the "apps" property has not been added
-
getApps
Returns information about all virtual airlines on this server. The current virtual airline will be the first member of this collection.- Returns:
- a Collection of AirlineInformation beans
-
getJDBCPool
-
getJedisPool
public static org.gvagroup.pool.JedisPool getJedisPool()
-