public class HomePageDataMgr
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
HomePageDataMgr.DataChanged |
static class |
HomePageDataMgr.DataType |
限定符和类型 | 字段和说明 |
---|---|
static int |
CACHE_USER_SHORT_VIDEO_COUNT |
static java.lang.String |
TYPE_ANCHOR_PAGE_DATA |
static java.lang.String |
TYPE_SHORT_VIDEO_DATA |
限定符和类型 | 方法和说明 |
---|---|
void |
addBannerItem(java.lang.String type,
BannerData bannerData)
添加banner卡片
|
void |
addCachedVideo(java.lang.String type,
java.util.ArrayList<com.app.live.activity.VideoDataInfo> videoList)
添加缓存的视频数据
|
void |
addDimensionHeaderSelectItem(java.lang.String type,
int position)
添加new 顶部维度筛选
如果存在则更新
|
void |
addFeatureGameBannerItem(java.lang.String type,
FeatureGameBean bannerData,
int position)
添加中东区首页游戏固定位banner卡片
|
void |
addFeatureOperationCard(java.lang.String type,
BannerItemData bannerItemData,
int position)
添加首页运营位
|
void |
addFeatureSecondBannerItem(java.lang.String type,
BannerData bannerData,
int position)
添加首页次屏banner卡片
|
void |
addFeedData(java.lang.String type,
com.app.dynamic.presenter.bo.FeedBO feedBO)
添加feed流数据
|
void |
addFirstShortVideo(java.lang.String type,
com.app.dynamic.presenter.bo.FeedBO feedBO)
添加一个上传的短视频卡片到第一个位置,如果存在则删掉第一个
|
void |
addFollowEmptyLiveItem(java.lang.String type)
添加follow页未关注任何主播时样式
|
void |
addFollowFeedData(java.lang.String type,
CardDataBO cardDataBO)
follow页feed数据
|
void |
addFollowHeadData(java.lang.String type,
CardDataBO cardDataBO)
follow页 head用户数据
|
void |
addFollowHeadUserBoData(java.lang.String type,
FollowActiveInfo followActiveInfo)
将follow页 head关注人用户数据存在homePageData中,不包括视频列表数据
|
void |
addFollowLiveData(java.lang.String type,
CardDataBO cardDataBO)
follow页直播数据
|
void |
addFollowTitleItemData(java.lang.String type,
CardDataBO cardDataBO)
follow页话题视频数据
|
void |
addFollowTopicFlowData(java.lang.String type,
CardDataBO cardDataBO)
follow页话题流式布局数据
|
void |
addFollowTopicVideoData(java.lang.String type,
CardDataBO cardDataBO)
follow页话题视频数据
|
boolean |
addGameOperationCard(java.lang.String type,
GameOperationBo gameOperationBo,
int position)
添加游戏运营位卡片数据
|
void |
addGlobalCountryData(java.lang.String type,
GlobalCountry3BO globalCountry3BO)
添加全球直播数据
|
void |
addLastShortVideo(java.lang.String type,
com.app.dynamic.presenter.bo.FeedBO feedBO)
添加一个刚发布的短视频卡片到最后位置,如果存在则删掉最后一个
|
void |
addLiveRoomShortVideoData(java.lang.String type,
com.app.dynamic.presenter.bo.FeedBO feedBO,
boolean upload,
int dataType)
将短视频数据添加到列表
|
void |
addLoadingItem(java.lang.String type)
添加一个loading状态的item
|
void |
addNearbyLocationItem(java.lang.String type,
int position)
添加nearby页面的位置卡片
|
void |
addObjectDataByCardType(java.lang.String type,
java.lang.Object object,
int cardType) |
void |
addPKLast(java.lang.String type) |
void |
addPKVideoData(HomePageDataMgr.DataType dataType,
java.lang.String type,
com.app.live.activity.VideoDataInfo leftVideoDataInfo,
com.app.live.activity.VideoDataInfo rightVideoDataInfo,
PKVideoData mPKVideoData) |
void |
addRankItem(java.lang.String type)
添加一个排行榜入口的item
|
void |
addShortActivityHeader(java.lang.String type,
java.lang.Object mJsonObject) |
void |
addSocialPKVideoData(HomePageDataMgr.DataType dataType,
java.lang.String type,
com.app.live.activity.VideoDataInfo leftVideoDataInfo,
com.app.live.activity.VideoDataInfo rightVideoDataInfo,
PKVideoData mPKVideoData)
添加social页pk视频数据
|
void |
addSocialPlaygroundData(java.lang.String type,
SocialPlaygroundResult result)
添加social页playground模块数据
|
void |
addSocialTitleItemData(java.lang.String type,
SocialTitleItemBean bean)
添加social页title数据
|
void |
addUserShortVideo(java.lang.String uid) |
int |
addVideo(HomePageDataMgr.DataType dataType,
java.lang.String type,
com.app.live.activity.VideoDataInfo videoDataInfo)
增加视频
|
int |
addVideoByDataType(HomePageDataMgr.DataType dataType,
java.lang.String type,
com.app.live.activity.VideoDataInfo videoDataInfo) |
int |
addVideoToLiveRoom(java.lang.String type,
com.app.live.activity.VideoDataInfo videoDataInfo)
向直播间内视屏列表添加数据
|
void |
addWorldAroundList(java.lang.String type,
CardDataBO cardDataBO)
添加world页around
|
void |
addWorldBlankCard(java.lang.String type,
java.lang.Object object)
国家页空白卡片
|
void |
addWorldCurRankHead(java.lang.String type,
CardDataBO cardDataBO)
添加world页上时段第一个
|
void |
addWorldLastRankCard(java.lang.String type,
java.lang.Object object)
world页上时段榜单
|
void |
addWorldLeaderList(java.lang.String type,
java.lang.Object object)
添加world页leaderboard
|
void |
addWorldSelectCard(java.lang.String type,
java.lang.Object object)
国家页国家选择
|
void |
addWorldTitleItemData(java.lang.String type,
java.lang.Object object)
添加world页title数据
|
void |
addWorldTitleItemDataSingle(java.lang.String type,
java.lang.Object object)
只添加一个world item
|
void |
addWorldTWSHeadList(java.lang.String type,
java.util.ArrayList<com.app.live.activity.VideoDataInfo> list)
添加world页top world star 前三个
|
void |
appendFirstFeedItem(java.lang.String type,
int source) |
boolean |
checkForYouData()
检测为你推荐是否有数据
|
void |
clear(java.lang.String type)
清除首页数据和直播间数据
|
void |
clearBannerData(java.lang.String type) |
void |
clearDataExcludeBanner(java.lang.String type) |
void |
clearLastItem(java.lang.String type) |
void |
clearPlaygroundTitle(java.lang.String type) |
void |
clearShortVideo() |
void |
clearVideoData(java.lang.String type) |
boolean |
containsUserShortVideo(java.lang.String uid) |
void |
deleteFirstShortVideo()
删除第一个上传的视频
|
void |
deleteLastShortVideo(java.lang.String type,
java.lang.String feedId)
删除刚发布的视频
|
static java.lang.String |
forShortVideogetFeedPageType(java.lang.String parentType) |
int |
getCacheUserShortVideoListSize() |
int |
getCardPosition(java.lang.String type,
int cardType)
判断当前列表是否存在某个卡片类型,返回-1代表不存在
|
static int |
getCardTypeByFeedType(com.app.dynamic.presenter.bo.FeedBO.FeedType feedType) |
java.util.ArrayList<CardDataBO> |
getData(HomePageDataMgr.DataType dataType,
java.lang.String type)
获取首页数据或直播间数据
|
int |
getDataCountPerRow(java.lang.String type) |
int |
getFeatureListGender() |
java.lang.String |
getFollowHeadLastTime() |
java.util.HashMap<java.lang.String,BaseDataConfig> |
getHomePageData() |
static HomePageDataMgr |
getInstance() |
int |
getLiveIndex(HomePageDataMgr.DataType dataType,
java.lang.String type,
java.lang.String vid)
获取视频在列表中的索引
|
int |
getLiveIndex(HomePageDataMgr.DataType dataType,
java.lang.String type,
com.app.live.activity.VideoDataInfo videoDataInfo)
获取视频在列表中的索引
|
java.util.HashMap<java.lang.String,BaseDataConfig> |
getLiveRoomData() |
boolean |
getNeedRefreshFollowPage() |
int |
getPageIndex(java.lang.String type)
获取当前查询分页
|
PreloadDataHelper |
getPreloadDataHelper(int gender)
如果有性别筛选的页面需调用带性别参数的方法
|
boolean |
getShortVideoIconShow() |
int |
getShortVideoPosition(java.lang.String type,
java.lang.String feedId)
根据短视频的feedId查询其在列表中的位置
|
static java.lang.String |
getTypeOfAnchorPageData(java.lang.String userId,
int hashCode)
个人页和他人页的type 组成由id和hashCode
|
static java.lang.String |
getTypeOfShortVideo(java.lang.String parentType)
拼接短视频的type
|
static java.lang.String |
getTypeRemoveShortVideo(java.lang.String parentType)
去掉短视频的type
|
java.lang.String |
getUidFollowsList()
获取用户follow页头像显示短视频列表数据
|
int |
getUploadShortVideoPosition(java.lang.String type)
获取正在上传的短视频的位置
|
java.lang.String |
getUserShortVideoType(java.lang.String uid)
获取用户短视频列表存储用的key
|
int |
getVideoCount(HomePageDataMgr.DataType dataType,
java.lang.String type)
获取缓存视频总数
此方法返回直播间列表的视频总数
|
com.app.live.activity.VideoDataInfo |
getVideoInfoByPos(HomePageDataMgr.DataType dataType,
java.lang.String type,
int pos)
获取视频信息
|
com.app.live.activity.VideoDataInfo |
getVideoInfoByPos(HomePageDataMgr.DataType dataType,
java.lang.String type,
int pos,
int index)
获取视频信息(针对一个carddatabo里有两个videodatainfo的情况)
|
java.util.List<com.app.live.activity.VideoDataInfo> |
getVideosForType(HomePageDataMgr.DataType dataType,
java.lang.String type) |
boolean |
isHasPreFetchFeature() |
void |
needRemoveTitleOrAddLastItem(java.lang.String type)
如果最后一个item是world标题item则移除,然后添加loading item
|
void |
removeBannerItem(java.lang.String type)
移出banner卡片
|
void |
removeFeedData(java.lang.String type)
删除feed流数据
|
void |
removeFeedTopItem(java.lang.String type)
移除feed流顶部title view
|
void |
removeGlobalCountryData(java.lang.String type)
移出全球直播数据
|
void |
removeLoadingItem(java.lang.String type)
移出loading状态的item
|
void |
removeReplayAndUpdateVideoIndex(java.lang.String type,
java.lang.String vid)
删除列表中指定的回放并更新视频列表的索引
|
void |
removeReplayVideoData(java.lang.String type)
删除回看数据
|
void |
removeShortHomeData(java.lang.String type,
java.lang.String id) |
void |
removeShortLiveData(java.lang.String type,
java.lang.String id) |
java.lang.String |
removeUserShortVideo(int index) |
void |
setFeatureListGender(int gender) |
void |
setFollowHeadLastTime(java.lang.String lastTime) |
void |
setHasPreFetchFeature(boolean mHasPreFetchFeature) |
void |
setNeedRefreshFollowPage(boolean needRefresh) |
void |
setPageIndex(java.lang.String type,
int pageIndex) |
void |
setPkVideoDataIndex(java.lang.String type) |
void |
setShortVideoIconShow(boolean show) |
void |
updateHomeVideoIndex(java.lang.String type,
java.lang.String vid,
int index)
更新视频列表的索引,根据adapter的getview的值去更新
|
public static final int CACHE_USER_SHORT_VIDEO_COUNT
public static final java.lang.String TYPE_ANCHOR_PAGE_DATA
public static final java.lang.String TYPE_SHORT_VIDEO_DATA
public static HomePageDataMgr getInstance()
public java.util.HashMap<java.lang.String,BaseDataConfig> getHomePageData()
public java.util.HashMap<java.lang.String,BaseDataConfig> getLiveRoomData()
public PreloadDataHelper getPreloadDataHelper(int gender)
gender
- 当前筛选性别,1全部 2男 3女public void setNeedRefreshFollowPage(boolean needRefresh)
public boolean getNeedRefreshFollowPage()
public void setFeatureListGender(int gender)
public int getFeatureListGender()
public void setFollowHeadLastTime(java.lang.String lastTime)
public java.lang.String getFollowHeadLastTime()
public int getCacheUserShortVideoListSize()
public void addUserShortVideo(java.lang.String uid)
public java.lang.String removeUserShortVideo(int index)
public boolean containsUserShortVideo(java.lang.String uid)
public void clear(java.lang.String type)
type
- public void clearShortVideo()
public java.lang.String getUserShortVideoType(java.lang.String uid)
uid
- public java.lang.String getUidFollowsList()
public void clearVideoData(java.lang.String type)
public void clearDataExcludeBanner(java.lang.String type)
public com.app.live.activity.VideoDataInfo getVideoInfoByPos(HomePageDataMgr.DataType dataType, java.lang.String type, int pos)
dataType
- type
- pos
- public com.app.live.activity.VideoDataInfo getVideoInfoByPos(HomePageDataMgr.DataType dataType, java.lang.String type, int pos, int index)
dataType
- type
- pos
- index
- public int getVideoCount(HomePageDataMgr.DataType dataType, java.lang.String type)
dataType
- type
- public java.util.List<com.app.live.activity.VideoDataInfo> getVideosForType(HomePageDataMgr.DataType dataType, java.lang.String type)
public void removeShortHomeData(java.lang.String type, java.lang.String id)
public void removeShortLiveData(java.lang.String type, java.lang.String id)
public int addVideo(HomePageDataMgr.DataType dataType, java.lang.String type, com.app.live.activity.VideoDataInfo videoDataInfo)
dataType
- type
- videoDataInfo
- public int addVideoToLiveRoom(java.lang.String type, com.app.live.activity.VideoDataInfo videoDataInfo)
type
- videoDataInfo
- public void removeReplayVideoData(java.lang.String type)
type
- public int getLiveIndex(HomePageDataMgr.DataType dataType, java.lang.String type, com.app.live.activity.VideoDataInfo videoDataInfo)
dataType
- type
- videoDataInfo
- public int getLiveIndex(HomePageDataMgr.DataType dataType, java.lang.String type, java.lang.String vid)
dataType
- type
- vid
- public void removeReplayAndUpdateVideoIndex(java.lang.String type, java.lang.String vid)
type
- vid
- public java.util.ArrayList<CardDataBO> getData(HomePageDataMgr.DataType dataType, java.lang.String type)
dataType
- type
- public int addVideoByDataType(HomePageDataMgr.DataType dataType, java.lang.String type, com.app.live.activity.VideoDataInfo videoDataInfo)
public int getDataCountPerRow(java.lang.String type)
public int getPageIndex(java.lang.String type)
type
- public void setPageIndex(java.lang.String type, int pageIndex)
public void addLastShortVideo(java.lang.String type, com.app.dynamic.presenter.bo.FeedBO feedBO)
type
- feedBO
- public void deleteLastShortVideo(java.lang.String type, java.lang.String feedId)
public void addFirstShortVideo(java.lang.String type, com.app.dynamic.presenter.bo.FeedBO feedBO)
type
- feedBO
- public void deleteFirstShortVideo()
public void addShortActivityHeader(java.lang.String type, java.lang.Object mJsonObject)
public void addFeedData(java.lang.String type, com.app.dynamic.presenter.bo.FeedBO feedBO)
type
- feedBO
- public void addGlobalCountryData(java.lang.String type, GlobalCountry3BO globalCountry3BO)
type
- globalCountry3BO
- public void removeGlobalCountryData(java.lang.String type)
type
- public void addFollowHeadUserBoData(java.lang.String type, FollowActiveInfo followActiveInfo)
public void addLiveRoomShortVideoData(java.lang.String type, com.app.dynamic.presenter.bo.FeedBO feedBO, boolean upload, int dataType)
type
- feedBO
- public void appendFirstFeedItem(java.lang.String type, int source)
public void removeFeedData(java.lang.String type)
type
- public int getCardPosition(java.lang.String type, int cardType)
type
- cardType
- public void addBannerItem(java.lang.String type, BannerData bannerData)
type
- public void removeBannerItem(java.lang.String type)
type
- public void addNearbyLocationItem(java.lang.String type, int position)
type
- position
- public void addDimensionHeaderSelectItem(java.lang.String type, int position)
type
- position
- public void addLoadingItem(java.lang.String type)
type
- public void removeLoadingItem(java.lang.String type)
type
- public void removeFeedTopItem(java.lang.String type)
type
- public boolean addGameOperationCard(java.lang.String type, GameOperationBo gameOperationBo, int position)
type
- gameOperationBo
- position
- public static java.lang.String getTypeOfAnchorPageData(java.lang.String userId, int hashCode)
userId
- hashCode
- public static java.lang.String forShortVideogetFeedPageType(java.lang.String parentType)
public static java.lang.String getTypeOfShortVideo(java.lang.String parentType)
parentType
- public static java.lang.String getTypeRemoveShortVideo(java.lang.String parentType)
parentType
- public static int getCardTypeByFeedType(com.app.dynamic.presenter.bo.FeedBO.FeedType feedType)
public void setShortVideoIconShow(boolean show)
public boolean getShortVideoIconShow()
public int getShortVideoPosition(java.lang.String type, java.lang.String feedId)
type
- feedId
- public int getUploadShortVideoPosition(java.lang.String type)
public boolean isHasPreFetchFeature()
public void setHasPreFetchFeature(boolean mHasPreFetchFeature)
public void updateHomeVideoIndex(java.lang.String type, java.lang.String vid, int index)
type
- vid
- index
- public void addPKVideoData(HomePageDataMgr.DataType dataType, java.lang.String type, com.app.live.activity.VideoDataInfo leftVideoDataInfo, com.app.live.activity.VideoDataInfo rightVideoDataInfo, PKVideoData mPKVideoData)
public void addPKLast(java.lang.String type)
public void setPkVideoDataIndex(java.lang.String type)
public void clearBannerData(java.lang.String type)
public void clearLastItem(java.lang.String type)
public void clearPlaygroundTitle(java.lang.String type)
public void addFollowFeedData(java.lang.String type, CardDataBO cardDataBO)
public void addFollowHeadData(java.lang.String type, CardDataBO cardDataBO)
public void addFollowLiveData(java.lang.String type, CardDataBO cardDataBO)
public void addFollowTopicFlowData(java.lang.String type, CardDataBO cardDataBO)
public void addFollowTopicVideoData(java.lang.String type, CardDataBO cardDataBO)
public void addFollowTitleItemData(java.lang.String type, CardDataBO cardDataBO)
public void addCachedVideo(java.lang.String type, java.util.ArrayList<com.app.live.activity.VideoDataInfo> videoList)
type
- videoList
- public void addSocialPlaygroundData(java.lang.String type, SocialPlaygroundResult result)
type
- STEM_FROM_SOCIAL_MAIN_PAGEpublic void addSocialPKVideoData(HomePageDataMgr.DataType dataType, java.lang.String type, com.app.live.activity.VideoDataInfo leftVideoDataInfo, com.app.live.activity.VideoDataInfo rightVideoDataInfo, PKVideoData mPKVideoData)
public void addSocialTitleItemData(java.lang.String type, SocialTitleItemBean bean)
public void addFeatureOperationCard(java.lang.String type, BannerItemData bannerItemData, int position)
public void addFeatureSecondBannerItem(java.lang.String type, BannerData bannerData, int position)
public void addFollowEmptyLiveItem(java.lang.String type)
public void addWorldLeaderList(java.lang.String type, java.lang.Object object)
type
- public void addWorldTWSHeadList(java.lang.String type, java.util.ArrayList<com.app.live.activity.VideoDataInfo> list)
type
- public void addWorldLastRankCard(java.lang.String type, java.lang.Object object)
type
- object
- public void addWorldSelectCard(java.lang.String type, java.lang.Object object)
type
- object
- public void addWorldBlankCard(java.lang.String type, java.lang.Object object)
type
- object
- public void addWorldCurRankHead(java.lang.String type, CardDataBO cardDataBO)
type
- public void addWorldAroundList(java.lang.String type, CardDataBO cardDataBO)
type
- public void addWorldTitleItemData(java.lang.String type, java.lang.Object object)
public void addWorldTitleItemDataSingle(java.lang.String type, java.lang.Object object)
type
- object
- public void needRemoveTitleOrAddLastItem(java.lang.String type)
type
- public void addObjectDataByCardType(java.lang.String type, java.lang.Object object, int cardType)
public void addFeatureGameBannerItem(java.lang.String type, FeatureGameBean bannerData, int position)
public void addRankItem(java.lang.String type)
type
- public boolean checkForYouData()