public interface SessionData
| 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
|
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.
|
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 |
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
|
void 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()
PrincipalType getPrincipalType()
org.cyclos.impl.users.ProductsAccessor getProducts()
java.lang.String getRemoteAddress()
RequestData getRequestData()
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 hasRole(Role role)
boolean isVisible(org.cyclos.impl.access.EntityCheck<org.cyclos.entities.BaseEntity> entityCheck,
org.cyclos.entities.BaseEntity entity)
boolean manages(BasicUser user)
boolean relatesTo(BasicUser user)