-
Notifications
You must be signed in to change notification settings - Fork 0
API
Additionally to the already mentioned RunTimeException and PageableResults + ErrorResponses the api contains some extra utils.
Provides a preconfigured REST-client for the CrudController. Internally it uses the spring RestTemplate.
You only need to provide the baseApiUrl where the service is deployed. All CRUD opertations are already integrated.
Same as the CrudRestResource. Additionally you need to specify the path name of the child.
Is an object to deal with translations. It extends a Map<Locale, String> and provides jacksons De/Serializer.
{
"en": "Welcome",
"de": "Willkommen"
}
Additionally a ValidationAnnotation is available that checks if within the Translation the Englisch language is present. @HasDefaultLocale
It's a short null check util with some static methods:
-
notNull(value, fallback)
- in case the value is null it will retun the fallback
-
notEmpty(value, fallback)
- in case the value is null or empty - return the fallback
-
notNull(value, provider, fallback)
-
the value is any object and with the given provider you specify the property of the value you would like to get returend
-
this method checks if object or property is null and will return fallback otherwise
-
Nulls.notEmpty(user, AppUserRead::getUsername, "unkown")
-