public class GuestSessionData extends AbstractSessionData
requestData| Constructor and Description |
|---|
GuestSessionData(RequestData requestData,
java.lang.String channelName) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConsistency()
Checks for consistency.
|
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.Collection<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.
|
java.lang.Long |
getPublicRegisteredUserId() |
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 |
isGuest()
Returns whether the current session represents a guest
|
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 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, doGetPreferredLocales, getApplicationContext, getChannel, getConfiguration, getConfigurationEntity, getLoggedUser, getNetwork, getPrincipal, getProducts, getRawEntityManagerHandler, getRemoteAddress, getRequestData, getSession, isAdmin, isAdminOf, isAliasOperator, isBroker, isBrokerOf, isGlobalAdmin, isGlobalAdminInNetwork, isLoggedIn, isManagerOf, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRestrictedOperator, isScript, isSystem, isUserManager, resolveNetworkId, runAsSystempublic GuestSessionData(RequestData requestData, java.lang.String channelName)
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.Collection<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 java.lang.Long getPublicRegisteredUserId()
public 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 isGuest()
SessionDataisGuest in interface SessionDataisGuest in class AbstractSessionDatapublic boolean isVisible(org.cyclos.impl.access.EntityCheck<BaseEntity> entityCheck, 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 AbstractSessionDataprotected org.cyclos.impl.users.ProductsAccessor doGetProducts()
AbstractSessionDataProductsAccessordoGetProducts in class AbstractSessionData