public static class CardKey.Provider
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static CardKey.Provider |
CONTENT_CARDS |
static CardKey.Provider |
NEWS_FEED |
Constructor and Description |
---|
Provider(boolean isContentCards) |
Modifier and Type | Method and Description |
---|---|
CardType |
getCardTypeFromJson(org.json.JSONObject jsonObject)
Parses out the card type from the json and returns a
CardType . |
java.lang.String |
getKey(CardKey key) |
java.lang.String |
getServerKeyFromCardType(CardType cardType)
Returns the server key for the
CardType , or null if the server key cannot be found. |
boolean |
isContentCardProvider() |
public static final CardKey.Provider CONTENT_CARDS
public static final CardKey.Provider NEWS_FEED
public boolean isContentCardProvider()
public java.lang.String getKey(CardKey key)
public CardType getCardTypeFromJson(org.json.JSONObject jsonObject)
CardType
.
If the type is that of a CardType.SHORT_NEWS
and no image url is present, then
the type returned will be that of a CardType.TEXT_ANNOUNCEMENT
.jsonObject
- The json object of the Card
.CardType
if parsable from the json or CardType.DEFAULT
.