|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.uzh.ifi.attempto.acewiki.core.User
public class User
This class represents an AceWiki user.
Method Summary | |
---|---|
void |
addToUserDataCounter(java.lang.String name,
int c)
Adds to a counter in the user data. |
void |
changePassword(java.lang.String oldPw,
java.lang.String newPw)
Changes the password for the user. |
java.lang.String |
getHashedPassword()
Returns the hashed password. |
long |
getId()
Returns the id of the user. |
java.lang.String |
getName()
Returns the name of the user. |
static java.lang.String |
getPasswordHash(java.lang.String password)
Returns a hash value for a given plain-text password using the SHA-256 algorithm. |
UserBase |
getUserBase()
Returns the user base to which this user belongs. |
java.lang.String |
getUserData(java.lang.String name)
Returns the user data with the given property name. |
java.util.List<java.lang.String> |
getUserDataKeys()
Returns all key of this user's properties in the form of key/value pairs. |
boolean |
isCorrectPassword(java.lang.String pw)
Checks whether a certain password is the correct password for this user. |
void |
setUserData(java.lang.String name,
java.lang.String value)
Sets the user data element with the respective name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public long getId()
public java.lang.String getName()
public java.lang.String getHashedPassword()
public java.lang.String getUserData(java.lang.String name)
name
- The property name.
public void setUserData(java.lang.String name, java.lang.String value)
name
- The name of the user data element.value
- The value to be set.public void changePassword(java.lang.String oldPw, java.lang.String newPw)
oldPw
- The old password in plain text.newPw
- The new password in plain text.public void addToUserDataCounter(java.lang.String name, int c)
name
- The name of the user data element.c
- The value by which the counter should be increased.public boolean isCorrectPassword(java.lang.String pw)
pw
- The password to be checked in plain text.
public static java.lang.String getPasswordHash(java.lang.String password)
password
- The plain-text password for which a hash value should be created.
public UserBase getUserBase()
public java.util.List<java.lang.String> getUserDataKeys()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |