Package lumis.portal.user
Class UserAttributeUtil
- java.lang.Object
-
- lumis.portal.user.UserAttributeUtil
-
public final class UserAttributeUtil extends java.lang.Object
User attribute utilities.- Since:
- 12.0.0
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object
convertToJsonObject(IMonitorField.DataType dataType, java.lang.Object o)
Returns the JSON raw object version for the given object.static java.util.List<java.lang.Object>
deserializeValueFromArray(IMonitorField.DataType dataType, org.json.JSONArray arr)
Deserialize values from a JSON array.static java.util.List<java.lang.Object>
deserializeValueFromString(java.lang.String serviceInstanceId, java.lang.String attributeId, java.lang.String value)
Deserialize a value from a string representation.static java.util.List<java.lang.Object>
deserializeValueFromString(UserAttribute attribute, java.lang.String value)
Deserialize a value from a string representation.static java.lang.Object
getFromJsonString(IMonitorField.DataType dataType, java.lang.String o)
Returns a value from a raw JSON value in String.static org.json.JSONArray
serializeValueToArray(IMonitorField.DataType dataType, java.util.Collection<java.lang.Object> value)
Serializes a value to a JSON array.static java.lang.String
serializeValueToString(java.lang.String serviceInstanceId, java.lang.String attributeId, java.util.Collection<java.lang.Object> value)
Serializes a value for a given attribute.static java.lang.String
serializeValueToString(UserAttribute attribute, java.util.Collection<java.lang.Object> value)
Serializes a value for a given attribute.
-
-
-
Method Detail
-
deserializeValueFromString
public static java.util.List<java.lang.Object> deserializeValueFromString(java.lang.String serviceInstanceId, java.lang.String attributeId, java.lang.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 java.util.List<java.lang.Object> deserializeValueFromString(UserAttribute attribute, java.lang.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 java.util.List<java.lang.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 java.lang.Object getFromJsonString(IMonitorField.DataType dataType, java.lang.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 java.lang.String serializeValueToString(java.lang.String serviceInstanceId, java.lang.String attributeId, java.util.Collection<java.lang.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 java.lang.String serializeValueToString(UserAttribute attribute, java.util.Collection<java.lang.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, java.util.Collection<java.lang.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 java.lang.Object convertToJsonObject(IMonitorField.DataType dataType, java.lang.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
-
-