|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectceleboss.data.CelebrityManager
This class represents the model of all the Celebrity data. THis class provides a factory class that controls the creation and lookup for Celebrity and Portfolio entities. It is also response for loading and saving the state of the model at start-up and shutdown.
| Field Summary | |
static java.lang.String |
CELEB_DELISTED
Property name for a celeb has been de-listed |
static java.lang.String |
CELEB_LISTED
Propery name for a new Celebrity listing |
static java.lang.String |
NEWCELEB
Property name for a new celeb being added. |
static java.lang.String |
NEWLEAGUE
Property name for a new mini league |
static java.lang.String |
NEWPORTFOLIO
Property name for a new portfolio being added |
static java.lang.String |
OLDLEAGUE
Property name for a mini league removed |
static java.lang.String |
OLDPORTFOLIO
Property name for a old portfolio being added |
| Method Summary | |
void |
activate(CelebDataSourceFactory newFactory)
A the Celebrity Manager to current environment. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener. |
static CelebrityManager |
createManager()
Creates a new manager with the default name. |
static CelebrityManager |
createManager(java.lang.String newName)
Creates a new manager with the specified name. |
Portfolio |
createPortfolio(java.lang.String user,
java.lang.String pass)
Create a new portfolio entry for the specified user account. |
void |
deletePortfolio(Portfolio portfolio)
Delete a portfolio from the manager. |
int |
getActiveCelebrityRefresh()
The refrresh period in minutes for celebrities that are active. |
PropertyChangeMediator |
getCelebMediator()
Get the PropertyChangeMediator for any Celebrity events. |
java.util.Collection |
getCelebrities()
Returns a collection of the Celebrities already loaded. |
Celebrity |
getCelebrity(int issue)
Factory method to either create or find an existing Celebrity instance based on the issue number. |
int |
getCelebrityRefresh()
How many minutes between refreshed. |
CelebDataSource |
getDefaultDataSource()
Get the default data source used by this manager. |
java.util.Date |
getDividendDay()
Return the date at which teh dividends are calculated. |
CommandEngine |
getEngine()
Returnt he Comamnd eigne instance used by this manager. |
java.util.Date |
getKneecappingDay()
Return the date at which the kneecappings are done. |
java.util.Collection |
getLeagues()
Return a collection of the discovered Mini League objects. |
java.util.List |
getNewCelebrities()
Returns a list of newly listed celebrities |
java.util.List |
getOldCelebrities()
Returns a list of newly listed celebrities |
int |
getPortfolioRefresh()
How many minutes between refreshed. |
java.util.Collection |
getPortfolios()
Return a collection of the managed portfolios. |
void |
refreshCelebrityList()
This method scans the known entities into the updater |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a previous listeners. |
void |
setActiveCelebrityRefresh(int refresh)
Update how oftern active celebrities should be refreshed |
void |
setCelebrityRefresh(int i)
Define how long in seconds between celebrities are refreshed. |
void |
setDefaultUser(java.lang.String username,
java.lang.String password)
This sets the default username and password for an account to use when updating the background Celebtiry information. |
void |
setPortfolioRefresh(int i)
Define how long in seconds between portfolios are refreshed. |
void |
shutdown()
Shutdown the manager. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String CELEB_DELISTED
public static final java.lang.String CELEB_LISTED
public static final java.lang.String NEWCELEB
public static final java.lang.String NEWLEAGUE
public static final java.lang.String NEWPORTFOLIO
public static final java.lang.String OLDLEAGUE
public static final java.lang.String OLDPORTFOLIO
| Method Detail |
public static CelebrityManager createManager()
createManager(String)public static CelebrityManager createManager(java.lang.String newName)
newName - Name of the manager.
activate(CelebDataSourceFactory)public void activate(CelebDataSourceFactory newFactory)
newFactory - Factory to use to create any data sources.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - Listener.
public Portfolio createPortfolio(java.lang.String user,
java.lang.String pass)
user - Account id.pass - Password for account
public void deletePortfolio(Portfolio portfolio)
portfolio - One to deletepublic int getActiveCelebrityRefresh()
public PropertyChangeMediator getCelebMediator()
public java.util.Collection getCelebrities()
public Celebrity getCelebrity(int issue)
issue - Issue number.
public int getCelebrityRefresh()
public CelebDataSource getDefaultDataSource()
public java.util.Date getDividendDay()
public CommandEngine getEngine()
public java.util.Date getKneecappingDay()
public java.util.Collection getLeagues()
public java.util.List getNewCelebrities()
public java.util.List getOldCelebrities()
public int getPortfolioRefresh()
public java.util.Collection getPortfolios()
public void refreshCelebrityList()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - Listenerpublic void setActiveCelebrityRefresh(int refresh)
refresh - The activeCelebrityRefresh to set.public void setCelebrityRefresh(int i)
i - Number of minutes between updates.
public void setDefaultUser(java.lang.String username,
java.lang.String password)
username - Celebdaq account.password - Correct password.public void setPortfolioRefresh(int i)
i - Number of minutes between updates.
public void shutdown()
throws java.io.IOException
java.io.IOException - Problem with store
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||