Package org.cyclos.entities.access
Class TrustedDevice
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.BaseEntity
-
- org.cyclos.entities.NamedEntity
-
- org.cyclos.entities.access.TrustedDevice
-
- All Implemented Interfaces:
Cloneable,Comparable<NamedEntity>,HasNetwork,ProcessableForProxying,UserPrincipal,IEntity,INamedEntity
@Entity public class TrustedDevice extends NamedEntity implements UserPrincipal
Trusted devices are those used to confirm operations made in other channels. Also, when a user connects to Cyclos from this kind of devices no password confirmation will be used. The trusted device's name must be unique per user, if repeated then a suffix will be added (e.g _1, _2)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Constructor Summary
Constructors Constructor Description TrustedDevice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOtp(Otp otp)voidaddSession(Session session)AccessClientgetAccessClient()UserAccountTypegetAccountType()BasicUsergetBasicUser()UserCustomFieldValuegetCustomFieldValue()DategetDate()StringgetKey()MobilePhonegetMobilePhone()NetworkgetNetwork()Returns the network this entity belongs toSet<Otp>getOtps()PingetPin()StringgetPrincipal()Should return a value that can be used to identify the user.PrincipalTypegetPrincipalType()Set<Session>getSessions()TokengetToken()TrustedDevicegetTrustedDevice()BasicUsergetUser()booleanisActive()voidsetDate(Date date)voidsetKey(String key)voidsetSessions(Set<Session> sessions)voidsetUser(BasicUser user)-
Methods inherited from class org.cyclos.entities.NamedEntity
compareTo, getName, getNames, setName, toShortString, toString
-
Methods inherited from class org.cyclos.entities.BaseEntity
getDataTranslationType, getVersion
-
Methods inherited from class org.cyclos.entities.NetworkedEntity
isGlobal
-
Methods inherited from class org.cyclos.entities.SimpleEntity
equals, getId, hashCode, id, ids, isPersistent, isTransient, register, setId, uniqueIds, uniqueIds
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.entities.ProcessableForProxying
getProxyClass
-
-
-
-
Method Detail
-
addOtp
public void addOtp(Otp otp)
-
addSession
public void addSession(Session session)
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal
-
getAccountType
public UserAccountType getAccountType()
- Specified by:
getAccountTypein interfaceUserPrincipal
-
getBasicUser
public BasicUser getBasicUser()
- Specified by:
getBasicUserin interfaceUserPrincipal
-
getCustomFieldValue
public UserCustomFieldValue getCustomFieldValue()
- Specified by:
getCustomFieldValuein interfaceUserPrincipal
-
getDate
public Date getDate()
-
getKey
public String getKey()
-
getMobilePhone
public MobilePhone getMobilePhone()
- Specified by:
getMobilePhonein interfaceUserPrincipal
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- Specified by:
getNetworkin interfaceHasNetwork
-
getPin
public Pin getPin()
-
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()
-
isActive
public boolean isActive()
-
setDate
public void setDate(Date date)
-
setKey
public void setKey(String key)
-
setUser
public void setUser(BasicUser user)
-
-