- java.lang.Object
-
- tvbrowser.core.TvDataBase
-
public class TvDataBase extends java.lang.Object
- Author:
- Til Schneider, www.murfman.de
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_DATA_LIFESPAN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTvDataListener(TvDataBaseListener listener)
void
checkTvDataInventory(int lifespan)
void
close(boolean log)
boolean
dataAvailable(Date date)
Returns true, if TV data is available on disk for the given date.void
deleteExpiredFiles(int lifespan, boolean informPlugins)
Deletes expired tvdata files older then lifespan days.ChannelDayProgram
getDayProgram(Date date, Channel channel)
protected static java.lang.String
getDayProgramKey(Date date, Channel channel)
static TvDataBase
getInstance()
Date
getMaxSupportedDate()
the maximum date any part of TV-Browser needs to be able to handlevoid
handleTvBrowserStartFinished()
Handles the pending plugin information if it is to do after TV-Browser start is finished.boolean
isDayProgramAvailable(Date date, Channel channel)
void
reCalculateTvData(Channel channel, Date date)
void
removeTvDataListener(TvDataBaseListener listener)
(package private) void
sendNewProgramsToTvDataListener()
void
setDayProgram(MutableChannelDayProgram prog)
void
setDayProgramWasChangedByPlugin(Date date, Channel channel)
void
unsubscribeChannels(Channel[] channels)
protected void
updateTvDataBase()
Updates the TV data base.
-
-
-
Field Detail
-
DEFAULT_DATA_LIFESPAN
public static final int DEFAULT_DATA_LIFESPAN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static TvDataBase getInstance()
-
updateTvDataBase
protected void updateTvDataBase()
Updates the TV data base.- Since:
- 2.2.2/2.5.1
-
checkTvDataInventory
public void checkTvDataInventory(int lifespan)
-
handleTvBrowserStartFinished
public void handleTvBrowserStartFinished()
Handles the pending plugin information if it is to do after TV-Browser start is finished.- Since:
- 2.7.2
-
close
public void close(boolean log)
-
addTvDataListener
public void addTvDataListener(TvDataBaseListener listener)
-
removeTvDataListener
public void removeTvDataListener(TvDataBaseListener listener)
-
getDayProgram
public ChannelDayProgram getDayProgram(Date date, Channel channel)
-
setDayProgramWasChangedByPlugin
public void setDayProgramWasChangedByPlugin(Date date, Channel channel)
-
setDayProgram
public void setDayProgram(MutableChannelDayProgram prog)
-
deleteExpiredFiles
public void deleteExpiredFiles(int lifespan, boolean informPlugins)
Deletes expired tvdata files older then lifespan days.- Parameters:
lifespan
- The number of days to delete from the pastinformPlugins
- If the plugins should be informed about the deleting.
-
dataAvailable
public boolean dataAvailable(Date date)
Returns true, if TV data is available on disk for the given date.- Parameters:
date
- The date to check.- Returns:
- if the data is available.
-
unsubscribeChannels
public void unsubscribeChannels(Channel[] channels)
-
getMaxSupportedDate
public Date getMaxSupportedDate()
the maximum date any part of TV-Browser needs to be able to handle- Returns:
- today plus 4 weeks
-
sendNewProgramsToTvDataListener
void sendNewProgramsToTvDataListener()
-
-