public class ContentItemResponse
extends java.lang.Object
DeliveryClient.getItem(String), or
DeliveryClient.getItem(String, List).| Modifier and Type | Class and Description |
|---|---|
static class |
ContentItemResponse.ContentItemResponseBuilder |
| Constructor and Description |
|---|
ContentItemResponse() |
ContentItemResponse(ContentItem item,
java.util.Map<java.lang.String,ContentItem> linkedItems,
StronglyTypedContentItemConverter stronglyTypedContentItemConverter) |
| Modifier and Type | Method and Description |
|---|---|
static ContentItemResponse.ContentItemResponseBuilder |
builder() |
protected boolean |
canEqual(java.lang.Object other) |
<T> T |
castTo(java.lang.Class<T> tClass)
Returns a new instance of T by mapping fields to elements in this response's
getItem(). |
boolean |
equals(java.lang.Object o) |
ContentItem |
getItem()
The
ContentItem returned by this ContentItemResponse. |
java.util.Map<java.lang.String,ContentItem> |
getLinkedItems()
A map of content items used in linked item and Rich text elements.
|
StronglyTypedContentItemConverter |
getStronglyTypedContentItemConverter() |
int |
hashCode() |
java.lang.String |
toString() |
public ContentItemResponse()
public ContentItemResponse(ContentItem item, java.util.Map<java.lang.String,ContentItem> linkedItems, StronglyTypedContentItemConverter stronglyTypedContentItemConverter)
public <T> T castTo(java.lang.Class<T> tClass)
getItem(). Element fields
are mapped by automatically CamelCasing and checking for equality, unless otherwise annotated by an
ElementMapping annotation. T must have a default constructor and have standard setter methods. When
passing in Object.class, the type returned will be an instance of the class registered with the
DeliveryClient that is annotated with ContentItemMapping that matches the
System.type of this ContentItem (however still returned as type Object).
If Object is passed in, the StronglyTypedContentItemConverter will cast this ContentItem to a
type that is mapped this ContentItem's System.type from a previous registration via the
DeliveryClient.registerType(Class) or DeliveryClient.registerType(String, Class) methods. If no
registration has been done, then this same instance of ContentItem will be returned.
T - The type of class which will be returned.tClass - The class which a new instance should be returned from using this ContentItem.ContentItem in this response.DeliveryClient.registerType(Class),
DeliveryClient.registerType(String, Class),
ContentItemMapping,
ElementMapping,
StronglyTypedContentItemConverterpublic static ContentItemResponse.ContentItemResponseBuilder builder()
public ContentItem getItem()
ContentItem returned by this ContentItemResponse.ContentItem of this ContentItemResponse.public java.util.Map<java.lang.String,ContentItem> getLinkedItems()
ContentItems referenced in this response.public StronglyTypedContentItemConverter getStronglyTypedContentItemConverter()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Object