|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.sql.SQLPeerDatum
org.starhope.appius.game.Room
public class Room
WRITEME: The documentation for this type (Room) is incomplete. (brpocock, Aug 18, 2009)
| Field Summary | |
|---|---|
private static String |
fairgroundsImage
WRITEME |
private static String |
fairgroundsLabel
WRITEME |
private static String |
fairgroundsWarp
WRITEME |
private String |
filename
The base name of the room's SWF file. |
private GameEvent |
gameEvent
The Game Event in this room, or (usually) null |
private AbstractUser |
homeOwner
The owner of a room; usually null for public rooms, or non-null for users' houses. |
private boolean |
iAmInLimbo
Determine whether this room is a limbo room |
private String |
moniker
The moniker / unique identifier for this room. |
private int |
movieTime
in seconds |
private String |
movieURL
TODO: document this field (brpocock, Nov 13, 2009) movieURL (Room) |
private String |
music
The background music for the room |
private int |
myID
TODO: document this field (brpocock, Nov 13, 2009) myID (Room) |
private String |
nowPlaying
TODO: document this field (brpocock, Nov 13, 2009) nowPlaying (Room) |
private ConcurrentSkipListSet<RoomListener> |
observers
Non-Users who are present to pay attention to things happening in the room |
private String |
overlay
The SWF file to be displayed as a weather overlay. |
private int |
roomIndex
WRITEME: document this field (brpocock, Jan 14, 2010) roomIndex (Room) |
private ConcurrentHashMap<String,String> |
roomVariables
WRITEME |
private static int |
safeRoomNum
TODO: document this field (brpocock, Nov 13, 2009) safeRoomNum (Room) |
private static long |
serialVersionUID
TODO: document this field (brpocock, Oct 5, 2009) serialVersionUID (long) |
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
WRITEME |
private ConcurrentSkipListSet<Integer> |
userList
The list of user ID's of all users in this room. |
private AbstractZone |
zone
The zone in which this room exists |
| Constructor Summary | |
|---|---|
|
Room(AbstractZone homeZone)
|
private |
Room(ResultSet rs,
AbstractZone newZone)
Instantiate a room based upon the theoretical room dataset from the database and the Zone into which it should be instantiated. |
|
Room(String newRoomMoniker,
AbstractZone newRoomZone)
|
| Method Summary | |
|---|---|
void |
add(GameEvent game)
This is an overriding method. |
int |
compareTo(AbstractRoom other)
|
boolean |
contains(AbstractUser thing)
This is an overriding method. |
static Room |
create(String roomName,
AbstractZone zone)
TODO: document this method (brpocock, Oct 19, 2009) |
static Room |
create(String roomName,
AbstractZone abstractZone,
boolean mustExist)
|
void |
deleteVariable(String string)
This is an overriding method. |
void |
destroySelf()
This is an overriding method. |
boolean |
equals(AbstractRoom other)
This is an overriding method. |
boolean |
equals(Object other)
This is an overriding method. |
void |
flush()
This is an overriding method. |
void |
fromJSON(org.json.JSONObject jso)
This is an overriding method. |
Set<RoomListener> |
getAllListeners()
This is an overriding method. |
static AbstractRoom[] |
getAllRooms()
|
Collection<AbstractUser> |
getAllUsers()
This is an overriding method. |
private HashMap<String,String> |
getArbitraryVars()
Load arbitrary room variable values from the database |
static Room |
getByMoniker(String moniker,
Zone zone)
|
protected String |
getCacheUniqueID()
This is an overriding method. |
String |
getDebugName()
This is an overriding method. |
private Set<AbstractUser> |
getEverythingInRoom()
TODO: document this method (brpocock, Nov 24, 2009) |
private void |
getFairground()
WRITEME: document this method (brpocock, Aug 31, 2009) |
String |
getFilename()
This is an overriding method. |
GameEvent |
getGameEvent()
This is an overriding method. |
int |
getId()
Deprecated. |
int |
getID()
This is an overriding method. |
Collection<RoomListener> |
getListeners()
This is an overriding method. |
int |
getMaxUsers()
This is an overriding method. |
String |
getMoniker()
This is an overriding method. |
private void |
getMovie()
WRITEME: document this method (brpocock, Aug 31, 2009) |
String |
getMusic()
This is an overriding method. |
String |
getName()
This is an overriding method. |
private static int |
getNextID()
TODO: document this method (brpocock, Oct 19, 2009) |
String |
getOverlay()
This is an overriding method. |
AbstractUser |
getOwner()
|
int |
getRoomIndex()
Get the index of this room within the set of rooms to which it belongs. |
private String |
getRoomJoinSFSXML(User user)
TODO: document this method (brpocock, Dec 29, 2009) |
String |
getSky()
This is an overriding method. |
private org.json.JSONObject |
getSuperTootBots_JSON()
Deprecated. Needs to be moved someplace more appropriate ... not yet determined ... |
org.json.JSONObject |
getSuperTootBots(int padding)
Deprecated. Does not belong in Room ... but will be removed when NPC's work and Super Toot Bots can be removed from the codebase ... don't count on this being around forever, but it won't disappear as long as Super Toot Bots exist. |
String |
getTitle()
This is an overriding method. |
int |
getUserCount()
This is an overriding method. |
String |
getVariable(String string)
This is an overriding method. |
HashMap<String,String> |
getVariables()
This is an overriding method. |
AbstractZone |
getZone()
This is an overriding method. |
int |
hashCode()
This is an overriding method. |
boolean |
isLimbo()
This is an overriding method. |
boolean |
isSkyVisible()
This is an overriding method. |
void |
join(RoomListener thing)
This is an overriding method. |
void |
part(RoomListener thing)
This is an overriding method. |
void |
sendGameAction(User from,
org.json.JSONObject data)
This is an overriding method. |
void |
sendPublicMessage(AbstractUser from,
String speech)
This is an overriding method. |
protected void |
set(ResultSet rs)
This is an overriding method. |
void |
setFilename(String filename1)
This is an overriding method. |
void |
setLimbo(boolean b)
This is an overriding method. |
void |
setMoniker(String moniker1)
This is an overriding method. |
void |
setMusic(String music1)
This is an overriding method. |
void |
setOverlay(String overlay1)
This is an overriding method. |
void |
setOwner(AbstractUser newHomeOwner)
TODO: document this method (brpocock, Jan 13, 2010) |
void |
setRoomIndex(int newRoomIndex)
|
void |
setRoomVars()
This is an overriding method. |
void |
setSky(String sky1)
This is an overriding method. |
void |
setSkyVisible(boolean skyVisible1)
This is an overriding method. |
void |
setTitle(String newTitle)
This is an overriding method. |
void |
setVariable(Map.Entry<String,String> var)
This is an overriding method. |
void |
setVariable(String varName,
String varValue)
This is an overriding method. |
void |
setVariables(Map<String,String> map)
This is an overriding method. |
private void |
superbot_fetchBasicInfo(ResultSet rs,
ResultSet botGot,
org.json.JSONObject bot,
org.json.JSONObject speech,
org.json.JSONObject avatar)
TODO: document this method (brpocock, Dec 29, 2009) |
private void |
superbot_fetchClothing(ResultSet rs,
org.json.JSONObject clothes)
TODO: document this method (brpocock, Dec 29, 2009) |
private void |
superbot_fetchPattern(ResultSet rs,
org.json.JSONObject clothes)
TODO: document this method (brpocock, Dec 29, 2009) |
private org.json.JSONObject |
superbot_fetchSpeech(PreparedStatement getSpeech,
ResultSet rs)
TODO: document this method (brpocock, Dec 29, 2009) |
org.json.JSONObject |
toJSON()
This is an overriding method. |
private void |
validateUserList()
TODO: document this method (brpocock, Oct 23, 2009) |
| Methods inherited from class org.starhope.appius.sql.SQLPeerDatum |
|---|
changed, findInCache, get, saveInCache, set |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static String fairgroundsImage
private static String fairgroundsLabel
private static String fairgroundsWarp
private static int safeRoomNum
private static final long serialVersionUID
private String filename
private GameEvent gameEvent
private AbstractUser homeOwner
The owner of a room; usually null for public rooms, or non-null for users' houses.
The special room variable homeOwner reflects this.
private transient boolean iAmInLimbo
discussion of Limbo on
AbstractRoom.isLimbo ()private String moniker
private int movieTime
private String movieURL
private String music
private int myID
private String nowPlaying
private final ConcurrentSkipListSet<RoomListener> observers
private String overlay
private int roomIndex
private final ConcurrentHashMap<String,String> roomVariables
private String sky
private boolean skyVisible
private String title
private final ConcurrentSkipListSet<Integer> userList
private transient AbstractZone zone
| Constructor Detail |
|---|
public Room(AbstractZone homeZone)
homeZone - WRITEME
private Room(ResultSet rs,
AbstractZone newZone)
throws SQLException
rs - The theoretical room datasetnewZone - The zone into which the room should be
instantiated
SQLException - if the room dataset can't be interpreted
public Room(String newRoomMoniker,
AbstractZone newRoomZone)
throws NotFoundException
newRoomMoniker - The moniker of the room to be instantiatednewRoomZone - WRITEME
NotFoundException - if there is no room in the database
with the given moniker| Method Detail |
|---|
public static Room create(String roomName,
AbstractZone zone)
Creates only temporary/anonymous rooms without referring to the database.
roomName - the moniker of the roomzone - the zone in which the room is to be created
create(String, AbstractZone, boolean)
public static Room create(String roomName,
AbstractZone abstractZone,
boolean mustExist)
throws NotFoundException
roomName - WRITEMEabstractZone - WRITEMEmustExist - If true, a named room from the database. If
false, an anonymous/temporary room.
NotFoundException - Room moniker not foundpublic static AbstractRoom[] getAllRooms()
public static Room getByMoniker(String moniker,
Zone zone)
moniker - the moniker value for this roomzone - the zone containing this room
private static int getNextID()
public void add(GameEvent game)
add in interface AbstractRoomgame - WRITEMEAbstractRoom.add(org.starhope.appius.game.GameEvent)public int compareTo(AbstractRoom other)
compareTo in interface Comparable<AbstractRoom>Comparable.compareTo(Object)public boolean contains(AbstractUser thing)
contains in interface AbstractRoomthing - who
AbstractRoom.contains(org.starhope.appius.user.AbstractUser)public void deleteVariable(String string)
deleteVariable in interface AbstractRoomdeleteVariable in interface HasVariablesstring - WRITEMEAbstractRoom.deleteVariable(java.lang.String)public void destroySelf()
destroySelf in interface AbstractRoomAbstractRoom.destroySelf()public boolean equals(AbstractRoom other)
other - the other room to which this one will be compared
Object.equals(Object)public boolean equals(Object other)
equals in class Objectorg.starhope.appius.game.AbstractRoom#equals(java.lang.Object)public void flush()
flush in interface AbstractRoomflush in class SQLPeerDatumAbstractRoom.flush()
public void fromJSON(org.json.JSONObject jso)
throws org.json.JSONException
fromJSON in interface AbstractRoomjso - Serialized form
org.json.JSONException - if the incoming data isn't in the right
formAbstractRoom.fromJSON(org.json.JSONObject)public Set<RoomListener> getAllListeners()
getAllListeners in interface AbstractRoomAbstractRoom.getAllListeners()public Collection<AbstractUser> getAllUsers()
getAllUsers in interface AbstractRoomAbstractRoom.getAllUsers()private HashMap<String,String> getArbitraryVars()
protected String getCacheUniqueID()
getCacheUniqueID in class SQLPeerDatumSQLPeerDatum.getCacheUniqueID()public String getDebugName()
getDebugName in interface AbstractRoomAbstractRoom.getDebugName()private Set<AbstractUser> getEverythingInRoom()
private void getFairground()
throws SQLException
SQLException - WRITEMEpublic String getFilename()
getFilename in interface AbstractRoomAbstractRoom.getFilename()public GameEvent getGameEvent()
getGameEvent in interface AbstractRoomAbstractRoom.getGameEvent()@Deprecated public int getId()
getId in interface AbstractRoomAbstractRoom.getId()public int getID()
getID in interface AbstractRoomAbstractRoom.getID()public Collection<RoomListener> getListeners()
getListeners in interface AbstractRoomAbstractRoom.getListeners()public int getMaxUsers()
getMaxUsers in interface AbstractRoomAbstractRoom.getMaxUsers()public String getMoniker()
getMoniker in interface AbstractRoomAbstractRoom.getMoniker()
private void getMovie()
throws SQLException
SQLException - WRITEMEpublic String getMusic()
getMusic in interface AbstractRoomAbstractRoom.getMusic()public String getName()
getName in interface AbstractRoomAbstractRoom.getName()public String getOverlay()
getOverlay in interface AbstractRoomAbstractRoom.getOverlay()public AbstractUser getOwner()
getOwner in interface AbstractRoomAbstractRoom.getOwner()public int getRoomIndex()
AbstractRoomGet the index of this room within the set of rooms to which it belongs.
For user-created rooms, this is the index of the room number within the user's “house,” typically 0 for the first room, 1 for the yard, and 2 or more for additional rooms.
The meaning of this index varies depending upon context; presently, it is only meaningful for user houses.
getRoomIndex in interface AbstractRoomAbstractRoom.getRoomIndex()private String getRoomJoinSFSXML(User user)
user - WRITEME
public String getSky()
getSky in interface AbstractRoomAbstractRoom.getSky()
@Deprecated
public org.json.JSONObject getSuperTootBots(int padding)
throws SQLException,
org.json.JSONException
padding - WRITEME
SQLException - WRITEME
org.json.JSONException - WRITEME@Deprecated private org.json.JSONObject getSuperTootBots_JSON()
public String getTitle()
getTitle in interface AbstractRoomAbstractRoom.getTitle()public int getUserCount()
getUserCount in interface AbstractRoomAbstractRoom.getUserCount()public String getVariable(String string)
getVariable in interface AbstractRoomgetVariable in interface HasVariablesstring - WRITEME
AbstractRoom.getVariable(java.lang.String)public HashMap<String,String> getVariables()
getVariables in interface AbstractRoomAbstractRoom.getVariables()public AbstractZone getZone()
getZone in interface AbstractRoomAbstractRoom.getZone()public int hashCode()
hashCode in interface AbstractRoomhashCode in class ObjectAbstractRoom.hashCode()public boolean isLimbo()
isLimbo in interface AbstractRoomAbstractRoom.isLimbo()public boolean isSkyVisible()
isSkyVisible in interface AbstractRoomAbstractRoom.isSkyVisible()public void join(RoomListener thing)
join in interface AbstractRoomthing - the thing that has joined the roomAbstractRoom.join(org.starhope.appius.game.RoomListener)public void part(RoomListener thing)
part in interface AbstractRoomthing - the thing which wants to stop listening to the roomAbstractRoom.part(RoomListener)
public void sendGameAction(User from,
org.json.JSONObject data)
throws org.json.JSONException
sendGameAction in interface AbstractRoomfrom - WRITEMEdata - WRITEME
org.json.JSONException - if the action can't be represented in JSONAbstractRoom.sendGameAction(org.starhope.appius.user.User,
org.json.JSONObject)
public void sendPublicMessage(AbstractUser from,
String speech)
sendPublicMessage in interface AbstractRoomfrom - WRITEMEspeech - WRITEMEAbstractRoom.sendPublicMessage(org.starhope.appius.user.AbstractUser,
java.lang.String)
protected void set(ResultSet rs)
throws SQLException
set in class SQLPeerDatumrs - The result of an SQL query, with the cursor already
pointed at the row describing this specific instance
of the object.
SQLException - if the database fails somehowSQLPeerDatum.set(java.sql.ResultSet)public void setFilename(String filename1)
setFilename in interface AbstractRoomfilename1 - the filename to setAbstractRoom.setFilename(java.lang.String)public void setLimbo(boolean b)
setLimbo in interface AbstractRoomb - true, if this is a limbo roomAbstractRoom.setLimbo(boolean)public void setMoniker(String moniker1)
setMoniker in interface AbstractRoommoniker1 - the moniker to setAbstractRoom.setMoniker(java.lang.String)public void setMusic(String music1)
setMusic in interface AbstractRoommusic1 - the new background musicAbstractRoom.setMusic(java.lang.String)public void setOverlay(String overlay1)
setOverlay in interface AbstractRoomoverlay1 - the overlay to setAbstractRoom.setOverlay(java.lang.String)public void setOwner(AbstractUser newHomeOwner)
AbstractRoom
setOwner in interface AbstractRoomnewHomeOwner - the new owner of the home containing this
room. May be null.public void setRoomIndex(int newRoomIndex)
newRoomIndex - the new room index within the user's housepublic void setRoomVars()
setRoomVars in interface AbstractRoomAbstractRoom.setRoomVars()public void setSky(String sky1)
setSky in interface AbstractRoomsky1 - the sky to setAbstractRoom.setSky(java.lang.String)public void setSkyVisible(boolean skyVisible1)
setSkyVisible in interface AbstractRoomskyVisible1 - the skyVisible to setAbstractRoom.setSkyVisible(boolean)public void setTitle(String newTitle)
setTitle in interface AbstractRoomnewTitle - WRITEMEAbstractRoom.setTitle(java.lang.String)public void setVariable(Map.Entry<String,String> var)
setVariable in interface AbstractRoomsetVariable in interface HasVariablesvar - A Hash type Entry object containing a key-value pair
to be used to set a variable.AbstractRoom.setVariable(java.util.Map.Entry)
public void setVariable(String varName,
String varValue)
setVariable in interface AbstractRoomsetVariable in interface HasVariablesvarName - WRITEMEvarValue - WRITEMEAbstractRoom.setVariable(java.lang.String,
java.lang.String)public void setVariables(Map<String,String> map)
setVariables in interface AbstractRoomsetVariables in interface HasVariablesmap - WRITEMEAbstractRoom.setVariables(java.util.Map)
private void superbot_fetchBasicInfo(ResultSet rs,
ResultSet botGot,
org.json.JSONObject bot,
org.json.JSONObject speech,
org.json.JSONObject avatar)
throws org.json.JSONException,
SQLException
rs - WRITEMEbotGot - WRITEMEbot - WRITEMEspeech - WRITEMEavatar - WRITEME
org.json.JSONException - WRITEME
SQLException - WRITEME
private void superbot_fetchClothing(ResultSet rs,
org.json.JSONObject clothes)
throws org.json.JSONException,
SQLException
rs - WRITEMEclothes - WRITEME
org.json.JSONException - WRITEME
SQLException - WRITEME
private void superbot_fetchPattern(ResultSet rs,
org.json.JSONObject clothes)
throws org.json.JSONException,
SQLException
rs - WRITEMEclothes - WRITEME
org.json.JSONException - WRITEME
SQLException - WRITEME
private org.json.JSONObject superbot_fetchSpeech(PreparedStatement getSpeech,
ResultSet rs)
throws SQLException,
org.json.JSONException
getSpeech - WRITEMErs - WRITEME
SQLException - WRITEME
org.json.JSONException - WRITEMEpublic org.json.JSONObject toJSON()
toJSON in interface AbstractRoomtoJSON in class SQLPeerDatumAbstractRoom.toJSON()private void validateUserList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||