public class SystemSessionData extends AbstractSessionData
| Modifier and Type | Method and Description |
|---|---|
protected ConfigurationAccessor |
doGetConfigurationAccessor() |
protected java.lang.Long |
doGetConfigurationId() |
AccessClient |
getAccessClient()
Return the current access client only if
SessionData.getPrincipalType() return an instance of AccessClientPrincipalType. |
java.util.List<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
|
java.lang.String |
getChannelName()
Returns the internal name of the current channel.
|
Group |
getGroup()
Returns the group of the authenticated user, if any
|
static SystemSessionData |
getInstance() |
static SystemSessionData |
getInstance(RequestData data) |
static SystemSessionData |
getInstance(RequestData data,
java.lang.String channel) |
static SystemSessionData |
getInstance(RequestData data,
java.lang.String channel,
java.util.List<java.util.Locale> locales) |
BasicUser |
getLoggedBasicUser()
Returns the authenticated basic user, or null if none
|
PrincipalType |
getPrincipalType()
Returns the principal type used for the current session.
|
org.cyclos.impl.users.ProductsAccessor |
getProducts()
Returns the products accessor
|
RequestData |
getRequestData()
Returns data about the calling request.
|
Token |
getToken()
Return the current token only if
SessionData.getPrincipalType() return an instance of TokenPrincipalType. |
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 |
hasRole(Role role)
Returns whether the current user has the given role
|
boolean |
isVisible(org.cyclos.impl.access.EntityCheck<org.cyclos.entities.BaseEntity> entityCheck,
org.cyclos.entities.BaseEntity entity)
Returns whether the given entity is visible under the given entity check
|
boolean |
manages(BasicUser user)
Returns whether the current user manages the given user
|
boolean |
relatesTo(BasicUser user)
Returns whether the current user is related to (is allowed to view) the given user
|
java.lang.String |
toString() |
bean, checkConsistency, getApplicationContext, getChannel, getConfiguration, getConfigurationEntity, getLoggedUser, getNetwork, getRawEntityManagerHandler, getRemoteAddress, resolveNetworkIdpublic static SystemSessionData getInstance()
public static SystemSessionData getInstance(RequestData data)
public static SystemSessionData getInstance(RequestData data, java.lang.String channel)
public static SystemSessionData getInstance(RequestData data, java.lang.String channel, java.util.List<java.util.Locale> locales)
public AccessClient getAccessClient()
SessionDataSessionData.getPrincipalType() return an instance of AccessClientPrincipalType. Otherwise it
returns null.public java.util.List<BasicGroup> getAccessibleBasicGroups()
SessionDatapublic UserAuthVO getAuthenticatedUser()
SessionDatapublic ChannelConfiguration getChannelConfiguration()
SessionDatapublic java.lang.String getChannelName()
SessionDatapublic Group getGroup()
SessionDatapublic BasicUser getLoggedBasicUser()
SessionDatapublic PrincipalType getPrincipalType()
SessionDatapublic org.cyclos.impl.users.ProductsAccessor getProducts()
SessionDatapublic RequestData getRequestData()
SessionDatapublic Token getToken()
SessionDataSessionData.getPrincipalType() return an instance of TokenPrincipalType. Otherwise it returns null.public boolean hasPermission(Permission permission)
SessionDatapublic boolean hasRequiredValue(Permission permission, java.lang.Object value)
SessionDatapublic boolean hasRole(Role role)
SessionDatapublic boolean isVisible(org.cyclos.impl.access.EntityCheck<org.cyclos.entities.BaseEntity> entityCheck,
org.cyclos.entities.BaseEntity entity)
SessionDatapublic boolean manages(BasicUser user)
SessionDatapublic boolean relatesTo(BasicUser user)
SessionDatapublic java.lang.String toString()
toString in class java.lang.Objectprotected ConfigurationAccessor doGetConfigurationAccessor()
doGetConfigurationAccessor in class AbstractSessionDataprotected java.lang.Long doGetConfigurationId()
doGetConfigurationId in class AbstractSessionData