Package org.cyclos.entities.utils
Class UserPrincipals
- java.lang.Object
-
- org.cyclos.entities.utils.UserPrincipals
-
public class UserPrincipals extends Object
Implementation for a principal representing a direct user field
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classUserPrincipals.SimpleUserPrincipal
-
Field Summary
Fields Modifier and Type Field Description static BiFunction<User,UserAccountType,UserAccount>accountLoader
-
Constructor Summary
Constructors Constructor Description UserPrincipals()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UserAccountaccount(User user, UserAccountType type)Returns an accountstatic UserPrincipalemail(BasicUser user)Returns a principal representing the e-mailstatic voidinializeAccountLoader(BiFunction<User,UserAccountType,UserAccount> accountLoader)static UserPrincipalusername(BasicUser user)Returns a principal representing the username (login name)
-
-
-
Field Detail
-
accountLoader
public static BiFunction<User,UserAccountType,UserAccount> accountLoader
-
-
Method Detail
-
account
public static UserAccount account(User user, UserAccountType type)
Returns an account
-
email
public static UserPrincipal email(BasicUser user)
Returns a principal representing the e-mail
-
inializeAccountLoader
public static void inializeAccountLoader(BiFunction<User,UserAccountType,UserAccount> accountLoader)
-
username
public static UserPrincipal username(BasicUser user)
Returns a principal representing the username (login name)
-
-