Class ContentAssetRequest<T extends ContentAssetRequest,C extends Asset>
java.lang.Object
com.oracle.content.sdk.request.core.ContentRequest<T,C>
com.oracle.content.sdk.request.core.ContentRequestById<T,C>
com.oracle.content.sdk.request.core.ContentAssetRequest<T,C>
- Direct Known Subclasses:
GetContentItemRequest
,GetCustomContentItemRequest
,GetDigitalAssetRequest
public abstract class ContentAssetRequest<T extends ContentAssetRequest,C extends Asset>
extends ContentRequestById<T,C>
Base request class for
GetContentItemRequest
and GetDigitalAssetRequest
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.content.sdk.request.core.ContentRequestById
ContentRequestById.IdType
-
Field Summary
FieldsFields inherited from class com.oracle.content.sdk.request.core.ContentRequestById
id, idType
Fields inherited from class com.oracle.content.sdk.request.core.ContentRequest
client, links, objectClass
-
Constructor Summary
ConstructorsConstructorDescriptionContentAssetRequest
(ContentDeliveryClient client, Class<C> objectClass, String id, ContentRequestById.IdType idType) -
Method Summary
Modifier and TypeMethodDescriptionstatic Asset
deserializeContentBaseItem
(com.google.gson.JsonElement jsonElement) Utility method to deserialize response to aAsset
.Specify whether to expand fields in the content item.Specifies a list of fields to expand when requesting the item.Just like callingexpand
with "all" as the parameter.retrofit2.Call<com.google.gson.JsonElement>
getCall()
Get the retrofit call to make for this request..Methods inherited from class com.oracle.content.sdk.request.core.ContentRequest
deserializeObject, fetch, fetchAsync, fetchResult, getCacheControl, getThis, gson, links, linksNone, noCache, observable, observableResult
-
Field Details
-
EXPAND_ALL
- See Also:
-
expand
-
-
Constructor Details
-
ContentAssetRequest
public ContentAssetRequest(ContentDeliveryClient client, Class<C> objectClass, String id, ContentRequestById.IdType idType)
-
-
Method Details
-
expand
Specify whether to expand fields in the content item. Can be a value such as "fields.field_name" to expand a specific item reference. Note that by default this is not set. See alsoexpandAll()
- Parameters:
field
- expand field value (e.g. "all") or null to not expand references- Returns:
- Builder object
-
expand
Specifies a list of fields to expand when requesting the item.- Parameters:
expandFields
- list of string fields to expand- Returns:
- Builder object
-
expandAll
Just like callingexpand
with "all" as the parameter. Will expand all item reference fields.- Returns:
- Builder object.
-
deserializeContentBaseItem
Utility method to deserialize response to aAsset
. If this is a digital asset, it will deserialize into aDigitalAsset
, otherwise aContentItem
- Parameters:
jsonElement
- Root json element for content item- Returns:
- Either a ContentItem or DigitalAsset depending on the type
-
getExpand
-
getCall
public retrofit2.Call<com.google.gson.JsonElement> getCall()Description copied from class:ContentRequest
Get the retrofit call to make for this request..- Specified by:
getCall
in classContentRequest<T extends ContentAssetRequest,
C extends Asset> - Returns:
- return the retrofit call object to use for this request
-