Package lumis.portal.propertybag
Class PropertyBagUtil
- java.lang.Object
-
- lumis.portal.propertybag.PropertyBagUtil
-
public final class PropertyBagUtil extends java.lang.Object
Utility methods for dealing with property bags.- Since:
- 16.0.0
- Version:
- $Revision: 25808 $ $Date: 2023-07-04 15:20:55 -0300 (Tue, 04 Jul 2023) $
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
getOrDefault(StructureElement structureElement, java.lang.String propertyName, T defaultValue, java.util.function.Function<java.lang.String,T> convertFunction)
Returns either the value defined in property bag of the given structure element or the default value.
-
-
-
Method Detail
-
getOrDefault
public static <T> T getOrDefault(StructureElement structureElement, java.lang.String propertyName, T defaultValue, java.util.function.Function<java.lang.String,T> convertFunction) throws PortalException
Returns either the value defined in property bag of the given structure element or the default value.- Type Parameters:
T
-- Parameters:
structureElement
- the structure elementpropertyName
- the target property namedefaultValue
- the default valueconvertFunction
- the function used to convert a string (property bag value) in the typeT
- Returns:
- either the value defined in property bag of the given structure element or the default value
- Throws:
PortalException
- Since:
- 16.0.0
-
-