|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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, 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 User
email
- new email address.public String getEmail()
User
getEmail
in class User
public void setFullName(String fullName)
User
setFullName
in class User
fullName
- new display name.public String getFullName()
User
getFullName
in class User
public List<String> getGroups()
User
getGroups
in class User
public void setPassword(String password) throws ImmutableException
User
setPassword
in class User
password
- new password.
ImmutableException
- should never be thrown as all users from this implementation are "mutable".public boolean addToGroup(Group group)
User
addToGroup
in class User
group
- group to add membership.
true
if membership added successfully.public boolean authenticate(String password)
User
authenticate
in class User
password
- current password.
true
if the authentication was successful.public boolean inGroup(Group group)
User
inGroup
in class User
group
- group to check membership.
true
if the user is a member of the group.public boolean inGroup(String groupName)
User
inGroup
in class User
groupName
- 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 User
ImmutableException
public boolean removeFromGroup(Group group)
User
removeFromGroup
in class User
group
- group to remove membership.
true
if user successfully removed from group.public void store() throws ImmutableException
User
store
in class User
ImmutableException
protected void update()
User
update
in class User
public boolean isActive()
isActive
in interface com.atlassian.crowd.embedded.api.User
isActive
in class User
public String getEmailAddress()
getEmailAddress
in interface com.atlassian.crowd.embedded.api.User
getEmailAddress
in class User
public String getDisplayName()
getDisplayName
in interface com.atlassian.crowd.embedded.api.User
getDisplayName
in class User
public long getDirectoryId()
getDirectoryId
in interface com.atlassian.crowd.embedded.api.User
getDirectoryId
in class User
public CredentialsProvider getCredentialsProvider()
Entity
getCredentialsProvider
in class Entity
public String getName()
Entity
getName
in interface Principal
getName
in class Entity
public ProfileProvider getProfileProvider()
Entity
getProfileProvider
in class Entity
public com.opensymphony.module.propertyset.PropertySet getPropertySet()
Entity
getPropertySet
in class Entity
public AccessProvider getAccessProvider()
Entity
getAccessProvider
in class Entity
public boolean isMutable()
Entity
isMutable
in class Entity
public UserManager getUserManager()
Entity
getUserManager
in class Entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |