ParserUtility 类
定义
Set of static functions to help the serializer.
public class ParserUtility
- 继承
-
java.lang.ObjectParserUtility
方法
dateTimeUtcToString(Date date) |
Helper to convert the provided Date UTC into String. Expected result: "2016-06-01T21:22:43.799Z"
|
getDateStringFromDate(Date date) |
Convert from a date object back into a string representation Expected format of returned string: "2016-01-21T11:05:21"
|
getDateTimeUtc(String dataTime) |
Helper to convert the provided string in a UTC Date. Expected format: "2016-06-01T21:22:43.7996883Z"
|
getJsonArrayValue(JsonArray jsonArray) | |
getJsonObjectValue(JsonObject jsonObject) | |
getJsonPrimitiveValue(JsonPrimitive jsonPrimitive) | |
mapToJsonElement(Map<String, Object> map) |
Helper to convert a provided map in to a JsonElement, including sub-maps.
|
resolveJsonElement(JsonElement jsonElement) | |
stringToDateTimeOffset(String dateTime) |
Helper to convert the provided string in a offset Date. Expected format: "2016-06-01T21:22:41+00:00"
|
validateBlobName(String blobName) |
Helper to validate if the provided blob name is not null, empty, and valid.
|
validateHostName(String hostName) |
Validate if a provided host name is valid using the follow criteria. A case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars + {'-', ':', '.', '+', '', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}. Contains at least one separator '.'
|
validateId(String id) |
Validate if a provided ID is valid using the follow criteria. A case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars + {'-', ':', '.', '+', '', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.
|
validateMap(Map<String, Object> map) |
Helper to validate if the provided map in terms of maximum levels and optionally if the keys ar not metadata.
|
validateObject(Object val) |
Helper to validate if the provided object is not null.
|
validateQuery(String query) |
Validates if query contains select and from keywords and also if it is a valid utf-8 string |
validateStringUTF8(String str) |
Helper to validate if the provided string is not null, empty, and all characters are UTF-8.
|