public class SystemSessionData extends AbstractSessionData
requestData| Modifier | Constructor and Description |
|---|---|
protected |
SystemSessionData(RequestData requestData,
java.lang.String channel) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Long |
doGetConfigurationId() |
protected org.cyclos.impl.users.ProductsAccessor |
doGetProducts()
Must be implemented to return a a valid
ProductsAccessor |
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(RequestData data) |
static SystemSessionData |
getInstance(RequestData data,
java.lang.String channel) |
BasicUser |
getLoggedBasicUser()
Returns the authenticated basic user, or null if none
|
PrincipalType |
getPrincipalType()
Returns the principal type used for the current session.
|
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 |
isSystem()
Returns whether the current session represents a system task
|
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 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, doGetConfigurationAccessor, doGetPreferredLocales, getApplicationContext, getChannel, getConfiguration, getConfigurationEntity, getLoggedUser, getNetwork, getPrincipal, getProducts, getRawEntityManagerHandler, getRemoteAddress, getRequestData, getSession, isAdmin, isAdminOf, isAliasOperator, isBroker, isBrokerOf, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isManagerOf, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRestrictedOperator, isScript, isUserManager, resolveNetworkId, runAsSystemprotected SystemSessionData(RequestData requestData, java.lang.String channel)
public static SystemSessionData getInstance(RequestData data)
public static SystemSessionData getInstance(RequestData data, java.lang.String channel)
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()
SessionDatagetPrincipalType in interface SessionDatagetPrincipalType in class AbstractSessionDatapublic 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 isSystem()
SessionDataisSystem in interface SessionDataisSystem in class AbstractSessionDatapublic boolean isVisible(org.cyclos.impl.access.EntityCheck<BaseEntity> entityCheck, BaseEntity entity)
SessionDatapublic boolean manages(BasicUser user)
SessionDatapublic boolean relatesTo(BasicUser user)
SessionDatapublic java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.Long doGetConfigurationId()
doGetConfigurationId in class AbstractSessionDataprotected org.cyclos.impl.users.ProductsAccessor doGetProducts()
AbstractSessionDataProductsAccessordoGetProducts in class AbstractSessionData