public abstract class UserSessionData extends AbstractSessionData
AbstractSessionData.SessionDataChannelAccessAccessorrequestData| Constructor and Description |
|---|
UserSessionData(RequestData requestData) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConsistency()
Checks for consistency.
|
protected java.lang.Long |
doGetConfigurationId() |
protected abstract java.lang.Long |
doGetLoggedBasicUserId() |
protected java.util.List<java.lang.String> |
doGetPreferredLocales() |
protected org.cyclos.impl.users.ProductsAccessor |
doGetProducts()
Must be implemented to return a a valid
ProductsAccessor |
protected org.cyclos.impl.access.SessionDataSubjectId |
doGetSubjectId() |
protected abstract org.cyclos.impl.access.UserPrincipal |
doGetUserPrincipal() |
protected boolean |
doHasExpiredPassword() |
protected boolean |
doHasPendingAgreements(org.cyclos.impl.users.ProductsAccessor accessor) |
protected boolean |
doHasPendingSecondaryPassword() |
protected boolean |
doHasPermission(Permission permission) |
protected boolean |
fallbackToDefaultLocales() |
AccessClient |
getAccessClient() |
java.util.Set<BasicGroup> |
getAccessibleBasicGroups()
Returns the basic groups accessible by the current session
|
UserAccount |
getAccount() |
UserAuthVO |
getAuthenticatedUser()
Returns the user authentication data, or null if none
|
BasicUser |
getBasicUser() |
org.cyclos.impl.system.ChannelAccessAccessor |
getChannelAccessAccessor()
Returns the accessor for the access channel (i.e the original channel used to access Cyclos) access settings.
|
UserCustomFieldValue |
getCustomFieldValue() |
Group |
getGroup()
Returns the group of the authenticated user, if any
|
BasicUser |
getLoggedBasicUser()
Returns the authenticated basic user, or null if none
|
MobilePhone |
getMobilePhone() |
protected java.util.Set<Permission> |
getPermissions() |
java.lang.String |
getPrincipal() |
PrincipalType |
getPrincipalType() |
protected java.util.Set<Role> |
getRoles() |
Token |
getToken() |
TrustedDevice |
getTrustedDevice() |
org.cyclos.impl.access.UserPrincipal |
getUserPrincipal() |
boolean |
hasExpiredPassword()
Returns whether the user's access password has expired
|
boolean |
hasExpiredSecondaryPassword() |
boolean |
hasPendingAgreements()
Returns whether the logged user has some pending agreements
|
boolean |
hasPengingSecondaryPassword()
Returns whether the user has validated its secondary password (if any).
|
boolean |
hasRequiredValue(Permission permission,
java.lang.Object value)
Returns whether the current user has access to the given required value for the given permission
|
boolean |
isAdmin()
Returns whether the
Role.ADMIN is granted |
boolean |
isAdminOf(BasicUser basicUser)
Returns whether the current user is an administrator of the given user
|
boolean |
isAliasOperator()
Returns whether the
Role.ALIAS_OPERATOR is granted |
boolean |
isBroker()
Returns whether the
Role.BROKER is granted |
boolean |
isBrokerOf(BasicUser basicUser)
Returns whether the current user is a broker of the given user
|
boolean |
isGlobalAdmin()
Returns whether the
Role.GLOBAL_ADMIN is granted |
boolean |
isLoggedIn()
Returns whether the current session represents a user
|
boolean |
isMember()
Returns whether the
Role.MEMBER is granted |
boolean |
isMemberOnly()
Returns true if the logged user has only
Role member. |
boolean |
isNetworkAdmin()
Returns whether the
Role.NETWORK_ADMIN is granted |
boolean |
isOperator()
Returns whether the
Role.OPERATOR is granted |
boolean |
isOwnerOf(BasicUser operator)
Returns whether current user is either the owner member of a given operator or as another alias operator
|
boolean |
isRestrictedOperator()
Returns whether the
Role.RESTRICTED_OPERATOR is granted |
boolean |
isVisible(org.cyclos.impl.access.EntityCheck<SimpleEntity> entityCheck,
SimpleEntity entity)
Returns whether the given entity is visible under the given entity check
|
boolean |
manages(BasicUser basicUser)
Returns whether the current user manages the given user.
|
boolean |
relatesTo(BasicUser basicUser)
Returns whether the current user is related to (is allowed to view) the given user
|
protected org.cyclos.impl.users.ProductsAccessor |
resolveProductsAccessor(ProductsHandler productsHandler) |
protected boolean |
returnPendingPasswords() |
bean, doGetConfigurationAccessor, getAccessChannel, getAccessToken, getApplicationContext, getChannel, getChannelConfiguration, getChannelSettingsAccessor, getConfiguration, getConfigurationEntity, getIdentityProvider, getLoggedOperator, getLoggedUser, getNetwork, getPin, getProducts, getRawEntityManagerHandler, getRemoteAddress, getRequestData, getSession, getSubjectId, hasPermission, isGlobalAdminInNetwork, isGuest, isManagerOf, isMultiNetworkAdminInGlobalMode, isScript, isSystem, isTrusted, isUserManager, resolveNetworkId, runAsSystem, runAsSystemclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessChannelName, getChannelName, hasPermission, isRestpublic UserSessionData(RequestData requestData)
public void checkConsistency()
throws InvalidSessionDataException,
LoginException
SessionDatacheckConsistency in interface SessionDatacheckConsistency in class AbstractSessionDataInvalidSessionDataExceptionLoginExceptionpublic final AccessClient getAccessClient()
getAccessClient in interface org.cyclos.impl.access.UserPrincipalgetAccessClient in class AbstractSessionDatapublic java.util.Set<BasicGroup> getAccessibleBasicGroups()
SessionDatapublic final UserAccount getAccount()
getAccount in interface org.cyclos.impl.access.UserPrincipalgetAccount in class AbstractSessionDatapublic UserAuthVO getAuthenticatedUser()
SessionDatapublic final BasicUser getBasicUser()
getBasicUser in interface org.cyclos.impl.access.UserPrincipalgetBasicUser in class AbstractSessionDatapublic org.cyclos.impl.system.ChannelAccessAccessor getChannelAccessAccessor()
SessionDatagetChannelAccessAccessor in interface SessionDatagetChannelAccessAccessor in class AbstractSessionDatapublic final UserCustomFieldValue getCustomFieldValue()
getCustomFieldValue in interface org.cyclos.impl.access.UserPrincipalgetCustomFieldValue in class AbstractSessionDatapublic Group getGroup()
SessionDatapublic final BasicUser getLoggedBasicUser()
SessionDatapublic final MobilePhone getMobilePhone()
getMobilePhone in interface org.cyclos.impl.access.UserPrincipalgetMobilePhone in class AbstractSessionDatapublic final java.lang.String getPrincipal()
getPrincipal in interface org.cyclos.impl.access.DelegatingUserPrincipalgetPrincipal in interface org.cyclos.impl.access.UserPrincipalgetPrincipal in class AbstractSessionDatapublic final PrincipalType getPrincipalType()
getPrincipalType in interface org.cyclos.impl.access.UserPrincipalgetPrincipalType in class AbstractSessionDatapublic final Token getToken()
getToken in interface org.cyclos.impl.access.UserPrincipalgetToken in class AbstractSessionDatapublic final TrustedDevice getTrustedDevice()
getTrustedDevice in interface org.cyclos.impl.access.UserPrincipalgetTrustedDevice in class AbstractSessionDatapublic final org.cyclos.impl.access.UserPrincipal getUserPrincipal()
public final boolean hasExpiredPassword()
public boolean hasExpiredSecondaryPassword()
public final boolean hasPendingAgreements()
public final boolean hasPengingSecondaryPassword()
hasPengingSecondaryPassword()public boolean hasRequiredValue(Permission permission, java.lang.Object value)
SessionDatapublic boolean isAdmin()
RoleContainerRole.ADMIN is grantedisAdmin in interface RoleContainerisAdmin in class AbstractSessionDatapublic boolean isAdminOf(BasicUser basicUser)
SessionDataisAdminOf in interface SessionDataisAdminOf in class AbstractSessionDatapublic boolean isAliasOperator()
RoleContainerRole.ALIAS_OPERATOR is grantedisAliasOperator in interface RoleContainerisAliasOperator in class AbstractSessionDatapublic boolean isBroker()
RoleContainerRole.BROKER is grantedisBroker in interface RoleContainerisBroker in class AbstractSessionDatapublic boolean isBrokerOf(BasicUser basicUser)
SessionDataisBrokerOf in interface SessionDataisBrokerOf in class AbstractSessionDatapublic boolean isGlobalAdmin()
RoleContainerRole.GLOBAL_ADMIN is grantedisGlobalAdmin in interface RoleContainerisGlobalAdmin in class AbstractSessionDatapublic boolean isLoggedIn()
SessionDataisLoggedIn in interface SessionDataisLoggedIn in class AbstractSessionDatapublic boolean isMember()
RoleContainerRole.MEMBER is grantedisMember in interface RoleContainerisMember in class AbstractSessionDatapublic boolean isMemberOnly()
SessionDataRole member.isMemberOnly in interface SessionDataisMemberOnly in class AbstractSessionDatapublic boolean isNetworkAdmin()
RoleContainerRole.NETWORK_ADMIN is grantedisNetworkAdmin in interface RoleContainerisNetworkAdmin in class AbstractSessionDatapublic boolean isOperator()
RoleContainerRole.OPERATOR is grantedisOperator in interface RoleContainerisOperator in class AbstractSessionDatapublic boolean isOwnerOf(BasicUser operator)
SessionDataisOwnerOf in interface SessionDataisOwnerOf in class AbstractSessionDatapublic boolean isRestrictedOperator()
RoleContainerRole.RESTRICTED_OPERATOR is grantedisRestrictedOperator in interface RoleContainerisRestrictedOperator in class AbstractSessionDatapublic boolean isVisible(org.cyclos.impl.access.EntityCheck<SimpleEntity> entityCheck, SimpleEntity entity)
SessionDatapublic boolean manages(BasicUser basicUser)
SessionDatapublic boolean relatesTo(BasicUser basicUser)
SessionDataprotected final java.lang.Long doGetConfigurationId()
doGetConfigurationId in class AbstractSessionDataprotected abstract java.lang.Long doGetLoggedBasicUserId()
protected java.util.List<java.lang.String> doGetPreferredLocales()
doGetPreferredLocales in class AbstractSessionDataprotected final org.cyclos.impl.users.ProductsAccessor doGetProducts()
AbstractSessionDataProductsAccessordoGetProducts in class AbstractSessionDataprotected org.cyclos.impl.access.SessionDataSubjectId doGetSubjectId()
doGetSubjectId in class AbstractSessionDataprotected abstract org.cyclos.impl.access.UserPrincipal doGetUserPrincipal()
protected boolean doHasExpiredPassword()
protected boolean doHasPendingAgreements(org.cyclos.impl.users.ProductsAccessor accessor)
protected boolean doHasPendingSecondaryPassword()
protected boolean doHasPermission(Permission permission)
doHasPermission in class AbstractSessionDataprotected boolean fallbackToDefaultLocales()
protected java.util.Set<Permission> getPermissions()
protected java.util.Set<Role> getRoles()
protected org.cyclos.impl.users.ProductsAccessor resolveProductsAccessor(ProductsHandler productsHandler)
protected boolean returnPendingPasswords()