Package org.cyclos.entities.access
Class Token
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.BaseEntity
-
- org.cyclos.entities.access.Token
-
- All Implemented Interfaces:
Cloneable,ProcessableForDataTranslation,UserPrincipal,IEntity
- Direct Known Subclasses:
NFCToken
@Entity public class Token extends BaseEntity implements UserPrincipal
Stores a token value
-
-
Constructor Summary
Constructors Constructor Description Token()
-
Method Summary
-
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, toShortString, toString
-
-
-
-
Method Detail
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal
-
getAccount
public UserAccount getAccount()
- Specified by:
getAccountin interfaceUserPrincipal
-
getActivationDate
public Date getActivationDate()
-
getActivationDeadline
public Date getActivationDeadline()
-
getBasicUser
public BasicUser getBasicUser()
- Specified by:
getBasicUserin interfaceUserPrincipal
-
getCreationDate
public Date getCreationDate()
-
getCustomFieldValue
public UserCustomFieldValue getCustomFieldValue()
- Specified by:
getCustomFieldValuein interfaceUserPrincipal
-
getExpiryDate
public Date getExpiryDate()
-
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
-
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
-
getStatus
public TokenStatus getStatus()
-
getToken
public Token getToken()
- Specified by:
getTokenin interfaceUserPrincipal
-
getTrustedDevice
public TrustedDevice getTrustedDevice()
- Specified by:
getTrustedDevicein interfaceUserPrincipal
-
getType
public TokenPrincipalType getType()
-
getUser
public BasicUser getUser()
-
getValue
public String getValue()
-
isActivateNow
public boolean isActivateNow()
-
isInUse
public boolean isInUse()
A token is used if it is active, (temporarily) blocked or is pending for activation
-
setActivateNow
public void setActivateNow(boolean activateNow)
-
setActivationDate
public void setActivationDate(Date activationDate)
-
setActivationDeadline
public void setActivationDeadline(Date activationDeadline)
-
setCreationDate
public void setCreationDate(Date creationDate)
-
setExpiryDate
public void setExpiryDate(Date expiryDate)
-
setStatus
public void setStatus(TokenStatus status)
-
setType
public void setType(TokenPrincipalType type)
-
setUser
public void setUser(BasicUser user)
-
setValue
public void setValue(String value)
-
-