Package jetbrains.buildServer.serverSide
Class AbstractPropertiesProvider
- java.lang.Object
-
- jetbrains.buildServer.serverSide.AbstractPropertiesProvider
-
- All Implemented Interfaces:
TeamCityPropertiesProvider
- Direct Known Subclasses:
InMemoryPropertiesProvider,InternalPropertiesProvider
public abstract class AbstractPropertiesProvider extends Object implements TeamCityPropertiesProvider
Common super class for
TeamCityPropertiesProviderimplementations.- Since:
- 2018.1
- Author:
- Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
-
-
Constructor Summary
Constructors Constructor Description AbstractPropertiesProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBoolean(String key)Returns the property value as aboolean, orfalseif not set.booleangetBooleanOrTrue(String key)Returns the property value as aboolean, ortrueif not set.floatgetFloat(String key)Returns the property value as afloat, or0.0fif not set.floatgetFloat(String key, float defaultValue)Returns the property value as afloat.intgetInteger(String key)Returns the property value as anint, or0if not set.intgetInteger(String key, int defaultValue)Returns the property value as anint.longgetLong(String key)Returns the property value as along, or0Lif not set.longgetLong(String key, long defaultValue)Returns the property value as along.StringgetProperty(String key)Returns the property value as aString, or an empty string if not set.StringgetProperty(String key, String defaultValue)Returns the property value as aString.StringgetPropertyOrNull(String key, String defaultValue)Returns the property value as aString, ornullif not set.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.TeamCityPropertiesProvider
getPropertyOrNull
-
-
-
-
Method Detail
-
getBoolean
public final boolean getBoolean(@NotNull String key)Returns the property value as a
boolean, orfalseif not set.- Specified by:
getBooleanin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.- Returns:
- property value as a
boolean. - See Also:
TeamCityPropertiesProvider.getBoolean(String)
-
getBooleanOrTrue
public final boolean getBooleanOrTrue(@NotNull String key)Returns the property value as a
boolean, ortrueif not set.- Specified by:
getBooleanOrTruein interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.- Returns:
- property value as a
boolean. - See Also:
TeamCityPropertiesProvider.getBooleanOrTrue(String)
-
getInteger
public final int getInteger(@NotNull String key)Returns the property value as an
int, or0if not set.- Specified by:
getIntegerin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.- Returns:
- property value as an
int. - See Also:
TeamCityPropertiesProvider.getInteger(String)
-
getInteger
public final int getInteger(@NotNull String key, int defaultValue)Returns the property value as an
int.- Specified by:
getIntegerin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.defaultValue- default value.- Returns:
- property value as an
int. - See Also:
TeamCityPropertiesProvider.getInteger(String, int)
-
getFloat
public final float getFloat(@NotNull String key)Returns the property value as a
float, or0.0fif not set.- Specified by:
getFloatin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.- Returns:
- property value as a
float. - See Also:
TeamCityPropertiesProvider.getFloat(String)
-
getFloat
public final float getFloat(@NotNull String key, float defaultValue)Returns the property value as a
float.- Specified by:
getFloatin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.defaultValue- default value.- Returns:
- property value as a
float. - See Also:
TeamCityPropertiesProvider.getFloat(String, float)
-
getLong
public final long getLong(@NotNull String key)Returns the property value as a
long, or0Lif not set.- Specified by:
getLongin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.- Returns:
- property value as a
long. - See Also:
TeamCityPropertiesProvider.getLong(String)
-
getLong
public final long getLong(@NotNull String key, long defaultValue)Returns the property value as a
long.- Specified by:
getLongin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.defaultValue- default value.- Returns:
- property value as a
long. - See Also:
TeamCityPropertiesProvider.getLong(String, long)
-
getProperty
@NotNull public final String getProperty(@NotNull String key)
Returns the property value as a
String, or an empty string if not set.- Specified by:
getPropertyin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.- Returns:
- property value as a
String. - See Also:
TeamCityPropertiesProvider.getProperty(String)
-
getProperty
@NotNull public final String getProperty(@NotNull String key, @NotNull String defaultValue)
Returns the property value as a
String.- Specified by:
getPropertyin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.defaultValue- default value.- Returns:
- property value as a
String. - See Also:
TeamCityPropertiesProvider.getProperty(String, String)
-
getPropertyOrNull
@Nullable @Contract("_, !null -> !null") public final String getPropertyOrNull(@NotNull String key, @Nullable String defaultValue)Returns the property value as a
String, ornullif not set.- Specified by:
getPropertyOrNullin interfaceTeamCityPropertiesProvider- Parameters:
key- the property key.defaultValue- default value.- Returns:
- property value as a
String. - See Also:
TeamCityPropertiesProvider.getPropertyOrNull(String, String)
-
-