public class PlatformProperties extends Object implements Properties
Modifier and Type | Method and Description |
---|---|
static PlatformProperties |
get(Environment env) |
static PlatformProperties |
get(Properties platformConfig) |
File |
getApplicationDir() |
byte[] |
getBlob(String name)
Returns the byte-value of the given
Property . |
Boolean |
getBoolean(String name)
|
Boolean |
getBoolean(String name,
Boolean defaultValue) |
File |
getCacheConfig() |
String |
getClob(String name)
Returns the string-value of the given
Property . |
String |
getClob(String name,
String defaultValue)
Returns the string-value of the given
Property (if existing), or the default-value. |
String |
getDescriptionFor(String name)
Returns the description for the
Property with the given name, if any |
Double |
getDouble(String name)
|
Double |
getDouble(String name,
Double defaultValue)
|
Float |
getFloat(String name)
|
Float |
getFloat(String name,
Float defaultValue)
|
Integer |
getInteger(String name)
|
Integer |
getInteger(String name,
Integer defaultValue)
|
List<String> |
getList(String name,
String delimiter)
|
List<String> |
getList(String name,
String defaultValue,
String delimiter)
|
Properties |
getPlainProperties()
Takes this
Properties and transforms it into some (plain, old, uncool) Properties . |
Properties |
getProperties(String name)
Returns some
Properties parsed from the given Property (if existing). |
Set<String> |
getPropertyNames()
Returns all
Property names. |
File |
getRepositoryRootFolder() |
String |
getString(String name)
Returns the string-value of the given
Property . |
String |
getString(String name,
String defaultValue)
Returns the string-value of the given
Property (if existing), or the default-value. |
File |
getUploadDir() |
boolean |
propertyExists(String name)
Checks whether the
Property with the given name exists. |
public static PlatformProperties get(Environment env)
public static PlatformProperties get(Properties platformConfig)
public List<String> getList(String name, String defaultValue, String delimiter)
Properties
List
of String
s which is parsed from the value of the Property
with the given
name (if present) or from the default-value.getList
in interface Properties
name
- the name of the Property
defaultValue
- the default-string to parse the list fromdelimiter
- the delimiter to split the (default-)value byList
, never null
public List<String> getList(String name, String delimiter)
Properties
public String getString(String name)
Properties
Property
.getString
in interface Properties
name
- the name of the Property
Property
, or null
if no such property exists.public String getString(String name, String defaultValue)
Properties
Property
(if existing), or the default-value.getString
in interface Properties
name
- the name of the Property
defaultValue
- the default-valueProperty
(if existing), or the default-valuepublic Boolean getBoolean(String name)
Properties
getBoolean
in interface Properties
name
- the name of the Property
Boolean
, or null
if no such Property
exists.public Boolean getBoolean(String name, Boolean defaultValue)
getBoolean
in interface Properties
name
- the name of the Property
defaultValue
- the default-valueBoolean
, or the default-value if no such Property
exists.public Integer getInteger(String name)
Properties
getInteger
in interface Properties
name
- the name of the Property
Integer
, or null
if no such Property
exists.public Integer getInteger(String name, Integer defaultValue)
Properties
getInteger
in interface Properties
name
- the name of the Property
defaultValue
- the default-valueInteger
, or the default-value if no such Property
exists.public Float getFloat(String name)
Properties
getFloat
in interface Properties
name
- the name of the Property
Float
, or null
if no such Property
exists.public Float getFloat(String name, Float defaultValue)
Properties
getFloat
in interface Properties
name
- the name of the Property
defaultValue
- the default-valueFloat
, or the default-value if no such Property
exists.public Double getDouble(String name)
Properties
getDouble
in interface Properties
name
- the name of the Property
Double
, or null
if no such Property
exists.public Double getDouble(String name, Double defaultValue)
Properties
getDouble
in interface Properties
name
- the name of the Property
defaultValue
- the default-valueDouble
, or the default-value if no such Property
exists.public String getClob(String name)
Properties
Property
.getClob
in interface Properties
name
- the name of the Property
Property
, or null
if no such Property
exists.public String getClob(String name, String defaultValue)
Properties
Property
(if existing), or the default-value.getClob
in interface Properties
name
- the name of the Property
defaultValue
- the default-valueProperty
(if existing), or the default-valuepublic byte[] getBlob(String name)
Properties
Property
.getBlob
in interface Properties
name
- the name of the Property
Property
, or null
if no such Property
exists.public Set<String> getPropertyNames()
Properties
Property
names.getPropertyNames
in interface Properties
Property
namespublic boolean propertyExists(String name)
Properties
Property
with the given name exists.propertyExists
in interface Properties
name
- the name of the Property
true
if the Property
exists, false
otherwisepublic Properties getPlainProperties()
Properties
Properties
and transforms it into some (plain, old, uncool) Properties
.getPlainProperties
in interface Properties
Properties
public Properties getProperties(String name)
Properties
Properties
parsed from the given Property
(if existing).getProperties
in interface Properties
name
- the name of the Property
Properties
, or null
if no such Property
exists.public String getDescriptionFor(String name)
Properties
Property
with the given name, if anygetDescriptionFor
in interface Properties
name
- the name of the propertypublic File getCacheConfig()
public File getUploadDir()
public File getApplicationDir()
public File getRepositoryRootFolder()
Copyright © 2011–2019 aiticon GmbH. All rights reserved.