Package org.javlo.user
Class User
- java.lang.Object
-
- org.javlo.user.User
-
- All Implemented Interfaces:
Serializable
,Principal
- Direct Known Subclasses:
UserPrincipal
public class User extends Object implements Principal, Serializable
- Author:
- pvandermaesen
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContext()
String
getLabel()
String
getLogin()
String
getName()
String
getPassword()
Set<String>
getRoles()
Map<String,String>
getRolesMap()
IUserInfo
getUserInfo()
boolean
isCustomer()
boolean
isEditor()
boolean
isProvider()
boolean
isRightPassword(String pwd)
void
loadAvatar(ContentContext ctx)
void
setContext(String context)
void
setEditor(boolean editor)
void
setLogin(String login)
void
setUserInfo(IUserInfo info)
String
toString()
boolean
validForRoles(String... roles)
check if user can work with this roles.boolean
validForRoles(Collection<String> rolesSet)
-
-
-
Method Detail
-
getLogin
public String getLogin()
- Returns:
-
getPassword
public String getPassword()
- Returns:
-
validForRoles
public boolean validForRoles(String... roles)
check if user can work with this roles. admin return always true.- Parameters:
roles
-- Returns:
-
validForRoles
public boolean validForRoles(Collection<String> rolesSet)
-
getUserInfo
public IUserInfo getUserInfo()
- Returns:
-
setUserInfo
public void setUserInfo(IUserInfo info)
- Parameters:
info
-
-
setLogin
public void setLogin(String login)
-
toString
public String toString()
-
getContext
public String getContext()
-
setContext
public void setContext(String context)
-
isRightPassword
public boolean isRightPassword(String pwd)
-
isEditor
public boolean isEditor()
-
setEditor
public void setEditor(boolean editor)
-
getLabel
public String getLabel()
-
isCustomer
public boolean isCustomer()
-
isProvider
public boolean isProvider()
-
loadAvatar
public void loadAvatar(ContentContext ctx)
-
-