Package org.ametys.core.user
Class UserIdentity
- java.lang.Object
 - 
- org.ametys.core.user.UserIdentity
 
 
- 
- Direct Known Subclasses:
 LdapUserIdentity
public class UserIdentity extends Object
Class containing a user identity, i.e. the login of the user and the id of its user population. 
- 
- 
Field Summary
Fields Modifier and Type Field Description private static String__SEPARATORThe separator between the login and the population id for the string representation of a user identityprivate String_loginThe login of the userprivate String_populationIdThe id of the user population the user belongs to 
- 
Constructor Summary
Constructors Constructor Description UserIdentity(String login, String populationId)Constructs a user identity 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetLogin()Get the login of the userStringgetPopulationId()GetGet the user population the user belongs tointhashCode()static UserIdentitystringToUserIdentity(String string)Returns theUserIdentityfrom its string representationStringtoString()static StringuserIdentityToString(UserIdentity userIdentity)Gets a string representation of aUserIdentity 
 - 
 
- 
- 
Field Detail
- 
__SEPARATOR
private static final String __SEPARATOR
The separator between the login and the population id for the string representation of a user identity- See Also:
 - Constant Field Values
 
 
- 
_populationId
private String _populationId
The id of the user population the user belongs to 
 - 
 
- 
Constructor Detail
- 
UserIdentity
public UserIdentity(String login, String populationId)
Constructs a user identity- Parameters:
 login- The login of the userpopulationId- The id of the user population the user belongs to
 
 - 
 
- 
Method Detail
- 
userIdentityToString
public static String userIdentityToString(UserIdentity userIdentity)
Gets a string representation of aUserIdentity- Parameters:
 userIdentity- The user identity- Returns:
 - The string representation of the user identity.
 
 
- 
stringToUserIdentity
public static UserIdentity stringToUserIdentity(String string)
Returns theUserIdentityfrom its string representation- Parameters:
 string- The string representation of the user identity- Returns:
 - The user identity from its string representation
 
 
- 
getPopulationId
public String getPopulationId()
GetGet the user population the user belongs to- Returns:
 - The id of the user population the user belongs to
 
 
 - 
 
 -