public abstract class UserSessionData extends AbstractSessionData
requestData| 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 boolean |
fallbackToDefaultLocales() |
java.util.Collection<BasicGroup> |
getAccessibleBasicGroups()
Returns the basic groups accessible by the current session
|
UserAuthVO |
getAuthenticatedUser()
Returns the user authentication data, or null if none
|
ChannelConfiguration |
getChannelConfiguration()
Returns the channel configuration accessor
|
Group |
getGroup()
Returns the group of the authenticated user, if any
|
BasicUser |
getLoggedBasicUser()
Returns the authenticated basic user, or null if none
|
protected java.util.Set<Permission> |
getPermissions() |
protected java.util.Set<Role> |
getRoles() |
boolean |
hasExpiredPassword()
Returns whether the user's access password has expired
|
boolean |
hasPendingAgreements()
Returns whether the logged user has some pending agreements
|
boolean |
hasPermission(Permission permission)
Returns whether the current user has the given permission
|
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 an 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 |
isRestrictedOperator()
Returns whether the
Role.RESTRICTED_OPERATOR is granted |
boolean |
isVisible(org.cyclos.impl.access.EntityCheck<BaseEntity> entityCheck,
BaseEntity 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
|
bean, doGetConfigurationAccessor, getApplicationContext, getChannel, getConfiguration, getConfigurationEntity, getLoggedUser, getNetwork, getPrincipal, getPrincipalType, getProducts, getRawEntityManagerHandler, getRemoteAddress, getRequestData, getSession, isGlobalAdminInNetwork, isGuest, isManagerOf, isScript, isSystem, isUserManager, resolveNetworkId, runAsSystemclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessClient, getChannelName, getTokenpublic UserSessionData(RequestData requestData)
public void checkConsistency()
throws InvalidSessionDataException
SessionDatacheckConsistency in interface SessionDatacheckConsistency in class AbstractSessionDataInvalidSessionDataExceptionpublic java.util.Collection<BasicGroup> getAccessibleBasicGroups()
SessionDatapublic UserAuthVO getAuthenticatedUser()
SessionDatapublic ChannelConfiguration getChannelConfiguration()
SessionDatapublic Group getGroup()
SessionDatapublic final BasicUser getLoggedBasicUser()
SessionDatapublic boolean hasExpiredPassword()
public boolean hasPendingAgreements()
public boolean hasPermission(Permission permission)
SessionDatapublic 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 isRestrictedOperator()
RoleContainerRole.RESTRICTED_OPERATOR is grantedisRestrictedOperator in interface RoleContainerisRestrictedOperator in class AbstractSessionDatapublic boolean isVisible(org.cyclos.impl.access.EntityCheck<BaseEntity> entityCheck, BaseEntity 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 boolean fallbackToDefaultLocales()
protected java.util.Set<Permission> getPermissions()
protected java.util.Set<Role> getRoles()