Package org.cyclos.impl.access
Class SimpleUserPrincipal
- java.lang.Object
-
- org.cyclos.impl.access.SimpleUserPrincipal
-
- All Implemented Interfaces:
UserPrincipal
public class SimpleUserPrincipal extends Object implements UserPrincipal
Implementation for a principal representing a direct user field
-
-
Constructor Summary
Constructors Constructor Description SimpleUserPrincipal()SimpleUserPrincipal(BasicUser user, PrincipalType principalType, String principal)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserPrincipalemail(BasicUser user)Returns a principal representing the e-mailAccessClientgetAccessClient()UserAccountgetAccount()BasicUsergetBasicUser()UserCustomFieldValuegetCustomFieldValue()MobilePhonegetMobilePhone()StringgetPrincipal()Should return a value that can be used to identify the user.PrincipalTypegetPrincipalType()TokengetToken()TrustedDevicegetTrustedDevice()BasicUsergetUser()voidsetPrincipal(String principal)voidsetPrincipalType(PrincipalType principalType)voidsetUser(BasicUser user)static UserPrincipalusername(BasicUser user)Returns a principal representing the username (login name)
-
-
-
Constructor Detail
-
SimpleUserPrincipal
public SimpleUserPrincipal()
-
SimpleUserPrincipal
public SimpleUserPrincipal(BasicUser user, PrincipalType principalType, String principal)
-
-
Method Detail
-
email
public static UserPrincipal email(BasicUser user)
Returns a principal representing the e-mail
-
username
public static UserPrincipal username(BasicUser user)
Returns a principal representing the username (login name)
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal
-
getAccount
public UserAccount getAccount()
- Specified by:
getAccountin interfaceUserPrincipal
-
getBasicUser
public BasicUser getBasicUser()
- Specified by:
getBasicUserin interfaceUserPrincipal
-
getCustomFieldValue
public UserCustomFieldValue getCustomFieldValue()
- Specified by:
getCustomFieldValuein interfaceUserPrincipal
-
getMobilePhone
public MobilePhone getMobilePhone()
- Specified by:
getMobilePhonein interfaceUserPrincipal
-
getPrincipal
public String getPrincipal()
Description copied from interface:UserPrincipalShould return a value that can be used to identify the user. In case the value should be hidden, implementors should return null.- Specified by:
getPrincipalin interfaceUserPrincipal
-
getPrincipalType
public PrincipalType getPrincipalType()
- Specified by:
getPrincipalTypein interfaceUserPrincipal
-
getToken
public Token getToken()
- Specified by:
getTokenin interfaceUserPrincipal
-
getTrustedDevice
public TrustedDevice getTrustedDevice()
- Specified by:
getTrustedDevicein interfaceUserPrincipal
-
getUser
public BasicUser getUser()
-
setPrincipal
public void setPrincipal(String principal)
-
setPrincipalType
public void setPrincipalType(PrincipalType principalType)
-
setUser
public void setUser(BasicUser user)
-
-