public class ScriptSessionData extends java.lang.Object implements SessionData
SessionData, and grant all permissions| Constructor and Description |
|---|
ScriptSessionData(SessionData delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConsistency()
Checks for consistency.
|
AccessClient |
getAccessClient()
Return the current access client only if
SessionData.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
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
|
public ScriptSessionData(SessionData delegate)
public void checkConsistency()
throws InvalidSessionDataException
SessionDatacheckConsistency in interface SessionDataInvalidSessionDataExceptionpublic AccessClient getAccessClient()
SessionDataSessionData.getPrincipalType() return an instance of AccessClientPrincipalType. Otherwise it
returns null.getAccessClient in interface SessionDatapublic java.util.Collection<BasicGroup> getAccessibleBasicGroups()
SessionDatagetAccessibleBasicGroups in interface SessionDatapublic UserAuthVO getAuthenticatedUser()
SessionDatagetAuthenticatedUser in interface SessionDatapublic Channel getChannel()
SessionDatagetChannel in interface SessionDatapublic ChannelConfiguration getChannelConfiguration()
SessionDatagetChannelConfiguration in interface SessionDatapublic java.lang.String getChannelName()
SessionDatagetChannelName in interface SessionDatapublic ConfigurationAccessor getConfiguration()
SessionDatagetConfiguration in interface SessionDatapublic Group getGroup()
SessionDatagetGroup in interface SessionDatapublic BasicUser getLoggedBasicUser()
SessionDatagetLoggedBasicUser in interface SessionDatapublic User getLoggedUser()
SessionDatagetLoggedUser in interface SessionDatapublic Network getNetwork()
SessionDatagetNetwork in interface SessionDatapublic PrincipalType getPrincipalType()
SessionDatagetPrincipalType in interface SessionDatapublic org.cyclos.impl.users.ProductsAccessor getProducts()
SessionDatagetProducts in interface SessionDatapublic java.lang.String getRemoteAddress()
SessionDatagetRemoteAddress in interface SessionDatapublic RequestData getRequestData()
SessionDatagetRequestData in interface SessionDatapublic Token getToken()
SessionDataSessionData.getPrincipalType() return an instance of TokenPrincipalType. Otherwise it returns null.getToken in interface SessionDatapublic boolean hasPermission(Permission permission)
SessionDatahasPermission in interface SessionDatapublic boolean hasRequiredValue(Permission permission, java.lang.Object value)
SessionDatahasRequiredValue in interface SessionDatapublic boolean hasRole(Role role)
SessionDatahasRole in interface SessionDatapublic boolean isVisible(org.cyclos.impl.access.EntityCheck<org.cyclos.entities.BaseEntity> entityCheck,
org.cyclos.entities.BaseEntity entity)
SessionDataisVisible in interface SessionDatapublic boolean manages(BasicUser user)
SessionDatamanages in interface SessionDatapublic boolean relatesTo(BasicUser user)
SessionDatarelatesTo in interface SessionData