Package org.cyclos.entities.access
Class Session
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.access.Session
-
- All Implemented Interfaces:
Cloneable,HasNetwork,ProcessableForProxying,DelegatingMutableUserPrincipal,DelegatingUserPrincipal,UserPrincipal,IEntity
@Entity public class Session extends NetworkedEntity implements DelegatingMutableUserPrincipal
Represents a session for a stateful access
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Constructor Summary
Constructors Constructor Description Session()
-
Method Summary
-
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, toShortString, toString, uniqueIds, uniqueIds
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.entities.users.DelegatingMutableUserPrincipal
initFrom
-
Methods inherited from interface org.cyclos.entities.users.DelegatingUserPrincipal
getDelegate
-
Methods inherited from interface org.cyclos.entities.ProcessableForProxying
getProxyClass
-
-
-
-
Method Detail
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal
-
getAccountType
public UserAccountType getAccountType()
- Specified by:
getAccountTypein interfaceUserPrincipal
-
getBasicUser
public BasicUser getBasicUser()
- Specified by:
getBasicUserin interfaceUserPrincipal
-
getChannel
public Channel getChannel()
-
getCreationDate
public Date getCreationDate()
-
getCustomFieldValue
public UserCustomFieldValue getCustomFieldValue()
- Specified by:
getCustomFieldValuein interfaceUserPrincipal
-
getIdentityProvider
public IdentityProvider getIdentityProvider()
-
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 interfaceDelegatingUserPrincipal- Specified by:
getPrincipalin interfaceUserPrincipal
-
getPrincipalType
public PrincipalType getPrincipalType()
- Specified by:
getPrincipalTypein interfaceUserPrincipal
-
getProperties
public SessionProperties getProperties()
-
getRemoteAddress
public String getRemoteAddress()
-
getSessionId
public Long getSessionId()
-
getSessionTimeout
public TimeInterval getSessionTimeout()
Returns the custom timeout specified for this session if any. Otherwise return null meaning the session timeout is that set in the corresponding channel configuration.
We return null to distinguish the case there is no custom timeout.
-
getSessionToken
public String getSessionToken()
-
getSource
public SessionSource getSource()
-
getToken
public Token getToken()
- Specified by:
getTokenin interfaceUserPrincipal
-
getTrustedDevice
public TrustedDevice getTrustedDevice()
- Specified by:
getTrustedDevicein interfaceUserPrincipal
-
getUser
public BasicUser getUser()
-
isConfirmationValidated
public boolean isConfirmationValidated()
-
isPendingLoginConfirmation
public boolean isPendingLoginConfirmation()
-
setAccessClient
public void setAccessClient(AccessClient accessClient)
- Specified by:
setAccessClientin interfaceDelegatingMutableUserPrincipal
-
setAccountType
public void setAccountType(UserAccountType accountType)
- Specified by:
setAccountTypein interfaceDelegatingMutableUserPrincipal
-
setBasicUser
public void setBasicUser(BasicUser basicUser)
- Specified by:
setBasicUserin interfaceDelegatingMutableUserPrincipal
-
setChannel
public void setChannel(Channel channel)
-
setConfirmationValidated
public void setConfirmationValidated(boolean confirmationValidated)
-
setCreationDate
public void setCreationDate(Date creationDate)
-
setCustomFieldValue
public void setCustomFieldValue(UserCustomFieldValue customFieldValue)
- Specified by:
setCustomFieldValuein interfaceDelegatingMutableUserPrincipal
-
setIdentityProvider
public void setIdentityProvider(IdentityProvider identityProvider)
-
setMobilePhone
public void setMobilePhone(MobilePhone mobilePhone)
- Specified by:
setMobilePhonein interfaceDelegatingMutableUserPrincipal
-
setPendingLoginConfirmation
public void setPendingLoginConfirmation(boolean pendingLoginConfirmation)
-
setPin
public void setPin(Pin pin)
-
setPrincipalType
public void setPrincipalType(PrincipalType principalType)
- Specified by:
setPrincipalTypein interfaceDelegatingMutableUserPrincipal
-
setProperties
public void setProperties(SessionProperties properties)
-
setRemoteAddress
public void setRemoteAddress(String remoteAddress)
-
setSessionTimeout
public void setSessionTimeout(TimeInterval sessionTimeout)
-
setSessionToken
public void setSessionToken(String sessionToken)
-
setSource
public void setSource(SessionSource source)
-
setToken
public void setToken(Token token)
- Specified by:
setTokenin interfaceDelegatingMutableUserPrincipal
-
setTrustedDevice
public void setTrustedDevice(TrustedDevice trustedDevice)
- Specified by:
setTrustedDevicein interfaceDelegatingMutableUserPrincipal
-
setUser
public void setUser(BasicUser user)
-
-