|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface represents a user who is part of the ontology, but managed by the UserManager. The user must be available within the ontology to enable associations between him and other elements of the ontology. But the user's data need to be stored outside the ontology for security reasons.
UserManager,
OntologyManager| Method Summary | |
void |
addRole(UserRole role)
Adds a UserRole to this user's roles. |
double |
getAverageOwnRatingsValue()
Returns the average value (the arithmetic mean) of all ratings that this user has given to other elements of the ontology. |
String |
getId()
Returns the user's id that was computed automatically from the username when the user created his account. |
Collection |
getOwnRatings()
Returns a collection of all current Rating objects that this user has given to other elements of the ontology. |
int |
getOwnRatingsCount()
Returns the number of ratings that this user has given to other elements of the ontology. |
Collection |
getRoles()
Returns a collection of UserRole objects that this user is in. |
double |
getScore()
Returns this user's score. |
UserManager |
getUserManager()
Returns the UserManager instance that manages this user account. |
String |
getUsername()
Returns the username that the user has given himself when creating his user account. |
boolean |
isAdmin()
Checks if the user is in the admin role. |
boolean |
isInRole(UserRole role)
Checks if the user is in the given role. |
boolean |
isLoggedOn()
Checks if the user is logged on. |
void |
removeRole(UserRole role)
Removes a UserRole from this user's roles. |
void |
setScore(double score)
Changes this user's score. |
| Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Rateable |
addRating, getAverageRatingValue, getRating, getRatings, getRatingsCount |
| Methods inherited from interface de.uka.ipd.consensus.foundation.schema.Commentatable |
getComment, setComment |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Method Detail |
public String getUsername()
null)getId(),
UserManager.createUser(String, String, Map),
UserManager.getUserByUsername(String)public String getId()
getId in interface Rateablenull)getUsername(),
UserManager.createUser(String, String, Map),
UserManager.getUserById(String)public UserManager getUserManager()
nullpublic boolean isInRole(UserRole role)
role - the role to check
true if the user is in the role, false otherwiseUserManager.findRole(String)public Collection getRoles()
nullUserRolepublic void addRole(UserRole role)
role - the UserRole to addUserManager.findRole(String)public void removeRole(UserRole role)
role - the UserRole to removeUserManager.findRole(String)public boolean isAdmin()
true if the user is in the admin role, false otherwisepublic boolean isLoggedOn()
true if the user is logged on, false otherwiseUserManager.login(String, String),
UserManager.logout(User)public double getScore()
setScore(double),
IncentiveManager.getInitialUserScore(),
ScoringListenerpublic void setScore(double score)
score - the new score (an absolute value, not a delta value!)getScore(),
ScoringListenerpublic Collection getOwnRatings()
RatingManager method.
nullRating,
RatingManager.getUsersOwnRatings(User)public int getOwnRatingsCount()
public double getAverageOwnRatingsValue()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||