public class GfycatFeedDatabaseCache extends java.lang.Object implements GfycatFeedCache
Constructor and Description |
---|
GfycatFeedDatabaseCache(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
boolean |
blockItem(Gfycat gfcycat,
boolean block)
Block gfycat, this gfycat item would not be visible anymore.
|
boolean |
blockUser(java.lang.String userName,
boolean block)
Do not show any gfycats from specified user.
|
void |
close() |
void |
closeFeed(FeedIdentifier identifier,
java.lang.String previousDigest) |
boolean |
delete(FeedIdentifier feedIdentifier) |
FeedData |
getFeedData(FeedIdentifier feedIdentifier)
Get feed data for feedIdentifier
|
Gfycat |
getGfycat(java.lang.String gfyId) |
void |
insertFeed(FeedIdentifier identifier,
GfycatList data,
CloseMode closeMode)
Same as
GfycatFeedCache.insertFeed(FeedIdentifier, GfycatList, CloseMode, boolean) with append = false. |
void |
insertFeed(FeedIdentifier identifier,
GfycatList gfycatList,
CloseMode closeMode,
boolean append)
Insert Feed to database.
|
boolean |
internalDelete(FeedIdentifier feedIdentifier,
boolean notify) |
boolean |
markDeleted(Gfycat item,
boolean deleted)
Mark item as disabled.
|
boolean |
markNsfw(Gfycat item,
boolean nsfw)
Mark nsfw
|
boolean |
markPublished(Gfycat item,
boolean published)
Mark published..
|
void |
removeFromRecent(Gfycat item)
Removes gfycat from recent
|
void |
updateFeed(FeedIdentifier identifier,
java.lang.String previousDigest,
GfycatList gfycatList) |
public GfycatFeedDatabaseCache(android.content.Context context)
public Gfycat getGfycat(java.lang.String gfyId)
getGfycat
in interface GfycatFeedCache
public void insertFeed(FeedIdentifier identifier, GfycatList data, CloseMode closeMode)
GfycatFeedCache
GfycatFeedCache.insertFeed(FeedIdentifier, GfycatList, CloseMode, boolean)
with append = false.insertFeed
in interface GfycatFeedCache
public void insertFeed(FeedIdentifier identifier, GfycatList gfycatList, CloseMode closeMode, boolean append)
GfycatFeedCache
insertFeed
in interface GfycatFeedCache
identifier
- of feed to insert.gfycatList
- to insert.closeMode
- closing mode policy.append
- if true insert or add policy will be applied, if false feed would be replaced.public void updateFeed(FeedIdentifier identifier, java.lang.String previousDigest, GfycatList gfycatList)
updateFeed
in interface GfycatFeedCache
identifier
- - see #FeedIdentifier class.previousDigest
- - previous digest value for checking if we not duplicate the same request on update database.gfycatList
- - content that should be added to previously inserted Feed.public void closeFeed(FeedIdentifier identifier, java.lang.String previousDigest)
closeFeed
in interface GfycatFeedCache
identifier
- - see #FeedIdentifier class.public boolean markDeleted(Gfycat item, boolean deleted)
GfycatFeedCache
markDeleted
in interface GfycatFeedCache
public void removeFromRecent(Gfycat item)
GfycatFeedCache
removeFromRecent
in interface GfycatFeedCache
public boolean markPublished(Gfycat item, boolean published)
GfycatFeedCache
markPublished
in interface GfycatFeedCache
public boolean markNsfw(Gfycat item, boolean nsfw)
GfycatFeedCache
markNsfw
in interface GfycatFeedCache
public boolean delete(FeedIdentifier feedIdentifier)
delete
in interface GfycatFeedCache
feedIdentifier
- - delete cache for feedIdentifier.public boolean internalDelete(FeedIdentifier feedIdentifier, boolean notify)
public FeedData getFeedData(FeedIdentifier feedIdentifier)
GfycatFeedCache
getFeedData
in interface GfycatFeedCache
public boolean blockItem(Gfycat gfcycat, boolean block)
GfycatFeedCache
blockItem
in interface GfycatFeedCache
public boolean blockUser(java.lang.String userName, boolean block)
GfycatFeedCache
blockUser
in interface GfycatFeedCache
public void close()