|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tvbrowser.core.TvDataInventory
public class TvDataInventory
Remembers the day programs that are known to the user (or the user's plugins).
This way the TV data directory may be changed by other users, other clients or by hand and events of these changes will be sent anyway. This ensures that all plugins can react on data changed by third parties.
Field Summary | |
---|---|
static int |
KNOWN
|
static int |
OTHER_VERSION
|
static int |
UNKNOWN
|
Constructor Summary | |
---|---|
TvDataInventory()
|
Method Summary | |
---|---|
java.lang.String[] |
getKnownDayPrograms()
Gets the keys of all known day programs. |
int |
getKnownStatus(Date date,
Channel channel,
int version)
Gets whether the given day program is already known to the user. |
void |
readData(java.io.File file)
Loads the inventory list. |
void |
setKnown(Date date,
Channel channel,
int version)
Sets the day program to "known to the user". |
void |
setUnknown(Date date,
Channel channel)
Sets the day program to "NOT known to the user". |
void |
setUnknown(java.lang.String key)
Sets the day program to "NOT known to the user". |
void |
writeData(java.io.File file)
Saves the inventory list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNKNOWN
public static final int OTHER_VERSION
public static final int KNOWN
Constructor Detail |
---|
public TvDataInventory()
Method Detail |
---|
public int getKnownStatus(Date date, Channel channel, int version)
Returns
UNKNOWN
if the day program is totally unknown.OTHER_VERSION
if the day program is known but in another
version.KNOWN
if the day program is known in the given version.
date
- The day program's datechannel
- The day program's channelversion
- The day program's version (e.g. file size)
public void setKnown(Date date, Channel channel, int version)
date
- The day program's datechannel
- The day program's channelversion
- The day program's version (e.g. file size)public void setUnknown(Date date, Channel channel)
date
- The day program's datechannel
- The day program's channelpublic void setUnknown(java.lang.String key)
public java.lang.String[] getKnownDayPrograms()
The keys of the day programs are equal to their file name.
TvDataBase.getDayProgramKey(Date, Channel)
public void readData(java.io.File file) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
writeData(File)
public void writeData(java.io.File file) throws java.io.IOException
It is essential that this list is saved at the shut down of TV-Browser! If TV-Browser failes to save the plugin data then the inventory list should NOT be saved too. Doing so the plugins will update themselves automatically on the next startup, because new TV data will be treated as unknown.
java.io.IOException
readData(File)
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |