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.
-
-
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
-
-
-
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
-
-