public class ODataReadMediaBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
ODataReadMediaRequest |
build()
Builds the final OData query for retrieving the media resource
|
ODataReadMediaBuilder |
enableMetadataCache()
Enables caching of the metadata of an OData V2 data source.
|
ODataReadMediaBuilder |
enableMetadataCache(com.sap.cloud.sdk.cloudplatform.cache.CacheKey cacheKey)
Enables caching of the metadata of an OData V2 data source.
|
ODataReadMediaBuilder |
param(String key,
Object value)
Adds additional query parameters to the OData request
|
ODataReadMediaBuilder |
withCacheRefresh()
Replaces the existing metadata in the cache with the latest version from the OData V2 data source.
|
static ODataReadMediaBuilder |
withEntity(String servicePath,
String entitySetName,
Map<String,Object> keys)
Adds the name of the service and entity set, containing the media resource,
to the ODataMediaRequestBuilder object
|
ODataReadMediaBuilder |
withHeader(String key,
String value)
Adds a header to the OData request for querying media resources
|
ODataReadMediaBuilder |
withHeader(String key,
String value,
boolean passInAllRequests)
Adds a header to the OData request for querying media resources
|
ODataReadMediaBuilder |
withMetadata(URL metadataFilePath)
Gets the metadata from the specified path.
|
ODataReadMediaBuilder |
withoutMetadata()
Prevents the metadata being retrieved before the actual query.
|
public static ODataReadMediaBuilder withEntity(String servicePath, String entitySetName, Map<String,Object> keys)
servicePath - Name of the service including the relative path.
For example, in the case of OData V2, the service path is odata/v2/EPMSampleServiceentitySetName - Name of the entity setkeys - Keys identifying the entity that contains the media resourcepublic ODataReadMediaBuilder enableMetadataCache()
public ODataReadMediaBuilder enableMetadataCache(com.sap.cloud.sdk.cloudplatform.cache.CacheKey cacheKey)
key - Cache key containing the ID of the tenant where the application runs. You can also include the user name in the cache key.public ODataReadMediaBuilder withCacheRefresh()
public ODataReadMediaBuilder withMetadata(URL metadataFilePath)
metadataFilePath - URL pointing to the metadata informationpublic ODataReadMediaBuilder withHeader(String key, String value)
key - Name of the headervalue - Value of the headerpublic ODataReadMediaBuilder withHeader(String key, String value, boolean passInAllRequests)
key - Name of the headervalue - Value of the headerpassInAllRequests - Boolean value indicating whether the header must be passed in all the requests to the backend,
for example, in a $metadata callpublic ODataReadMediaBuilder withoutMetadata()
public ODataReadMediaBuilder param(String key, Object value)
key - Name of the parametervalue - Value of the parameterpublic ODataReadMediaRequest build()
Copyright © 2020 SAP. All Rights Reserved.