public class ContentType extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
contentTypeUid |
protected LinkedHashMap<String,Object> |
headers |
protected Stack |
stackInstance |
| Modifier | Constructor and Description |
|---|---|
protected |
ContentType() |
protected |
ContentType(String contentTypeUid) |
| Modifier and Type | Method and Description |
|---|---|
protected Entry |
entry() |
Entry |
entry(String entryUid)
An entry is the actual piece of content created using one of the defined
content types.
|
void |
fetch(org.json.JSONObject params,
ContentTypesCallback callback)
Fetch.
|
Query |
query()
Query.
|
void |
removeHeader(String headerKey)
Remove header from
Stack |
void |
setHeader(String headerKey,
String headerValue)
Sets header on
Stack. |
protected void |
setStackInstance(Stack stack) |
protected String contentTypeUid
protected Stack stackInstance
protected LinkedHashMap<String,Object> headers
protected ContentType()
throws IllegalAccessException
IllegalAccessExceptionprotected ContentType(String contentTypeUid)
protected void setStackInstance(Stack stack)
public void setHeader(String headerKey, String headerValue)
Stack.headerKey - the header keyheaderValue - the header valuepublic void removeHeader(String headerKey)
StackheaderKey - the header keypublic Entry entry(String entryUid)
The Get a single entry request fetches a particular entry of a content type.
entryUid - the entry unique ID of the entry that you want to fetch.Entry entry.protected Entry entry()
public Query query()
If an entry is not published in a specific locale, make use of the include_fallback=true query parameter to fetch the published content from its fallback locale.
Note:If the fallback language of the specified locale is the master language itself, this parameter would not be applicable.
To include the publishing details in the response, make use of the include_publish_details=true parameter. This will return the publishing details of the entry in every environment along with the version number that is published in each of the environments. You can add other Queries to extend the functionality of this API call. Add a query parameter named query and provide your query (in JSON format) as the value.
Querypublic void fetch(@NotNull
org.json.JSONObject params,
ContentTypesCallback callback)
params - the paramscallback - the callbackCopyright © 2021 Contentstack.. All rights reserved.