Package jetbrains.buildServer.users.impl
Class PropertyHolderImpl<IDType>
- java.lang.Object
-
- jetbrains.buildServer.users.impl.PropertyHolderImpl<IDType>
-
- All Implemented Interfaces:
PropertyHolder
,SPropertyHolder
public class PropertyHolderImpl<IDType> extends Object implements SPropertyHolder
- Author:
- Maxim.Manuylov Date: 18.09.2014
-
-
Constructor Summary
Constructors Constructor Description PropertyHolderImpl(PropertyLoader<IDType> propertyLoader, PropertyUpdater<IDType> propertyUpdater, IDType id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCaches()
static PropertyKey
convertPropertyKey(PropertyKey orig)
boolean
deleteProperty(PropertyKey propertyKey)
Deletes a property with specified key.boolean
getBooleanProperty(PropertyKey propertyKey)
Returns value of the boolean propertyMap<PropertyKey,String>
getProperties()
Returns map of the propertiesString
getPropertyValue(PropertyKey propertyKey)
Returns value of the property with specified keyboolean
setProperties(Map<? extends PropertyKey,String> properties)
Updates the specified properties.boolean
setProperty(PropertyKey propertyKey, String value)
Sets a property with specified key and value.
-
-
-
Constructor Detail
-
PropertyHolderImpl
public PropertyHolderImpl(@NotNull PropertyLoader<IDType> propertyLoader, @NotNull PropertyUpdater<IDType> propertyUpdater, @NotNull IDType id)
-
-
Method Detail
-
getPropertyValue
@Nullable public String getPropertyValue(PropertyKey propertyKey)
Description copied from interface:PropertyHolder
Returns value of the property with specified key- Specified by:
getPropertyValue
in interfacePropertyHolder
- Parameters:
propertyKey
- value of the property with specified key- Returns:
- value of the property with specified key
-
getBooleanProperty
public boolean getBooleanProperty(PropertyKey propertyKey)
Description copied from interface:PropertyHolder
Returns value of the boolean property- Specified by:
getBooleanProperty
in interfacePropertyHolder
- Parameters:
propertyKey
- property key- Returns:
- value
-
getProperties
@NotNull public Map<PropertyKey,String> getProperties()
Description copied from interface:PropertyHolder
Returns map of the properties- Specified by:
getProperties
in interfacePropertyHolder
- Returns:
- map of the properties
-
setProperties
public boolean setProperties(@NotNull Map<? extends PropertyKey,String> properties)
Description copied from interface:SPropertyHolder
Updates the specified properties. Only those properties will be updated which keys are specified in the properties map. All other properties will be left intact.- Specified by:
setProperties
in interfaceSPropertyHolder
- Parameters:
properties
- properties- Returns:
- true if at least one property was changed, false otherwise
-
setProperty
public boolean setProperty(@NotNull PropertyKey propertyKey, String value)
Description copied from interface:SPropertyHolder
Sets a property with specified key and value.- Specified by:
setProperty
in interfaceSPropertyHolder
- Parameters:
propertyKey
- property keyvalue
- value of the property- Returns:
- true if the property value was actually changed, false otherwise
-
deleteProperty
public boolean deleteProperty(@NotNull PropertyKey propertyKey)
Description copied from interface:SPropertyHolder
Deletes a property with specified key.- Specified by:
deleteProperty
in interfaceSPropertyHolder
- Parameters:
propertyKey
- property key- Returns:
- true if the property was actually deleted, false otherwise
-
clearCaches
public void clearCaches()
-
convertPropertyKey
@NotNull public static PropertyKey convertPropertyKey(@NotNull PropertyKey orig)
-
-