org.starhope.appius.game
Class Room

java.lang.Object
  extended by org.starhope.appius.util.ManagedReferenceHolder
      extended by org.starhope.appius.sql.SQLPeerDatum
          extended by org.starhope.appius.game.Room

public class Room
extends SQLPeerDatum

WRITEME: The documentation for this type (Room) is incomplete. (brpocock, Aug 18, 2009)

Author:
brpocock

Field Summary
private  String fairgroundsImage
           
private  String fairgroundsLabel
           
private  String fairgroundsWarp
           
private  String filename
          The base name of the room's SWF file.
private  String moniker
          The SmartFox moniker / unique identifier for this room.
private  int movieTime
          in seconds
private  String movieURL
           
private  String music
          The background music for the room
private  String nowPlaying
           
private  String overlay
          The SWF file to be displayed as a weather overlay.
private  String sky
          The SWF file to be displayed as a sky background.
private  boolean skyVisible
          Whether the sky is visible in this room.
private  String title
           
 
Constructor Summary
  Room()
          nil constructor
private Room(ResultSet rs)
           
  Room(String moniker)
           
 
Method Summary
 void flush()
          This is an overriding method.
static Room[] getAllRooms()
           
static Room getByMoniker(String moniker)
           
protected  String getCacheUniqueID()
          This is an overriding method.
private  void getFairground()
          WRITEME: document this method (brpocock, Aug 31, 2009)
 String getFilename()
           
 String getMoniker()
           
private  void getMovie()
          WRITEME: document this method (brpocock, Aug 31, 2009)
 String getMusic()
           
 String getOverlay()
           
 String getSky()
           
 String getTitle()
           
 boolean isSkyVisible()
           
protected  void set(ResultSet rs)
          This is an overriding method.
 void setFilename(String filename)
           
 void setMoniker(String moniker)
           
 void setMusic(String music)
           
 void setOverlay(String overlay)
           
 void setRoomVars(Room r, User u)
           Sets the Smart Fox Server room variables used by the client.
 void setSky(String sky)
           
 void setSkyVisible(boolean skyVisible)
           
 void setTitle(String newTitle)
           
 org.json.JSONObject toJSON()
          This is an overriding method.
 
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum
changed, findInCache, get, prepare, prepare, saveInCache, set
 
Methods inherited from class org.starhope.appius.util.ManagedReferenceHolder
deref, setRef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fairgroundsImage

private String fairgroundsImage

fairgroundsLabel

private String fairgroundsLabel

fairgroundsWarp

private String fairgroundsWarp

filename

private String filename
The base name of the room's SWF file. This is going to be in a given resource folder for rooms.


moniker

private String moniker
The SmartFox moniker / unique identifier for this room.


movieTime

private int movieTime
in seconds


movieURL

private String movieURL

music

private String music
The background music for the room


nowPlaying

private String nowPlaying

overlay

private String overlay
The SWF file to be displayed as a weather overlay.


sky

private String sky
The SWF file to be displayed as a sky background.


skyVisible

private boolean skyVisible
Whether the sky is visible in this room.


title

private String title
Constructor Detail

Room

public Room()
nil constructor


Room

private Room(ResultSet rs)
      throws SQLException
Parameters:
rs -
Throws:
SQLException

Room

public Room(String moniker)
     throws NotFoundException
Parameters:
moniker - The moniker of the room to be instantiated
Throws:
NotFoundException - if there is no room in the database with the given moniker
Method Detail

getAllRooms

public static Room[] getAllRooms()
Returns:
an array of all rooms in the game

getByMoniker

public static Room getByMoniker(String moniker)
Parameters:
moniker - the moniker value for this room
Returns:
the room object

flush

public void flush()
This is an overriding method.

Specified by:
flush in class SQLPeerDatum
See Also:
SQLPeerDatum.flush()

getCacheUniqueID

protected String getCacheUniqueID()
This is an overriding method.

Specified by:
getCacheUniqueID in class SQLPeerDatum
Returns:
The local (Stringified) version of an unique ID; usually the database ID column
See Also:
SQLPeerDatum.getCacheUniqueID()

getFairground

private void getFairground()
                    throws SQLException
WRITEME: document this method (brpocock, Aug 31, 2009)

Throws:
SQLException

getFilename

public String getFilename()
Returns:
the filename

getMoniker

public String getMoniker()
Returns:
the moniker

getMovie

private void getMovie()
               throws SQLException
WRITEME: document this method (brpocock, Aug 31, 2009)

Throws:
SQLException

getMusic

public String getMusic()

getOverlay

public String getOverlay()
Returns:
the overlay

getSky

public String getSky()
Returns:
the sky

getTitle

public String getTitle()

isSkyVisible

public boolean isSkyVisible()
Returns:
the skyVisible

set

protected void set(ResultSet rs)
            throws SQLException
This is an overriding method.

Specified by:
set in class SQLPeerDatum
Throws:
SQLException - if the database fails somehow
See Also:
SQLPeerDatum.set(java.sql.ResultSet)

setFilename

public void setFilename(String filename)
Parameters:
filename - the filename to set

setMoniker

public void setMoniker(String moniker)
Parameters:
moniker - the moniker to set

setMusic

public void setMusic(String music)
Parameters:
music - the new background music

setOverlay

public void setOverlay(String overlay)
Parameters:
overlay - the overlay to set

setRoomVars

public void setRoomVars(Room r,
                        User u)
                 throws SQLException

Sets the Smart Fox Server room variables used by the client.

... All URL:s are relative to their respective root paths, as managed by the client

Parameters:
r - The Smart Fox Server room object
u - The Smart Fox Server system user account, which will take ownership of the room variables.
Throws:
SQLException

setSky

public void setSky(String sky)
Parameters:
sky - the sky to set

setSkyVisible

public void setSkyVisible(boolean skyVisible)
Parameters:
skyVisible - the skyVisible to set

setTitle

public void setTitle(String newTitle)

toJSON

public org.json.JSONObject toJSON()
This is an overriding method.

Overrides:
toJSON in class SQLPeerDatum
Returns:
See Also:
SQLPeerDatum.toJSON()