buttress.main
Class Main

java.lang.Object
  extended bybuttress.main.Main
All Implemented Interfaces:
java.lang.Runnable

public class Main
extends java.lang.Object
implements java.lang.Runnable


Field Summary
static java.lang.String agent
          the referring agent to the torrent site
static java.lang.String DEFAULT_BT_PATH
           
static java.lang.String DEFAULT_BUT_FOLDER
           
static int MIN_DELAY
          variable for time check
 
Constructor Summary
Main()
          Constructor
Main(java.lang.String bt)
          Constructor
Main(java.lang.String bt, java.lang.String but)
          Constructor
 
Method Summary
 void addFeed(Rss newRss)
          adding a new feed with a rss object
 void addFeed(java.lang.String s)
          adds a new rss feed to the feedlist
 void addFilter(Filter newFilter)
          adds a new filter from a filter object
 void addFilter(java.lang.String s)
          adds a new filter to the filter list
 void doCheck()
          Checks all the rssfeeds in buttress
 void editFeed(int editPlace, Rss newRss)
           
 void editFilter(int editPlace, Filter newFilter)
           
static java.lang.String getBtPath()
          returns btPath string
static java.lang.String getButFolder()
          returns butFolder string
 Rss getFeed(int feedNum)
           
 Filter getFilter(int filterNum)
           
 java.util.List getFilters()
           
 java.util.ArrayList getFoundItemList()
           
 java.util.List getRssList()
           
static int getTimeDelay()
          Returns the time between checking the feeds
static boolean isAutoStart()
           
 Rss removeFeed(int pos)
          removes the rss feed at specfic place
 boolean removeFeed(Rss feed)
          removes the specfied feed
 boolean removeFilter(Filter deadFilter)
          adds a new filter from a filter object
 Filter removeFilter(int pos)
          removes the rss feed at specfic place
 void resumeMe()
          makes the thread stop sleeping to make it update
 void run()
          Main processing method to run doCheck() ever x mins
static void setAutoStart(boolean autoStart)
           
static java.lang.String setBtPath(java.lang.String bt)
          sets a new bittorrent path
static java.lang.String setButFolder(java.lang.String but)
          sets a new buttress folder path
static int setTimeDelay(int t)
          Changes the time between checking the feeds
 void startThread()
          Starts the timer running
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_DELAY

public static final int MIN_DELAY
variable for time check

See Also:
Constant Field Values

DEFAULT_BT_PATH

public static final java.lang.String DEFAULT_BT_PATH
See Also:
Constant Field Values

DEFAULT_BUT_FOLDER

public static final java.lang.String DEFAULT_BUT_FOLDER
See Also:
Constant Field Values

agent

public static final java.lang.String agent
the referring agent to the torrent site

See Also:
Constant Field Values
Constructor Detail

Main

public Main()
Constructor


Main

public Main(java.lang.String bt)
Constructor

Parameters:
bt - bittorrent path

Main

public Main(java.lang.String bt,
            java.lang.String but)
Constructor

Parameters:
bt - bittorrent path
but - buttress folder
Method Detail

getFilters

public java.util.List getFilters()
Returns:
Returns the filters.

getRssList

public java.util.List getRssList()
Returns:
Returns the rssList.

getBtPath

public static java.lang.String getBtPath()
returns btPath string

Returns:
btPath bittorrent path string

getButFolder

public static java.lang.String getButFolder()
returns butFolder string

Returns:
butFolder buttress folder path string

setBtPath

public static java.lang.String setBtPath(java.lang.String bt)
sets a new bittorrent path

Parameters:
bt - bittorrent client path
Returns:
btPath

setButFolder

public static java.lang.String setButFolder(java.lang.String but)
sets a new buttress folder path

Parameters:
but - buttress folder path
Returns:
butFolder

addFeed

public void addFeed(java.lang.String s)
adds a new rss feed to the feedlist

Parameters:
s - string of the new rss feed

addFeed

public void addFeed(Rss newRss)
adding a new feed with a rss object

Parameters:
newRss - new rss feed

editFeed

public void editFeed(int editPlace,
                     Rss newRss)

editFilter

public void editFilter(int editPlace,
                       Filter newFilter)

getFeed

public Rss getFeed(int feedNum)

getFilter

public Filter getFilter(int filterNum)

removeFeed

public Rss removeFeed(int pos)
removes the rss feed at specfic place

Parameters:
pos - int pos of item to be removed
Returns:
rss

removeFeed

public boolean removeFeed(Rss feed)
removes the specfied feed

Parameters:
feed - the item to be removed
Returns:
boolean

addFilter

public void addFilter(java.lang.String s)
adds a new filter to the filter list

Parameters:
s - string to add as a filter

addFilter

public void addFilter(Filter newFilter)
adds a new filter from a filter object

Parameters:
newFilter - Filter

removeFilter

public Filter removeFilter(int pos)
removes the rss feed at specfic place

Parameters:
pos - int pos of item to be removed
Returns:
Filter

removeFilter

public boolean removeFilter(Filter deadFilter)
adds a new filter from a filter object

Parameters:
deadFilter - Filter
Returns:
Filter

getTimeDelay

public static int getTimeDelay()
Returns the time between checking the feeds

Returns:
timeDelay time between feed checks in minutes

setTimeDelay

public static int setTimeDelay(int t)
Changes the time between checking the feeds

Parameters:
t - int time value in minutes
Returns:
timeDelay

getFoundItemList

public java.util.ArrayList getFoundItemList()
Returns:
Returns the foundItemList.

doCheck

public void doCheck()
Checks all the rssfeeds in buttress


resumeMe

public void resumeMe()
makes the thread stop sleeping to make it update


startThread

public void startThread()
Starts the timer running


run

public void run()
Main processing method to run doCheck() ever x mins

Specified by:
run in interface java.lang.Runnable

isAutoStart

public static boolean isAutoStart()
Returns:
Returns whether or not buttress will automatically start the torrent client

setAutoStart

public static void setAutoStart(boolean autoStart)
Parameters:
autoStart - Whether or not buttress should automatically start the torrent client