public class GuestSessionData extends AbstractSessionData
| Constructor and Description |
|---|
GuestSessionData(java.lang.String channelName,
RequestData requestData) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConsistency()
Checks for consistency.
|
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
|
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 basicUser)
Returns whether the current user is related to (is allowed to view) the given user
|
void |
setPublicRegisteredUserId(java.lang.Long publicRegisteredUserId) |
java.lang.String |
toString() |
bean, doGetConfigurationAccessor, getApplicationContext, getChannel, getConfiguration, getConfigurationEntity, getLoggedUser, getNetwork, getRawEntityManagerHandler, getRemoteAddress, resolveNetworkIdpublic GuestSessionData(java.lang.String channelName,
RequestData requestData)
public void checkConsistency()
throws InvalidSessionDataException
SessionDatacheckConsistency in interface SessionDatacheckConsistency in class AbstractSessionDataInvalidSessionDataExceptionpublic 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 basicUser)
SessionDatapublic void setPublicRegisteredUserId(java.lang.Long publicRegisteredUserId)
public java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.Long doGetConfigurationId()
doGetConfigurationId in class AbstractSessionData