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 ContentHolderForInputUnwraps thisContentHolderto get aContentHolderForInputif it has been instantiated as so.static ContentHolderForOutputcreateForRecord(Adaptation aRecord) Returns a newContentHolderForOutputinstance.final booleanReturnstrueif this content holder is for input,falseotherwise.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:ContentHolderReturnstrueif this content holder is for input,falseotherwise.- Specified by:
isForInputin classContentHolder- See Also:
-
asContentHolderForInput
Description copied from class:ContentHolderUnwraps thisContentHolderto get aContentHolderForInputif it has been instantiated as so.- Specified by:
asContentHolderForInputin classContentHolder- Returns:
- the unwrapped
ContentHolderForInput. - See Also:
-
createForRecord
Returns a newContentHolderForOutputinstance.- Parameters:
aRecord- the table record to serialize into the JSON response body.- Throws:
IllegalArgumentException- if the providedAdaptationisnullor is not a table record.
-