Class ContentHolderForOutput
java.lang.Object
com.orchestranetworks.rest.serialization.ContentHolder
com.orchestranetworks.rest.serialization.ContentHolderForOutput
Provides a facade to automatically serialize an
Adaptation
,
that corresponds to a table record,
into a JSON response body.
The generated JSON format can be customized by using the
ExtendedOutput
annotation.
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptionfinal ContentHolderForInput
Unwraps thisContentHolder
to get aContentHolderForInput
if it has been instantiated as so.static ContentHolderForOutput
createForRecord
(Adaptation aRecord) Returns a newContentHolderForOutput
instance.final boolean
Returnstrue
if this content holder is for input,false
otherwise.Methods inherited from class com.orchestranetworks.rest.serialization.ContentHolder
get, get, getBoolean, getDate, getInt, getList, getString
-
Method Details
-
isForInput
public final boolean isForInput()Description copied from class:ContentHolder
Returnstrue
if this content holder is for input,false
otherwise.- Specified by:
isForInput
in classContentHolder
- See Also:
-
asContentHolderForInput
Description copied from class:ContentHolder
Unwraps thisContentHolder
to get aContentHolderForInput
if it has been instantiated as so.- Specified by:
asContentHolderForInput
in classContentHolder
- Returns:
- the unwrapped
ContentHolderForInput
. - See Also:
-
createForRecord
Returns a newContentHolderForOutput
instance.- Parameters:
aRecord
- the table record to serialize into the JSON response body.- Throws:
IllegalArgumentException
- if the providedAdaptation
isnull
or is not a table record.
-