public class AssetLibrary extends Object implements INotifyClass
| Modifier and Type | Class and Description |
|---|---|
static class |
AssetLibrary.ORDERBY
The enum Orderby.
|
| Modifier and Type | Field and Description |
|---|---|
protected FetchAssetsCallback |
callback |
protected int |
count |
protected LinkedHashMap<String,Object> |
headers |
protected Logger |
logger |
protected Stack |
stackInstance |
protected org.json.JSONObject |
urlQueries |
| Modifier | Constructor and Description |
|---|---|
protected |
AssetLibrary() |
| Modifier and Type | Method and Description |
|---|---|
void |
fetchAll(FetchAssetsCallback callback)
Fetch all.
|
int |
getCount()
Gets count.
|
void |
getResult(Object object,
String controller) |
void |
getResultObject(List<Object> objects,
org.json.JSONObject jsonObject,
boolean isSingleEntry) |
AssetLibrary |
includeCount()
Include count asset library.
|
AssetLibrary |
includeFallback()
Retrieve the published content of the fallback locale if an entry is not
localized in specified locale
|
AssetLibrary |
includeRelativeUrl()
Include relative url asset library.
|
void |
removeHeader(String headerKey)
Remove header.
|
void |
setHeader(String headerKey,
String headerValue)
Sets header.
|
protected void |
setStackInstance(Stack stack) |
AssetLibrary |
sort(String keyOrderBy,
AssetLibrary.ORDERBY orderby)
Sort asset library.
|
protected final Logger logger
protected final org.json.JSONObject urlQueries
protected Stack stackInstance
protected LinkedHashMap<String,Object> headers
protected FetchAssetsCallback callback
protected int count
protected void setStackInstance(@NotNull
Stack stack)
public void setHeader(@NotNull
String headerKey,
@NotNull
String headerValue)
headerKey - the header keyheaderValue - the header valuepublic void removeHeader(@NotNull
String headerKey)
headerKey - the header keypublic AssetLibrary sort(String keyOrderBy, AssetLibrary.ORDERBY orderby)
keyOrderBy - the key order byorderby - the orderbypublic AssetLibrary includeCount()
public AssetLibrary includeRelativeUrl()
public AssetLibrary includeFallback()
AssetLibrary object, so you can chain this call.
Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
AssetLibrary assetLibObject = stack.assetLibrary();
AssetLibrary.includeFallback();
public int getCount()
public void fetchAll(FetchAssetsCallback callback)
callback - the callbackpublic void getResult(Object object, String controller)
getResult in interface INotifyClasspublic void getResultObject(List<Object> objects, org.json.JSONObject jsonObject, boolean isSingleEntry)
getResultObject in interface INotifyClassCopyright © 2021 Contentstack.. All rights reserved.