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>,ProcessableForDataTranslation,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)
-
-
Constructor Summary
Constructors Constructor Description TrustedDevice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSession(Session session)AccessClientgetAccessClient()UserAccountgetAccount()StringgetActivationCode()BasicUsergetBasicUser()UserCustomFieldValuegetCustomFieldValue()DategetDate()StringgetKey()MobilePhonegetMobilePhone()NetworkgetNetwork()Returns the network this entity belongs toPingetPin()StringgetPrincipal()Should return a value that can be used to identify the user.PrincipalTypegetPrincipalType()Set<Session>getSessions()MobilePhonegetTargetMobilePhone()TokengetToken()TrustedDevicegetTrustedDevice()BasicUsergetUser()voidsetActivationCode(String activationCode)voidsetDate(Date date)voidsetKey(String key)voidsetSessions(Set<Session> sessions)voidsetTargetMobilePhone(MobilePhone targetMobilePhone)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
clone, equals, getId, getId, getIds, getUniqueIds, getUniqueIds, hashCode, isPersistent, isTransient
-
-
-
-
Method Detail
-
addSession
public void addSession(Session session)
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal
-
getAccount
public UserAccount getAccount()
- Specified by:
getAccountin interfaceUserPrincipal
-
getActivationCode
public String getActivationCode()
-
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 class:NetworkedEntityReturns the network this entity belongs to- Specified by:
getNetworkin classNetworkedEntity
-
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
-
getTargetMobilePhone
public MobilePhone getTargetMobilePhone()
-
getToken
public Token getToken()
- Specified by:
getTokenin interfaceUserPrincipal
-
getTrustedDevice
public TrustedDevice getTrustedDevice()
- Specified by:
getTrustedDevicein interfaceUserPrincipal
-
getUser
public BasicUser getUser()
-
setActivationCode
public void setActivationCode(String activationCode)
-
setDate
public void setDate(Date date)
-
setKey
public void setKey(String key)
-
setTargetMobilePhone
public void setTargetMobilePhone(MobilePhone targetMobilePhone)
-
setUser
public void setUser(BasicUser user)
-
-