Package lumis.portal.user
Class UserAttributeUtil
- java.lang.Object
-
- lumis.portal.user.UserAttributeUtil
-
public final class UserAttributeUtil extends Object
User attribute utilities.- Since:
- 12.0.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
convertToJsonObject(IMonitorField.DataType dataType, Object o)
Returns the JSON raw object version for the given object.static List<Object>
deserializeValueFromArray(IMonitorField.DataType dataType, org.json.JSONArray arr)
Deserialize values from a JSON array.static List<Object>
deserializeValueFromString(String serviceInstanceId, String attributeId, String value)
Deserialize a value from a string representation.static List<Object>
deserializeValueFromString(UserAttribute attribute, String value)
Deserialize a value from a string representation.static Object
getFromJsonString(IMonitorField.DataType dataType, String o)
Returns a value from a raw JSON value in String.static org.json.JSONArray
serializeValueToArray(IMonitorField.DataType dataType, Collection<Object> value)
Serializes a value to a JSON array.static String
serializeValueToString(String serviceInstanceId, String attributeId, Collection<Object> value)
Serializes a value for a given attribute.static String
serializeValueToString(UserAttribute attribute, Collection<Object> value)
Serializes a value for a given attribute.
-
-
-
Method Detail
-
deserializeValueFromString
public static List<Object> deserializeValueFromString(String serviceInstanceId, String attributeId, String value)
Deserialize a value from a string representation.- Parameters:
serviceInstanceId
- the service instance identifier.attributeId
- the user attribute identifier.value
- the value.- Returns:
- the deserialized value.
- Since:
- 14.0.0
-
deserializeValueFromString
public static List<Object> deserializeValueFromString(UserAttribute attribute, String value)
Deserialize a value from a string representation.- Parameters:
attribute
- the user attribute.value
- the value.- Returns:
- the deserialized value.
- Since:
- 14.0.0
-
deserializeValueFromArray
public static List<Object> deserializeValueFromArray(IMonitorField.DataType dataType, org.json.JSONArray arr)
Deserialize values from a JSON array.- Parameters:
dataType
- the data typearr
- the array- Returns:
- the values
- Since:
- 12.0.0
-
getFromJsonString
public static Object getFromJsonString(IMonitorField.DataType dataType, String o)
Returns a value from a raw JSON value in String.- Parameters:
dataType
- the data typeo
- the raw JSON value in string.- Returns:
- the value.
- Since:
- 12.3.0
-
serializeValueToString
public static String serializeValueToString(String serviceInstanceId, String attributeId, Collection<Object> value)
Serializes a value for a given attribute.- Parameters:
serviceInstanceId
- the service instance identifierattributeId
- the attribute identifiervalue
- the value- Returns:
- the serialized value
- Since:
- 14.0.0
-
serializeValueToString
public static String serializeValueToString(UserAttribute attribute, Collection<Object> value)
Serializes a value for a given attribute.- Parameters:
attribute
- the attributevalue
- the value.- Returns:
- the serialized value
- Since:
- 14.0.0
-
serializeValueToArray
public static org.json.JSONArray serializeValueToArray(IMonitorField.DataType dataType, Collection<Object> value)
Serializes a value to a JSON array.- Parameters:
dataType
- the data typevalue
- the value- Returns:
- the JSON array
- Since:
- 12.0.0
-
convertToJsonObject
public static Object convertToJsonObject(IMonitorField.DataType dataType, Object o)
Returns the JSON raw object version for the given object.- Parameters:
dataType
- the data typeo
- the object- Returns:
- the raw JSON object version of the given object
- Since:
- 12.0.0
-
-