Package ru.bitel.common
Class Preferences
java.lang.Object
ru.bitel.common.ParameterMap
ru.bitel.common.Preferences
- Direct Known Subclasses:
DefaultServerSetup,ModuleSetup
Набор параметров, хранящийся в ConcurrentHashMap.
Можно загрузить из файла, из строки, из Properties.
Содержит методы загрузки из БД конфигурации конкретного модуля.
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bitel.common.ParameterMap
ParameterMap.DefaultParameterMap -
Field Summary
FieldsFields inherited from class ru.bitel.common.ParameterMap
mapPrint -
Constructor Summary
ConstructorsConstructorDescriptionPreferences(boolean concurrent, boolean objectMap) Preferences(String bundleName) Preferences(String data, String delim) Preferences(URL url) Preferences(Map<String, String> data) Preferences(Map<String, String> data, boolean concurrent, boolean objectMap) Preferences(ParameterMap setup, String data, String delim) Preferences(ParameterMap setup, String data, String delim, boolean concurrent, boolean objectMap) -
Method Summary
Modifier and TypeMethodDescriptionentrySet()protected voidgetMap()Возвращает в виде жавовского Map все значения.final Objectfinal ObjectgetOrderedValues(String prefix) Deprecated.protected voidloadBundle(Map<String, String> data) Загрузка файла конфигурации в Map, имя файла определено в полеbundleName.voidprotected voidprotected voidloadDataEntry(Map<String, String> data, String line) protected voidloadFromInputStream(InputStream inputStream, Map<String, String> data) protected voidloadModuleSetup(Connection con, int moduleId, Map<String, String> data) Загрузка конфигурации из БД в Map.parseObjects(String prefix) Deprecated.use subIndexed, subKeyedparseObjectsNoOrder(String prefix) Deprecated.use subIndexed, subKeyedfinal voidfinal ObjectremoveObject(String key) voidprotected voidupdateData(Map<String, String> data) Обновление данных в сетапе.Methods inherited from class ru.bitel.common.ParameterMap
addActionListener, filter, fingerprint, get, getBigDecimal, getBoolean, getChar, getDouble, getEnum, getFloat, getInt, getIntegerList, getLocalDate, getLong, inherit, sub, subIndexed, subKeyed, subLined, throwActionEvent, toReference, toString
-
Field Details
-
bundleName
-
data
-
-
Constructor Details
-
Preferences
public Preferences() -
Preferences
public Preferences(boolean concurrent, boolean objectMap) -
Preferences
-
Preferences
-
Preferences
-
Preferences
-
Preferences
public Preferences(ParameterMap setup, String data, String delim, boolean concurrent, boolean objectMap) -
Preferences
-
Preferences
-
-
Method Details
-
get
- Specified by:
getin classParameterMap
-
entrySet
- Specified by:
entrySetin classParameterMap
-
extract
- Overrides:
extractin classParameterMap
-
set
-
loadData
-
putObject
-
getObject
-
getObject
-
removeObject
-
loadBundle
Загрузка файла конфигурации в Map, имя файла определено в полеbundleName. -
loadFromInputStream
protected void loadFromInputStream(InputStream inputStream, Map<String, String> data) throws IOException- Throws:
IOException
-
loadData
-
loadDataEntry
-
getOrderedValues
Deprecated.возвращает упорядоченный список значений по ключам вида prefix.1=.... prefix.2=...- Parameters:
prefix- String- Returns:
- List
-
parseObjects
Deprecated.use subIndexed, subKeyedФункция для разбора конфигураций вида: filetype.1.name=... filetype.1.value=... filetype.2.name=... filetype.2.value.. разбирает в список Map с ключами name, value, код (1,2,...) передается под ключем id.- Parameters:
prefix-setup-- Returns:
-
parseObjectsNoOrder
Deprecated.use subIndexed, subKeyed -
loadModuleSetup
Загрузка конфигурации из БД в Map.- Parameters:
con-moduleId-data-
-
updateData
Обновление данных в сетапе.- Parameters:
data-
-
getMap
Description copied from class:ParameterMapВозвращает в виде жавовского Map все значения.- Overrides:
getMapin classParameterMap
-