com.aelitis.azureus.core.subs.impl
Class SubscriptionHistoryImpl

java.lang.Object
  extended by com.aelitis.azureus.core.subs.impl.SubscriptionHistoryImpl
All Implemented Interfaces:
SubscriptionHistory

public class SubscriptionHistoryImpl
extends Object
implements SubscriptionHistory


Nested Class Summary
static class SubscriptionHistoryImpl.ActivityCallback
           
 
Field Summary
 
Fields inherited from interface com.aelitis.azureus.core.subs.SubscriptionHistory
DEFAULT_CHECK_INTERVAL_MINS
 
Constructor Summary
protected SubscriptionHistoryImpl(SubscriptionManagerImpl _manager, SubscriptionImpl _subs)
           
 
Method Summary
protected  void checkMaxResults(int max_results)
           
 void deleteAllResults()
           
 void deleteResults(String[] result_ids)
           
protected  void downloadNow()
           
 int getCheckFrequencyMins()
           
 int getConsecFails()
           
 String[] getDownloadNetworks()
           
 boolean getDownloadWithReferer()
           
 String getLastError()
           
 long getLastNewResultTime()
           
 long getLastScanTime()
           
 int getMaxNonDeletedResults()
           
 long getNextScanTime()
           
 boolean getNotificationPostEnabled()
           
 int getNumRead()
           
 int getNumUnread()
           
 SubscriptionResult getResult(String result_id)
           
 SubscriptionResult[] getResults(boolean include_deleted)
           
protected  String getString()
           
 boolean isAuthFail()
           
 boolean isAutoDownload()
           
protected  boolean isAutoDownloadSupported()
           
 boolean isEnabled()
           
protected  void loadConfig()
           
protected  void log(String str)
           
protected  void log(String str, Throwable e)
           
 void markAllResultsRead()
           
 void markAllResultsUnread()
           
 void markResults(String[] result_ids, boolean[] reads)
           
protected  SubscriptionResultImpl[] reconcileResults(Engine engine, SubscriptionResultImpl[] latest_results)
           
 void reset()
           
protected  void saveConfig(int reason)
           
 void setAutoDownload(boolean _auto_dl)
           
 void setCheckFrequencyMins(int mins)
           
 void setDetails(boolean _enabled, boolean _auto_dl)
           
 void setDownloadNetworks(String[] nets)
           
 void setDownloadWithReferer(boolean b)
           
 void setEnabled(boolean _enabled)
           
protected  void setFatalError(String _error)
           
protected  void setLastError(String _last_error, boolean _auth_failed)
           
 void setMaxNonDeletedResults(int _max_results)
           
 void setNotificationPostEnabled(boolean enabled)
           
protected  void updateReadUnread(SubscriptionResultImpl[] results)
           
protected  void updateResult(SubscriptionResultImpl result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionHistoryImpl

protected SubscriptionHistoryImpl(SubscriptionManagerImpl _manager,
                                  SubscriptionImpl _subs)
Method Detail

reconcileResults

protected SubscriptionResultImpl[] reconcileResults(Engine engine,
                                                    SubscriptionResultImpl[] latest_results)

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface SubscriptionHistory

setEnabled

public void setEnabled(boolean _enabled)
Specified by:
setEnabled in interface SubscriptionHistory

isAutoDownload

public boolean isAutoDownload()
Specified by:
isAutoDownload in interface SubscriptionHistory

setAutoDownload

public void setAutoDownload(boolean _auto_dl)
Specified by:
setAutoDownload in interface SubscriptionHistory

getMaxNonDeletedResults

public int getMaxNonDeletedResults()
Specified by:
getMaxNonDeletedResults in interface SubscriptionHistory

setMaxNonDeletedResults

public void setMaxNonDeletedResults(int _max_results)
Specified by:
setMaxNonDeletedResults in interface SubscriptionHistory

getDownloadNetworks

public String[] getDownloadNetworks()
Specified by:
getDownloadNetworks in interface SubscriptionHistory

setDownloadNetworks

public void setDownloadNetworks(String[] nets)
Specified by:
setDownloadNetworks in interface SubscriptionHistory

getNotificationPostEnabled

public boolean getNotificationPostEnabled()
Specified by:
getNotificationPostEnabled in interface SubscriptionHistory

setNotificationPostEnabled

public void setNotificationPostEnabled(boolean enabled)
Specified by:
setNotificationPostEnabled in interface SubscriptionHistory

setDetails

public void setDetails(boolean _enabled,
                       boolean _auto_dl)
Specified by:
setDetails in interface SubscriptionHistory

downloadNow

protected void downloadNow()

getLastScanTime

public long getLastScanTime()
Specified by:
getLastScanTime in interface SubscriptionHistory

getLastNewResultTime

public long getLastNewResultTime()
Specified by:
getLastNewResultTime in interface SubscriptionHistory

getNextScanTime

public long getNextScanTime()
Specified by:
getNextScanTime in interface SubscriptionHistory

getCheckFrequencyMins

public int getCheckFrequencyMins()
Specified by:
getCheckFrequencyMins in interface SubscriptionHistory

setCheckFrequencyMins

public void setCheckFrequencyMins(int mins)
Specified by:
setCheckFrequencyMins in interface SubscriptionHistory

getNumUnread

public int getNumUnread()
Specified by:
getNumUnread in interface SubscriptionHistory

getNumRead

public int getNumRead()
Specified by:
getNumRead in interface SubscriptionHistory

getResults

public SubscriptionResult[] getResults(boolean include_deleted)
Specified by:
getResults in interface SubscriptionHistory

getResult

public SubscriptionResult getResult(String result_id)
Specified by:
getResult in interface SubscriptionHistory

updateResult

protected void updateResult(SubscriptionResultImpl result)

deleteResults

public void deleteResults(String[] result_ids)
Specified by:
deleteResults in interface SubscriptionHistory

deleteAllResults

public void deleteAllResults()
Specified by:
deleteAllResults in interface SubscriptionHistory

markAllResultsRead

public void markAllResultsRead()
Specified by:
markAllResultsRead in interface SubscriptionHistory

markAllResultsUnread

public void markAllResultsUnread()
Specified by:
markAllResultsUnread in interface SubscriptionHistory

markResults

public void markResults(String[] result_ids,
                        boolean[] reads)
Specified by:
markResults in interface SubscriptionHistory

reset

public void reset()
Specified by:
reset in interface SubscriptionHistory

checkMaxResults

protected void checkMaxResults(int max_results)

updateReadUnread

protected void updateReadUnread(SubscriptionResultImpl[] results)

isAutoDownloadSupported

protected boolean isAutoDownloadSupported()

setFatalError

protected void setFatalError(String _error)

setLastError

protected void setLastError(String _last_error,
                            boolean _auth_failed)

getLastError

public String getLastError()
Specified by:
getLastError in interface SubscriptionHistory

isAuthFail

public boolean isAuthFail()
Specified by:
isAuthFail in interface SubscriptionHistory

getConsecFails

public int getConsecFails()
Specified by:
getConsecFails in interface SubscriptionHistory

getDownloadWithReferer

public boolean getDownloadWithReferer()
Specified by:
getDownloadWithReferer in interface SubscriptionHistory

setDownloadWithReferer

public void setDownloadWithReferer(boolean b)
Specified by:
setDownloadWithReferer in interface SubscriptionHistory

loadConfig

protected void loadConfig()

saveConfig

protected void saveConfig(int reason)

log

protected void log(String str)

log

protected void log(String str,
                   Throwable e)

getString

protected String getString()