|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.juoserver.model.CoreImpl
public class CoreImpl
The Core facade.
Holds information about everything: tiles, mobiles, etc.
Field Summary | |
---|---|
static int |
ITEMS_MAX_SERIAL_ID
|
Constructor Summary | |
---|---|
CoreImpl()
|
Method Summary | |
---|---|
void |
addAccount(Account account)
Adds an account. |
void |
addMobile(Mobile mobile)
Adds a mobile. |
boolean |
authenticate(Account account,
String password)
Attempts to authenticate the given account with the specified password. |
Account |
findAccountByUsername(String username)
Retrieves an Account by username and password; the password is
needed to check the credentials. |
Item |
findItemByID(int serialID)
Retrieves an Item by its serial ID. |
Mobile |
findMobileByID(int serialID)
Retrieves a Mobile by its serial ID. |
Configuration |
getConfiguration()
|
FileReadersFactory |
getFileReadersFactory()
|
MapTile |
getTile(int x,
int y)
Retrieves the map tile definition of the given coordinates. |
void |
init()
Initializes the core. |
void |
setConfiguration(Configuration configuration)
|
void |
setFileReadersFactory(FileReadersFactory fileReadersFactory)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ITEMS_MAX_SERIAL_ID
Constructor Detail |
---|
public CoreImpl()
Method Detail |
---|
public void init()
Core
init
in interface Core
public void addMobile(Mobile mobile)
Core
addMobile
in interface Core
mobile
- the mobilepublic MapTile getTile(int x, int y)
getTile
in interface Core
x
- X coordinatey
- Y coordinate
public Mobile findMobileByID(int serialID)
Core
Mobile
by its serial ID.
findMobileByID
in interface Core
serialID
- Mobile
's serial ID
Mobile
with the specified serial ID,
or null if there is no such Mobile
public Item findItemByID(int serialID)
Core
Item
by its serial ID.
findItemByID
in interface Core
serialID
- Item
's serial ID
Item
with the specified serial ID,
or null if there is no such Item
public Account findAccountByUsername(String username)
Account
by username and password; the password is
needed to check the credentials.
findAccountByUsername
in interface Core
username
- username
Account
matching the provided username, or null
if no such account could be foundpublic void addAccount(Account account)
Core
addAccount
in interface Core
account
- the accountpublic boolean authenticate(Account account, String password)
authenticate
in interface Core
account
- accountpassword
- password
public Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
public FileReadersFactory getFileReadersFactory()
public void setFileReadersFactory(FileReadersFactory fileReadersFactory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |