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,ProcessableForDataTranslation,DelegatingMutableUserPrincipal,DelegatingUserPrincipal,UserPrincipal,IEntity
@Entity public class Session extends NetworkedEntity implements DelegatingMutableUserPrincipal
Represents a session for a stateful access
-
-
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
clone, equals, getId, getId, getIds, getUniqueIds, getUniqueIds, hashCode, isPersistent, isTransient, toShortString, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.impl.access.DelegatingMutableUserPrincipal
initFrom
-
Methods inherited from interface org.cyclos.impl.access.DelegatingUserPrincipal
getDelegate
-
-
-
-
Method Detail
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal
-
getAccount
public UserAccount getAccount()
- Specified by:
getAccountin 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 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 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 to allow theSessionTimeoutHandlerandSessionHandlerhandle the timeouts correctly.
-
getSessionToken
public String getSessionToken()
-
getToken
public Token getToken()
- Specified by:
getTokenin interfaceUserPrincipal
-
getTrustedDevice
public TrustedDevice getTrustedDevice()
- Specified by:
getTrustedDevicein interfaceUserPrincipal
-
getUser
public BasicUser getUser()
-
isConfirmationPasswordValidated
public boolean isConfirmationPasswordValidated()
-
isPendingSecondaryPassword
public boolean isPendingSecondaryPassword()
-
setAccessClient
public void setAccessClient(AccessClient accessClient)
- Specified by:
setAccessClientin interfaceDelegatingMutableUserPrincipal
-
setAccount
public void setAccount(UserAccount account)
- Specified by:
setAccountin interfaceDelegatingMutableUserPrincipal
-
setBasicUser
public void setBasicUser(BasicUser basicUser)
- Specified by:
setBasicUserin interfaceDelegatingMutableUserPrincipal
-
setChannel
public void setChannel(Channel channel)
-
setConfirmationPasswordValidated
public void setConfirmationPasswordValidated(boolean confirmationPasswordValidated)
-
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
-
setPendingSecondaryPassword
public void setPendingSecondaryPassword(boolean pendingSecondaryPassword)
-
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)
-
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)
-
-