Class Constants
java.lang.Object
de.fraunhofer.iosb.ilt.frostserver.util.Constants
- Author:
- scf
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TthrowIfNullOrTypeNot(Object entity, Class<T> targetClass) Throws an IllegalArgumentException if entity is not an instance of targetClass, or if entity is null.static <T> TthrowIfTypeNot(Object entity, Class<T> targetClass) Throws an IllegalArgumentException if entity is not an instance of targetClass.
-
Field Details
-
CONTENT_TYPE
- See Also:
-
CONTENT_TYPE_APPLICATION_GEOJSON
- See Also:
-
CONTENT_TYPE_APPLICATION_HTTP
- See Also:
-
CONTENT_TYPE_APPLICATION_JSON
- See Also:
-
CONTENT_TYPE_APPLICATION_JSONPATCH
- See Also:
-
CONTENT_TYPE_APPLICATION_XML
- See Also:
-
CONTENT_TYPE_TEXT_HTML
- See Also:
-
CHARSET_UTF8
- See Also:
-
HEADER_ACCEPT
- See Also:
-
HEADER_LOCATION
- See Also:
-
HEADER_PREFER
- See Also:
-
TAG_PREFER_RETURN
- See Also:
-
REQUEST_PARAM_FORMAT
- See Also:
-
VALUE_ID_TYPE_LONG
- See Also:
-
VALUE_ID_TYPE_STRING
- See Also:
-
VALUE_ID_TYPE_UUID
- See Also:
-
VALUE_RETURN_REPRESENTATION
- See Also:
-
VALUE_RETURN_MINIMAL
- See Also:
-
-
Method Details
-
throwIfNullOrTypeNot
Throws an IllegalArgumentException if entity is not an instance of targetClass, or if entity is null. Returns the entity so calls can be chained.- Type Parameters:
T- The type of the entity (auto detected)- Parameters:
entity- The entity to check the class of.targetClass- The class to check the entity against.- Returns:
- The entity to check.
-
throwIfTypeNot
Throws an IllegalArgumentException if entity is not an instance of targetClass. Does not throw if entity is null. Returns the entity so calls can be chained.- Type Parameters:
T- The type of the entity (auto detected)- Parameters:
entity- The entity to check the class of.targetClass- The class to check the entity against.- Returns:
- The entity to check.
-