Package com.orchestranetworks.rest.serialization

# 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 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 Type
  Method
  Description
  `final ContentHolderForInput`
  `asContentHolderForInput()`
  Unwraps this `ContentHolder` to get a `ContentHolderForInput` if it has been instantiated as so.
  `static ContentHolderForOutput`
  `createForRecord(Adaptation aRecord)`
  Returns a new `ContentHolderForOutput` instance.
  `final boolean`
  `isForInput()`
  Returns `true` 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`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### isForInput

    public final boolean isForInput()
    Description copied from class: `ContentHolder`
    Returns `true` if this content holder is for input, `false` otherwise.
    Specified by:
      `isForInput` in class `ContentHolder`
    See Also:
      - `ContentHolder.isForInput()`

  - ### asContentHolderForInput

    public final ContentHolderForInput asContentHolderForInput()
    Description copied from class: `ContentHolder`
    Unwraps this `ContentHolder` to get a `ContentHolderForInput` if it has been instantiated as so.
    Specified by:
      `asContentHolderForInput` in class `ContentHolder`
    Returns:
      the unwrapped `ContentHolderForInput`.
    See Also:
      - `ContentHolder.asContentHolderForInput()`

  - ### createForRecord

    public static ContentHolderForOutput createForRecord(Adaptation aRecord)
    Returns a new `ContentHolderForOutput` instance.
    Parameters:
      `aRecord` - the table record to serialize into the JSON response body.
    Throws:
      `IllegalArgumentException` - if the provided `Adaptation` is `null` or is not a table record.