Class BasicUserImpl
java.lang.Object
org.apache.fulcrum.security.entity.impl.SecurityEntityImpl
org.apache.fulcrum.security.model.basic.entity.impl.BasicUserImpl
- All Implemented Interfaces:
Serializable
,SecurityEntity
,User
,BasicUser
- Direct Known Subclasses:
DynamicUserImpl
public class BasicUserImpl extends SecurityEntityImpl implements BasicUser
Represents the "basic" model where users can be part of multiple groups
directly, with no roles or permissions.
- Version:
- $Id: BasicUser.java 437451 2006-08-27 20:20:44Z tv $
- Author:
- Eric Pugh
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description BasicUserImpl()
-
Method Summary
Modifier and Type Method Description void
addGroup(Group group)
Add the group to the list of groupsGroupSet
getGroups()
Get the groups this user is part of<T extends Group>
Set<T>getGroupsAsSet()
Get the groups this user is part of as a SetString
getPassword()
Returns the user's password.int
hashCode()
Calculate a hash code for this objectvoid
removeGroup(Group group)
Remove the group from the list of groupsvoid
setGroups(GroupSet groups)
Set the groups this user is part of<T extends Group>
voidsetGroupsAsSet(Set<T> groups)
Set the groups this user is part of as a Setvoid
setPassword(String password)
Set password.Methods inherited from class org.apache.fulcrum.security.entity.impl.SecurityEntityImpl
equals, getId, getName, setId, setName, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity
getId, getName, setId, setName
-
Constructor Details
-
BasicUserImpl
public BasicUserImpl()
-
-
Method Details
-
getPassword
Returns the user's password. This method should not be used by the application directly, because it's meaning depends upon the implementation of UserManager that manages this particular user object. Some implementations will use this attribute for storing a password encrypted in some way, other will not use it at all, when user entered password is presented to some external authority (like NT domain controller) to validate it. See alsoUserManager.authenticate(User,String)
.- Specified by:
getPassword
in interfaceUser
- Returns:
- A String with the password for the user.
-
setPassword
Set password. Application should not use this method directly, seegetPassword()
. See alsoUserManager.changePassword(User,String,String)
.- Specified by:
setPassword
in interfaceUser
- Parameters:
password
- The new password.
-
getGroups
Get the groups this user is part of -
setGroups
Set the groups this user is part of -
removeGroup
Remove the group from the list of groups- Specified by:
removeGroup
in interfaceBasicUser
- Parameters:
group
- the group to remove
-
addGroup
Add the group to the list of groups -
setGroupsAsSet
Set the groups this user is part of as a Set- Specified by:
setGroupsAsSet
in interfaceBasicUser
- Parameters:
groups
- the set of groups
-
getGroupsAsSet
Get the groups this user is part of as a Set- Specified by:
getGroupsAsSet
in interfaceBasicUser
- Returns:
- a set of groups
-
hashCode
public int hashCode()Calculate a hash code for this object- Overrides:
hashCode
in classSecurityEntityImpl
- See Also:
SecurityEntityImpl.hashCode()
-