Class ContentHolderForOutput
- java.lang.Object
-
- com.orchestranetworks.rest.serialization.ContentHolder
-
- com.orchestranetworks.rest.serialization.ContentHolderForOutput
-
public abstract class ContentHolderForOutput extends ContentHolder
Provides a facade to automatically serialize anAdaptation, that corresponds to a table record, into a JSON response body.The generated JSON format can be customized by using the
ExtendedOutputannotation.- Since:
- 6.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentHolderForInputasContentHolderForInput()Unwraps thisContentHolderto get aContentHolderForInputif it has been instantiated as so.static ContentHolderForOutputcreateForRecord(Adaptation aRecord)Returns a newContentHolderForOutputinstance.booleanisForInput()Returnstrueif this content holder is for input,falseotherwise.-
Methods inherited from class com.orchestranetworks.rest.serialization.ContentHolder
get, get, getBoolean, getDate, getInt, getList, getString
-
-
-
-
Method Detail
-
isForInput
public final boolean isForInput()
Description copied from class:ContentHolderReturnstrueif this content holder is for input,falseotherwise.- Specified by:
isForInputin classContentHolder- See Also:
ContentHolder.isForInput()
-
asContentHolderForInput
public final ContentHolderForInput 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:
ContentHolder.asContentHolderForInput()
-
createForRecord
public static ContentHolderForOutput createForRecord(Adaptation aRecord)
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.
-
-