|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.user.Entity
com.opensymphony.user.User
mock.user.MockOSUser
public class MockOSUser
A Mock for the OSUser User object. com.opensymphony.user.User
| Field Summary |
|---|
| Fields inherited from class com.opensymphony.user.Entity |
|---|
mutable, name |
| Constructor Summary | |
|---|---|
MockOSUser(String name)
|
|
MockOSUser(String name,
String fullName,
String emailAddress)
|
|
| Method Summary | |
|---|---|
boolean |
addToGroup(Group group)
Add this User as a member to supplied Group. |
boolean |
authenticate(String password)
Verify that the supplied password matches the stored password for the user. |
AccessProvider |
getAccessProvider()
Retrieve pluggable AccessProvider for this entity. |
CredentialsProvider |
getCredentialsProvider()
Retrieve pluggable CredentialsProvider for this entity. |
long |
getDirectoryId()
|
String |
getDisplayName()
|
String |
getEmail()
Convenience method to access property. |
String |
getEmailAddress()
|
String |
getFullName()
Convenience method to access property. |
List<String> |
getGroups()
List all Groups that User is a member of. |
String |
getName()
Name (unique identifier) of entity. |
ProfileProvider |
getProfileProvider()
Retrieve pluggable ProfileProvider for this entity. |
com.opensymphony.module.propertyset.PropertySet |
getPropertySet()
Extra properties associated with entity. |
UserManager |
getUserManager()
Retrieve underlying UserManager that this User is handled by. |
boolean |
inGroup(Group group)
Determine whether User is member of supplied Group. |
boolean |
inGroup(String groupName)
Determine whether User is member of supplied Group. |
boolean |
isActive()
|
boolean |
isMutable()
Determine if entity is mutable. |
void |
remove()
Remove User from CredentialsProvider (providing it is mutable). |
boolean |
removeFromGroup(Group group)
Remove this User as a member from supplied Group. |
void |
setEmail(String email)
Convenience method to access property. |
void |
setFullName(String fullName)
Convenience method to access property. |
void |
setPassword(String password)
Change the User's password. |
void |
store()
Force update to underlying data-stores. |
protected void |
update()
Persists the current user in the embedded Crowd back-end. |
| Methods inherited from class com.opensymphony.user.User |
|---|
compareTo, equals, hashCode |
| Methods inherited from class com.opensymphony.user.Entity |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.security.Principal |
|---|
toString |
| Constructor Detail |
|---|
public MockOSUser(String name)
name - username.
public MockOSUser(String name,
String fullName,
String emailAddress)
| Method Detail |
|---|
public void setEmail(String email)
User
setEmail in class Useremail - new email address.public String getEmail()
User
getEmail in class Userpublic void setFullName(String fullName)
User
setFullName in class UserfullName - new display name.public String getFullName()
User
getFullName in class Userpublic List<String> getGroups()
User
getGroups in class User
public void setPassword(String password)
throws ImmutableException
User
setPassword in class Userpassword - new password.
ImmutableException - should never be thrown as all users from this implementation are "mutable".public boolean addToGroup(Group group)
User
addToGroup in class Usergroup - group to add membership.
true if membership added successfully.public boolean authenticate(String password)
User
authenticate in class Userpassword - current password.
true if the authentication was successful.public boolean inGroup(Group group)
User
inGroup in class Usergroup - group to check membership.
true if the user is a member of the group.public boolean inGroup(String groupName)
User
inGroup in class UsergroupName - name of group to check membership.
true if the user is a member of the group.
public void remove()
throws ImmutableException
User
remove in class UserImmutableExceptionpublic boolean removeFromGroup(Group group)
User
removeFromGroup in class Usergroup - group to remove membership.
true if user successfully removed from group.
public void store()
throws ImmutableException
User
store in class UserImmutableExceptionprotected void update()
User
update in class Userpublic boolean isActive()
isActive in interface com.atlassian.crowd.embedded.api.UserisActive in class Userpublic String getEmailAddress()
getEmailAddress in interface com.atlassian.crowd.embedded.api.UsergetEmailAddress in class Userpublic String getDisplayName()
getDisplayName in interface com.atlassian.crowd.embedded.api.UsergetDisplayName in class Userpublic long getDirectoryId()
getDirectoryId in interface com.atlassian.crowd.embedded.api.UsergetDirectoryId in class Userpublic CredentialsProvider getCredentialsProvider()
Entity
getCredentialsProvider in class Entitypublic String getName()
Entity
getName in interface PrincipalgetName in class Entitypublic ProfileProvider getProfileProvider()
Entity
getProfileProvider in class Entitypublic com.opensymphony.module.propertyset.PropertySet getPropertySet()
Entity
getPropertySet in class Entitypublic AccessProvider getAccessProvider()
Entity
getAccessProvider in class Entitypublic boolean isMutable()
Entity
isMutable in class Entitypublic UserManager getUserManager()
Entity
getUserManager in class Entity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||