|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.user.GeneralUser
org.starhope.appius.user.User
com.tootsville.user.Toot
public class Toot
A Toot™ character as a specific user within Tootsville™. Contains Tootsville-specific methods that don't belong in the GPL core of Appius. Some of these may be changed to deprecated replacements for the GPL functionality when new ideas, such as currency possessions, are incorporated into the base class.
| Field Summary | |
|---|---|
private static int |
FREE_AVATAR
Avatar for free members |
private static int |
HOW_MANY_ARE_BASIC_8
which avatar ID's are for the basic 8? 1..8 (this is the 8) |
private static BigInteger |
peanutLimiter
Safety limiter on peanuts |
private static int |
PREMIUM_AVATAR
Avatar for premium members |
private static long |
serialVersionUID
Java® serialisation unique ID |
(package private) TootUserTrailer |
trailer
Trailer record for a Toot |
| Fields inherited from class org.starhope.appius.user.User |
|---|
MAX_LOGIN_LENGTH, MAX_PW_LENGTH, MIN_LOGIN_LENGTH, MIN_PW_LENGTH, positioning, STAFF_LEVEL_ACCOUNT_SERVICE, STAFF_LEVEL_DESIGNER, STAFF_LEVEL_DEVELOPER, STAFF_LEVEL_MODERATOR, STAFF_LEVEL_PUBLIC, STAFF_LEVEL_STAFF_MEMBER |
| Fields inherited from class org.starhope.appius.user.GeneralUser |
|---|
baseStats, collisionBounds, currentRoom, facing, lastUserMovement, pathFinder, userRecord |
| Constructor Summary | |
|---|---|
Toot(Date playerDateOfBirth,
String avatarTitle,
String userNameRequested)
Instantiate a new Toot, given the user's birthdate, chosen Basic 8 character, and the requested user name. |
|
Toot(Date playerDateOfBirth,
String avatarTitle,
String userNameRequested,
String passwordQuestion,
String passwordAnswer,
String password)
Instantiate a new Toot, given the user's birthdate, chosen Basic 8 character, and the requested user name. |
|
Toot(int id)
Recall a user by ID |
|
Toot(String newUserLogin)
Simple constructor from login (recalls existing user) |
|
Toot(UserRecord rec)
instantiate a Toot from a data record WRITEME Loads the trailer record, too WRITEME |
|
| Method Summary | |
|---|---|
String |
acceptPeanutCode(String peanutSerial)
Take a peanut code and apply the benefits thereof to this user |
private void |
addDefaultFreeItems()
Add the default free items to the user's inventory |
void |
addPeanuts(BigInteger add,
String moniker)
Add a number of peanuts as a gift or other event. |
void |
affirmFreeMember()
This is an overriding method. |
void |
affirmPaidMember()
This is an overriding method. |
void |
biff(AbstractZone abstractZone,
Room room)
Send a biff message to announce the number of message in a user's Inbox. |
void |
doffPatterns()
Get bare |
void |
doffPivitz()
Remove Pivitz |
void |
doTransport()
This is an overriding method. |
Vector<GameWorldMessage> |
getAllMailOnWall(int numberOfMessages)
Retrieve a number of of MailMessages starting with the most recent. |
String |
getApprovalCookie()
Get a cookie object for sending mail. |
int |
getBasic8Choice()
|
static Toot |
getByApprovalCookie(String cookie)
Find the user who is uniquely identified by the given approval cookie |
int |
getHouseTypeID()
Deprecated. use UserHouse.getHouseTypeID() |
int |
getInboxCount()
XXX: contains SQL |
int |
getLotID()
Deprecated. use UserHouse.getLotID() |
Vector<GameWorldMessage> |
getMailInBox()
|
Vector<GameWorldMessage> |
getMailInBox(int offset,
int limit)
XXX: Contains SQL |
Vector<GameWorldMessage> |
getMailOnMyWall(int numberOfMessages)
Deprecated. use getMailOnWall(int, int) |
Vector<GameWorldMessage> |
getMailOnMyWall(int numberOfMessages,
int start)
Deprecated. use getMailOnWall(int, int) |
Vector<GameWorldMessage> |
getMailOnWall(int limit,
int offset)
XXX:contains SQL |
Vector<GameWorldMessage> |
getMailOnWallAndBuddyWall(int offset,
int limit)
twheys@gmail.com Jan 15, 2010 |
static Vector<GameWorldMessage> |
getMailOnWallInReplyTo(int id)
|
BigInteger |
getMoney(Currency currency)
Deprecated. |
Vector<GameWorldMessage> |
getNewMailOnWall(int newerThanID)
twheys@gmail.com Feb 12, 2010 |
Vector<GameWorldMessage> |
getNewMailOnWallAndBuddyWall(int newerThanID)
twheys@gmail.com Feb 12, 2010 |
BigInteger |
getPeanuts()
|
String |
getSubversionRevision()
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence. |
String |
getTootBookStatus()
|
HashMap<String,String> |
getTootsBookThemes()
Deprecated. |
String |
getTootsBookThemeURL()
Get the URL for the active TootBook theme folder for this user. |
int |
getTootTimeLeft()
|
String |
getTootTimeLeft$()
|
int |
getTootTimeLeftMinutes()
|
int |
getTootTimeRefill()
|
int |
getTotalTootTimeLeftMinuts()
|
static String[] |
getZ$Z()
Z$Z |
void |
giftPeanuts(BigInteger numNuts,
String event)
Give a gift of peanuts. |
boolean |
isTootTimerDay()
|
boolean |
isTootTimerMonth()
|
void |
local_create()
This is an overriding method. |
void |
postLoginGlobal()
This is an overriding method. |
int |
postNewOnTootBookWall(int toID,
String body)
Post a new message on this users TootBook wall. |
int |
postReplyOnTootBookWall(String body,
int replyToID)
Post a reply to a post on a TootBook wall. |
void |
sendEarnings(Room room,
String msg)
Send an earnings notice to the client. |
private boolean |
sendMail(int to,
String subject,
String body)
Send an in-game eMail message |
boolean |
sendMail(String to,
String subject,
String body)
|
void |
sendPlushTootPromo(UserAddress shippingAddress,
int tootSelect)
Send a promotional plush Toot to this user, at the specified address. |
boolean |
sendSystemWallMail(String message,
String attachment,
String game)
twheys@gmail.com Feb 18, 2010 |
private int |
sendWallMail(int toID,
String body,
int inReplyTo)
Creates a new post on a TootBook Profile. |
void |
setBasic8Choice(int newToot)
|
void |
setReferer(String theReferer)
This is an overriding method. |
void |
setTootTimerDay(boolean useDailyTimer)
|
void |
setTootTimeRefill(int refillAmount)
|
void |
setTootTimerMonth(boolean useMonthlyTimer)
|
private void |
setWallet()
WRITEME brpocock@star-hope.org Aug 3, 2010 |
void |
stampPassport(String moniker)
WRITEME: document this method (brpocock@star-hope.org, Sep 8, 2009) |
void |
startEnrolment(UserEnrolment userEnrolment)
This is an overriding method. |
org.json.JSONObject |
toJSON()
Sends a limited subset of data for the client to know. |
void |
transferPeanuts(BigInteger numNuts,
Toot fromUser,
String event)
Transfer peanuts from one user to another |
void |
updateWallet()
review your current wallet currency amounts, they may have changed |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.starhope.appius.user.AbstractPerson |
|---|
getResponsibleMail |
| Field Detail |
|---|
private static final int FREE_AVATAR
private static final int HOW_MANY_ARE_BASIC_8
private static final BigInteger peanutLimiter
private static final int PREMIUM_AVATAR
private static final long serialVersionUID
final TootUserTrailer trailer
| Constructor Detail |
|---|
public Toot(Date playerDateOfBirth,
String avatarTitle,
String userNameRequested)
throws NumberFormatException,
AlreadyUsedException,
ForbiddenUserException
playerDateOfBirth - the player's birthdateavatarTitle - the player's chosen Basic 8 characteruserNameRequested - the player's requested login / avatar /
user name
AlreadyUsedException - if the user name given is already
used
ForbiddenUserException - if the user account is not
permitted to be created — e.g. the user name given
might have been deemed obscene
NumberFormatException - if the supplied date of birth is
“impossible”User.User(Date, String, String, String, String, String)
public Toot(Date playerDateOfBirth,
String avatarTitle,
String userNameRequested,
String passwordQuestion,
String passwordAnswer,
String password)
throws AlreadyUsedException,
ForbiddenUserException,
NumberFormatException
playerDateOfBirth - the player's birthdateavatarTitle - the player's chosen Basic 8 characteruserNameRequested - the player's requested login / avatar /
user name
AlreadyUsedException - if the user name given is already
used
ForbiddenUserException - if the user account is not
permitted to be created — e.g. the user name given
might have been deemed obscene
NumberFormatException - if the supplied date of birth is
“impossible”User.User(Date, String, String, String, String, String)
public Toot(int id)
throws NotFoundException
id - the user ID
NotFoundException - if the user can't be foundUser.User(int),
Nomenclator.getUserByID(int)
public Toot(String newUserLogin)
throws NotFoundException
newUserLogin - Requested user login
NotFoundException - If the login does not exist alreadyUser.User(String)
public Toot(UserRecord rec)
throws NotFoundException
rec - the user record for the Toot
NotFoundException - if the trailer record can't be foundUser.User(UserRecord)| Method Detail |
|---|
public static Toot getByApprovalCookie(String cookie)
throws IOException,
NotFoundException
cookie - The approval cookie used in the eMail
IOException - if the cookie can't be decoded
NotFoundException - if the user can't be identifiedpublic static Vector<GameWorldMessage> getMailOnWallInReplyTo(int id)
id - the message ID to which replies are wanted
public static String[] getZ$Z()
public final String acceptPeanutCode(String peanutSerial)
throws NotFoundException,
AlreadyUsedException
peanutSerial - the serial number / code sequence in the
database
NotFoundException - if the peanut code serial number is not
found
AlreadyUsedException - if that peanut code has already been
usedprivate void addDefaultFreeItems()
public final void addPeanuts(BigInteger add,
String moniker)
peanutLimiter)
add - additional peanuts givenmoniker - reason for peanutspublic final void affirmFreeMember()
affirmFreeMember in class UserUser.affirmFreeMember()public final void affirmPaidMember()
affirmPaidMember in class UserUser.affirmPaidMember()
public void biff(AbstractZone abstractZone,
Room room)
throws org.json.JSONException
abstractZone - The zone in which the user is standingroom - The room in which the user is standing
org.json.JSONException - If the biff can't be sentpublic void doffPatterns()
public void doffPivitz()
public void doTransport()
doTransport in interface AbstractUserdoTransport in class UserUser.doTransport()public Vector<GameWorldMessage> getAllMailOnWall(int numberOfMessages)
numberOfMessages - The number of posts needed.
public String getApprovalCookie()
AbstractPerson
Parent,
Userpublic int getBasic8Choice()
@Deprecated public int getHouseTypeID()
UserHouse.getHouseTypeID()
public int getInboxCount()
XXX: contains SQL
@Deprecated public int getLotID()
UserHouse.getLotID()
public Vector<GameWorldMessage> getMailInBox()
public Vector<GameWorldMessage> getMailInBox(int offset,
int limit)
XXX: Contains SQL
limit - the maximum number of messages to be returnedoffset - the first message index to return
@Deprecated public Vector<GameWorldMessage> getMailOnMyWall(int numberOfMessages)
getMailOnWall(int, int)
numberOfMessages - The number of posts needed.
@Deprecated
public Vector<GameWorldMessage> getMailOnMyWall(int numberOfMessages,
int start)
getMailOnWall(int, int)
numberOfMessages - The number of posts needed.start - the first message (counting backwards in time from
the latest)
public Vector<GameWorldMessage> getMailOnWall(int limit,
int offset)
XXX:contains SQL
offset - the first message to fetch (counting from 0 being
the user's first wall message ever)limit - the last message to fetch. If there are fewer
messages than this index, you may receive less
results.
public Vector<GameWorldMessage> getMailOnWallAndBuddyWall(int offset,
int limit)
twheys@gmail.com Jan 15, 2010TO getMailOnWallAndBuddyWall WRITEME...
offset - WRITEME twheys@gmail.comlimit - WRITEME twheys@gmail.com
@Deprecated public BigInteger getMoney(Currency currency)
AbstractUserAbstractUser.getWallet()
getMoney in interface AbstractUsergetMoney in class GeneralUsercurrency - units
AbstractUser.getMoney(org.starhope.appius.mb.Currency)public Vector<GameWorldMessage> getNewMailOnWall(int newerThanID)
twheys@gmail.com Feb 12, 2010TO getNewMailOnWall get mail on Wall that has an ID greater than newerThanID WRITEME
newerThanID - WRITEME
public Vector<GameWorldMessage> getNewMailOnWallAndBuddyWall(int newerThanID)
twheys@gmail.com Feb 12, 2010TO getNewMailOnWallAndBuddyWall get mail on Wall or Buddy Walls that has an ID greater than newerThanID WRITEME
newerThanID - WRITEME
public BigInteger getPeanuts()
public String getSubversionRevision()
HasSubversionRevisionReturn the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence.
As an example,the Subversion revision string for this file is "$Rev: 1983 $"
@Override
public String getSubversionRevision () {
return "$Rev: ";
}
getSubversionRevision in interface HasSubversionRevisiongetSubversionRevision in class UserUser.getSubversionRevision()public String getTootBookStatus()
@Deprecated public HashMap<String,String> getTootsBookThemes()
public String getTootsBookThemeURL()
public int getTootTimeLeft()
public String getTootTimeLeft$()
public int getTootTimeLeftMinutes()
public int getTootTimeRefill()
public int getTotalTootTimeLeftMinuts()
public void giftPeanuts(BigInteger numNuts,
String event)
throws AlreadyExistsException,
org.json.JSONException
numNuts - WRITEMEevent - event string
AlreadyExistsException - WRITEME
org.json.JSONException - WRITEMEpublic boolean isTootTimerDay()
public boolean isTootTimerMonth()
public void local_create()
local_create in class UserUser.local_create()public void postLoginGlobal()
postLoginGlobal in class UserUser.postLoginGlobal()
public int postNewOnTootBookWall(int toID,
String body)
throws DataException,
GameLogicException
toID - The ID of the User who's being posted tobody - The body of the message being sent.
DataException - If the replyToID does not resolve a
message, or if the message fails to send.
GameLogicException - if the mail fails the filters. XXX
Filter exceptions
public int postReplyOnTootBookWall(String body,
int replyToID)
throws DataException,
GameLogicException
body - The message to post.replyToID - the ID of the post being replied to.
DataException - If the replyToID does not resolve a
message, or if the message fails to send.
GameLogicException - If the mail fails the filters. XXX
filter exceptions
public void sendEarnings(Room room,
String msg)
sendEarnings in interface AbstractUsersendEarnings in class Userroom - WRITEMEmsg - WRITEMEAbstractUser.sendEarnings(org.starhope.appius.game.Room,
java.lang.String)
private boolean sendMail(int to,
String subject,
String body)
to - The user to receive the messagesubject - The subject of the messagebody - The body/contents of the message
public boolean sendMail(String to,
String subject,
String body)
to - WRITEMEsubject - WRITEMEbody - WRITEME
public void sendPlushTootPromo(UserAddress shippingAddress,
int tootSelect)
throws SQLException,
GameLogicException
shippingAddress - the address to which to ship the plush
ToottootSelect - the Toot selected
SQLException - if the order can't be inserted into shipping
GameLogicException - if the user attempts to send the plush
Toot to someone else
public boolean sendSystemWallMail(String message,
String attachment,
String game)
twheys@gmail.com Feb 18, 2010TO sendSystemWallMail send a mail from THIS user to $Quicksilver WRITEME
message - WRITEMEattachment - WRITEMEgame - WRITEME
private int sendWallMail(int toID,
String body,
int inReplyTo)
throws DataException,
GameLogicException
toID - The ID of the User who is receiving this post.body - The body/contents of the messageinReplyTo - The ID of the post that is being replied to. -1
if this is not a reply.
DataException - If the post fails to send.
GameLogicException - If the post fails the filters.public void setBasic8Choice(int newToot)
newToot - the basic8Choice to setpublic void setReferer(String theReferer)
setReferer in class UsertheReferer - a four-character identifierUser.setReferer(java.lang.String)public void setTootTimerDay(boolean useDailyTimer)
useDailyTimer - the tootTimerDay to setpublic void setTootTimeRefill(int refillAmount)
refillAmount - the tootTimeRefill to setpublic void setTootTimerMonth(boolean useMonthlyTimer)
useMonthlyTimer - the tootTimerMonth to setprivate void setWallet()
public void stampPassport(String moniker)
moniker - WRITEMEpublic void startEnrolment(UserEnrolment userEnrolment)
startEnrolment in class UseruserEnrolment - the enrolment to be started for this userUser.startEnrolment(org.starhope.appius.mb.UserEnrolment)public org.json.JSONObject toJSON()
Sends a limited subset of data for the client to know. This is
the information which the client is allowed to know about their
own user account; this is a superset of the information returned
by GeneralUser.getPublicInfo(), which is the information which any
other user can obtain about it. The information from
GeneralUser.getPublicInfo() is contained in the “avatar” key of this
method's return values.
toJSON in interface AbstractUsertoJSON in class UserGeneralUser.getPublicInfo()AbstractUser.toJSON()
public void transferPeanuts(BigInteger numNuts,
Toot fromUser,
String event)
throws AlreadyExistsException,
org.json.JSONException
numNuts - number of peanutsfromUser - user giving up the peanutsevent - event for which the
AlreadyExistsException - WRITEME
org.json.JSONException - WRITEMEpublic void updateWallet()
AbstractUser
updateWallet in interface AbstractUserupdateWallet in class UserGeneralUser.updateWallet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||