public interface SessionData extends RoleContainer
| Modifier and Type | Method and Description |
|---|---|
void |
checkConsistency()
Checks for consistency.
|
AccessClient |
getAccessClient()
Return the current access client only if
getPrincipalType() return an instance of
AccessClientPrincipalType. |
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
|
Channel |
getChannel()
Returns the channel this session is using
|
ChannelConfiguration |
getChannelConfiguration()
Returns the channel configuration accessor
|
java.lang.String |
getChannelName()
Returns the internal name of the current channel.
|
ConfigurationAccessor |
getConfiguration()
Returns the configuration accessor
|
Group |
getGroup()
Returns the group of the authenticated user, if any
|
BasicUser |
getLoggedBasicUser()
Returns the authenticated basic user, or null if none
|
User |
getLoggedUser()
Returns the authenticated user, or null if none
|
Network |
getNetwork()
Returns the network this session is using, or null if as global system or administrator
|
java.lang.String |
getPrincipal()
Returns the principal used to access this session, if any
|
PrincipalType |
getPrincipalType()
Returns the principal type used for the current session.
|
org.cyclos.impl.users.ProductsAccessor |
getProducts()
Returns the products accessor
|
java.lang.String |
getRemoteAddress()
Returns the remote address, of the client accessing the application
|
RequestData |
getRequestData()
Returns data about the calling request.
|
Session |
getSession()
Returns the session in case this session data performed a login
|
Token |
getToken()
Return the current token only if
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 |
isAdminOf(BasicUser user)
Returns whether the current user is an administrator of the given user
|
boolean |
isBrokerOf(BasicUser user)
Returns whether the current user is a broker of the given user
|
boolean |
isGlobalAdminInNetwork()
Returns whether a global admin OR a global restricted has switched to a network.
|
boolean |
isGuest()
Returns whether the current session represents a guest
|
boolean |
isLoggedIn()
Returns whether the current session represents an user
|
boolean |
isManagerOf(BasicUser user)
Returns whether the current user is a manager of the given user and is not the given user.
|
boolean |
isMemberOnly()
Returns true if the logged user has only
Role member. |
boolean |
isScript()
Returns whether this session is running under a script
|
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
|
isAdmin, isAliasOperator, isBroker, isGlobalAdmin, isMember, isNetworkAdmin, isOperator, isRestrictedOperator, isUserManagervoid checkConsistency()
throws InvalidSessionDataException
InvalidSessionDataExceptionAccessClient getAccessClient()
getPrincipalType() return an instance of
AccessClientPrincipalType. Otherwise it
returns null.java.util.Collection<BasicGroup> getAccessibleBasicGroups()
UserAuthVO getAuthenticatedUser()
Channel getChannel()
ChannelConfiguration getChannelConfiguration()
java.lang.String getChannelName()
ConfigurationAccessor getConfiguration()
Group getGroup()
BasicUser getLoggedBasicUser()
User getLoggedUser()
Network getNetwork()
java.lang.String getPrincipal()
PrincipalType getPrincipalType()
org.cyclos.impl.users.ProductsAccessor getProducts()
java.lang.String getRemoteAddress()
RequestData getRequestData()
Session getSession()
Token getToken()
getPrincipalType() return an instance of TokenPrincipalType.
Otherwise it returns null.boolean hasPermission(Permission permission)
boolean hasRequiredValue(Permission permission, java.lang.Object value)
boolean isAdminOf(BasicUser user)
boolean isBrokerOf(BasicUser user)
boolean isGlobalAdminInNetwork()
boolean isGuest()
boolean isLoggedIn()
boolean isManagerOf(BasicUser user)
boolean isMemberOnly()
Role member.boolean isScript()
boolean isSystem()
boolean isVisible(org.cyclos.impl.access.EntityCheck<BaseEntity> entityCheck, BaseEntity entity)
boolean manages(BasicUser user)
boolean relatesTo(BasicUser user)