|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cmu.jspsurveymanager.data.Admin
public class Admin
Field Summary | |
---|---|
static int |
ADMINS
Admin management permission constant |
static int |
CREATE
Survey creation permission constant |
static int |
GLOBAL_ADMIN
Global administration permission constant |
Constructor Summary | |
---|---|
Admin(AdminStorage a)
Required default constructor. |
|
Admin(int id,
java.lang.String username,
java.lang.String passHash,
java.lang.String realname,
java.lang.String email,
boolean[] permissions,
AdminStorage a)
|
Method Summary | |
---|---|
void |
delete()
Deletes this admin. |
boolean |
equals(java.lang.Object two)
|
boolean |
getCanAdmin()
Returns CanAdmin |
boolean |
getCanCreate()
Returns CanCreate |
boolean |
getCanGloballyAdmin()
Returns CanAdmin |
java.lang.String |
getEmail()
Returns Real Name |
boolean |
getHasBeenModified()
Adds a bookmark to this user's collection. |
java.lang.String |
getHashedPassword()
Get the password, as an MD5 hash. |
int |
getId()
Checks whether this User bean has unsaved state. |
boolean[] |
getPermissions()
|
java.lang.String |
getRealName()
Returns Real Name |
java.lang.String |
getUsername()
Returns Username |
boolean |
isInitialized()
Checks whether this User bean has been initialized. |
boolean |
passwordMatches(java.lang.String testPassword)
|
boolean |
save()
Saves this admin. |
void |
setCanAdmin(boolean canAdmin)
Sets CanAdmin |
void |
setCanCreate(boolean canCreate)
Sets CanCreate |
void |
setCanGloballyAdmin(boolean canAdmin)
Sets CanGloballyAdmin |
void |
setEmail(java.lang.String newEmail)
Sets Real Name |
void |
setPassword(java.lang.String newPassword)
Sets Password |
void |
setRealName(java.lang.String newName)
Sets Real Name |
void |
setUsername(java.lang.String username)
Sets Username |
java.lang.String |
toString()
|
static java.lang.String |
toString(Admin[] users)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CREATE
public static final int ADMINS
public static final int GLOBAL_ADMIN
Constructor Detail |
---|
public Admin(AdminStorage a)
public Admin(int id, java.lang.String username, java.lang.String passHash, java.lang.String realname, java.lang.String email, boolean[] permissions, AdminStorage a)
Method Detail |
---|
public boolean[] getPermissions()
public void setCanAdmin(boolean canAdmin)
CanAdmin
- a booleanpublic boolean getCanAdmin()
public void setCanGloballyAdmin(boolean canAdmin)
CanAdmin
- a booleanpublic boolean getCanGloballyAdmin()
public void setCanCreate(boolean canCreate)
CanCreate
- a booleanpublic boolean getCanCreate()
public boolean isInitialized()
public int getId()
public void setUsername(java.lang.String username)
Username
- a max 16-character Stringpublic java.lang.String getUsername()
public void setPassword(java.lang.String newPassword)
Password
- public java.lang.String getHashedPassword()
public void setRealName(java.lang.String newName)
Password
- public java.lang.String getRealName()
public void setEmail(java.lang.String newEmail)
Password
- public java.lang.String getEmail()
public boolean passwordMatches(java.lang.String testPassword)
public boolean getHasBeenModified()
url
- comment
- public boolean save()
public void delete()
public boolean equals(java.lang.Object two)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toString(Admin[] users)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |