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
__SEPARATOR
The separator between the login and the population id for the string representation of a user identityprivate String
_login
The login of the userprivate String
_populationId
The 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 boolean
equals(Object obj)
String
getLogin()
Get the login of the userString
getPopulationId()
GetGet the user population the user belongs toint
hashCode()
static UserIdentity
stringToUserIdentity(String string)
Returns theUserIdentity
from its string representationString
toString()
static String
userIdentityToString(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 theUserIdentity
from 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
-
-