Package io.jmix.flowui.view.navigation
Class UrlParamSerializer
java.lang.Object
io.jmix.flowui.view.navigation.UrlParamSerializer
The utility class that is responsible for serializing and deserializing
various data types into string representations suitable for URL parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DateIntervalSupportstatic final Stringstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version.static final Stringstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.static final Stringprotected Metadataprotected MetadataToolsprotected UiNavigationPropertiesprotected DateTimeFormatterprotected DateTimeFormatterprotected DateTimeFormatterprotected DateTimeFormatterprotected DateTimeFormatter -
Constructor Summary
ConstructorsConstructorDescriptionUrlParamSerializer(UiNavigationProperties navigationProperties, MetadataTools metadataTools, Metadata metadata, DateIntervalSupport dateIntervalSupport) -
Method Summary
Modifier and TypeMethodDescription<T> Tdeserialize(Class<T> type, String serializedValue) Deserializes the givenserializedValueas a value with giventype.protected voidprotected BigDecimalparseBigDecimal(String stringValue) protected BigIntegerparseBigInteger(String stringValue) protected BooleanparseBoolean(String stringValue) protected CharacterparseCharacter(String stringValue) protected <T> TparseComposite(Class<T> type, String stringValue) protected Dateprotected ObjectparseDateInterval(String stringValue) protected DateparseDateTime(String stringValue) protected DoubleparseDouble(String stringValue) protected <T> Tprotected FloatparseFloat(String stringValue) protected IntegerparseInteger(String stringValue) protected LocalDateparseLocalDate(String stringValue) protected LocalDateTimeparseLocalDateTime(String stringValue) protected LocalTimeparseLocalTime(String stringValue) protected Longprotected OffsetDateTimeparseOffsetDateTime(String stringValue) protected OffsetTimeparseOffsetTime(String stringValue) protected ShortparseShort(String stringValue) protected StringparseString(String stringValue) protected Timeprotected URIprotected UUIDprotected StringpropertyNameMapper(String property) protected StringpropertyValueMapper(String property) Serializes the givenvalueto string representation.protected StringserializeCollection(Collection<?> value) protected StringserializeComposite(Object value) protected StringserializeDate(Date value) protected Stringprotected StringserializeDateTime(Date value) protected StringserializeEnum(Enum<?> value) protected StringserializeLocalDate(LocalDate value) protected Stringprotected StringserializeLocalTime(LocalTime value) protected Stringprotected StringserializeOffsetTime(OffsetTime value) protected StringserializePrimitive(Object value) protected StringserializeTime(Time value) protected StringserializeUuid(UUID value)
-
Field Details
-
DEFAULT_DATE_FORMAT
- See Also:
-
DEFAULT_TIME_FORMAT
- See Also:
-
DEFAULT_OFFSET_FORMAT
- See Also:
-
DEFAULT_DATE_TIME_FORMAT
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
DEFAULT_OFFSET_DATE_TIME_FORMAT
@Deprecated(since="2.8", forRemoval=true) public static final String DEFAULT_OFFSET_DATE_TIME_FORMATDeprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
DEFAULT_OFFSET_TIME_FORMAT
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
temporalDateFormatter
-
temporalTimeFormatter
-
temporalDateTimeFormatter
-
temporalOffsetDateTimeFormatter
-
temporalOffsetTimeFormatter
-
metadataTools
-
metadata
-
dateIntervalSupport
-
-
Constructor Details
-
Method Details
-
initFormatters
protected void initFormatters() -
serialize
Serializes the givenvalueto string representation.String, Integer, Long and UUID values are only supported.
- Parameters:
value- value to serialize- Returns:
- serialized string representation of given value
- Throws:
IllegalArgumentException- if null value is passed or it has an unsupported type
-
serializeDateTime
-
serializeLocalDate
-
serializeLocalDateTime
-
serializeDate
-
serializeOffsetDateTime
-
serializeLocalTime
-
serializeOffsetTime
-
serializeTime
-
serializeEnum
-
serializePrimitive
-
serializeUuid
-
serializeComposite
-
serializeCollection
-
serializeDateInterval
-
deserialize
Deserializes the givenserializedValueas a value with giventype.String, Integer, Long and UUID ids are only supported.
- Parameters:
type- value typeserializedValue- serialized value- Returns:
- deserialized value
- Throws:
IllegalArgumentException- if null value and/or type are passed or the given value type is not supported
-
parseOffsetDateTime
-
parseOffsetTime
-
parseBigDecimal
-
parseBigInteger
-
parseCharacter
-
parseDate
-
parseDateTime
-
parseDouble
-
parseEnum
-
parseFloat
-
parseLocalDate
-
parseLocalDateTime
-
parseLocalTime
-
parseShort
-
parseTime
-
parseBoolean
-
parseString
-
parseInteger
-
parseUri
-
parseLong
-
parseUuid
-
parseComposite
-
parseDateInterval
-
propertyNameMapper
-
propertyValueMapper
-