|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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 Corepublic void addMobile(Mobile mobile)
Core
addMobile in interface Coremobile - the mobile
public MapTile getTile(int x,
int y)
getTile in interface Corex - X coordinatey - Y coordinate
public Mobile findMobileByID(int serialID)
CoreMobile by its serial ID.
findMobileByID in interface CoreserialID - Mobile's serial ID
Mobile with the specified serial ID,
or null if there is no such Mobilepublic Item findItemByID(int serialID)
CoreItem by its serial ID.
findItemByID in interface CoreserialID - Item's serial ID
Item with the specified serial ID,
or null if there is no such Itempublic Account findAccountByUsername(String username)
Account by username and password; the password is
needed to check the credentials.
findAccountByUsername in interface Coreusername - username
Account matching the provided username, or null
if no such account could be foundpublic void addAccount(Account account)
Core
addAccount in interface Coreaccount - the account
public boolean authenticate(Account account,
String password)
authenticate in interface Coreaccount - 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 | |||||||||