Class Formatter
java.lang.Object
de.xima.fc.api.rest.pub.client.security.Formatter
@Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator")
public final class Formatter
extends Object
Helper methods for web related tasks such as URL encoding etc.
-
Method Summary
Modifier and TypeMethodDescriptionescapeString(Object str) Converts the given object to a string and escapes it so it can be used as URL query value.escapeString(String str) Escape the given string to be used as URL query value.parameterToPairs(String collectionFormat, String name, Object value) Format toPairobjects.parameterToString(Object param) Format the given parameter object into string.Parse the given string into Date object.Parse the given string intoOffsetDateTimeobject.selectHeaderContentType(String[] contentTypes) Select the Content-Type header's value from the given array: if JSON exists in the given array, use it; otherwise use the first one of the array.
-
Method Details
-
parameterToString
-
parameterToPairs
Format toPairobjects.- Parameters:
collectionFormat- Either csv (comma separated), tsv (tab separated), or pipes (separated by a pipe character).name- Name of the pair.value- One or more values of the pair. Can be a string or a Collection.- Returns:
- The pair formatted according to the given format, e.g. a string with the name and value separated by the given delimiter, and each pair separated from each other by a comma.
-
escapeString
-
escapeString
-
selectHeaderContentType
Select the Content-Type header's value from the given array: if JSON exists in the given array, use it; otherwise use the first one of the array.- Parameters:
contentTypes- The Content-Type array to select from- Returns:
- The Content-Type header to use. If the given array is empty, JSON will be used.
-
parseDate
-
parseOffsetDateTime
Parse the given string intoOffsetDateTimeobject.- Parameters:
str- String- Returns:
OffsetDateTime
-