net.sf.juoserver.model
Interface Core

All Known Implementing Classes:
CoreImpl

public interface Core

The core main API.


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.
 MapTile getTile(int x, int y)
          Retrieves the map tile definition of the given coordinates.
 void init()
          Initializes the core.
 

Method Detail

init

void init()
Initializes the core.

Throws:
LoadException - in case something went wrong

getTile

MapTile getTile(int x,
                int y)
Retrieves the map tile definition of the given coordinates.

Parameters:
x - X coordinate
y - Y coordinate
Returns:
the map tile definition of the given coordinates

findMobileByID

Mobile findMobileByID(int serialID)
Retrieves a Mobile by its serial ID.

Parameters:
serialID - Mobile's serial ID
Returns:
the Mobile with the specified serial ID, or null if there is no such Mobile

findItemByID

Item findItemByID(int serialID)
Retrieves an Item by its serial ID.

Parameters:
serialID - Item's serial ID
Returns:
the Item with the specified serial ID, or null if there is no such Item

findAccountByUsername

Account findAccountByUsername(String username)
Retrieves an Account by username and password; the password is needed to check the credentials.

Parameters:
username - username
Returns:
the Account matching the provided username, or null if no such account could be found

authenticate

boolean authenticate(Account account,
                     String password)
Attempts to authenticate the given account with the specified password.

Parameters:
account - account
password - password
Returns:
true if and only if the account could be authenticated with the provided password

addMobile

void addMobile(Mobile mobile)
Adds a mobile.

Parameters:
mobile - the mobile

addAccount

void addAccount(Account account)
Adds an account.

Parameters:
account - the account


Copyright © 2010-2012. All Rights Reserved.