Package org.cyclos.impl.access
Class GuestSessionData
- java.lang.Object
-
- org.cyclos.impl.access.AbstractSessionData
-
- org.cyclos.impl.access.GuestSessionData
-
- All Implemented Interfaces:
RoleContainer,DelegatingUserPrincipal,SessionData,UserPrincipal
public class GuestSessionData extends AbstractSessionData
Session data for guest users
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.impl.access.AbstractSessionData
AbstractSessionData.SessionDataChannelAccessAccessor
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.access.AbstractSessionData
requestData
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckConsistency()Checks for consistency.protected LongdoGetConfigurationId()protected ProductsAccessordoGetProducts()Must be implemented to return a a validProductsAccessorprotected SessionDataSubjectIddoGetSubjectId()protected booleandoHasPermission(Permission permission)StringgetAccessChannelName()Returns the internal name of the original channel (i.e the channel used to access Cyclos) .AccessClientgetAccessClient()Set<BasicGroup>getAccessibleBasicGroups()Returns the basic groups accessible by the current sessionUserAuthVOgetAuthenticatedUser()Returns the user authentication data, or null if noneStringgetChannelName()Returns the internal name of the current channel.GroupgetGroup()Returns the group of the authenticated user, if anyBasicUsergetLoggedBasicUser()Returns the authenticated basic user, or null if nonePrincipalTypegetPrincipalType()LonggetPublicRegisteredUserId()booleanhasRequiredValue(Permission permission, Object value)Returns whether the current user has access to the given required value for the given permissionbooleanisGuest()Returns whether the current session represents a guestbooleanisVisible(EntityCheck<SimpleEntity> entityCheck, SimpleEntity entity)Returns whether the given entity is visible under the given entity checkbooleanmanages(BasicUser user)Returns whether the current user manages the given user.booleanrelatesTo(BasicUser basicUser)Returns whether the current user is related to (is allowed to view) the given uservoidsetPublicRegisteredUserId(Long publicRegisteredUserId)StringtoString()-
Methods inherited from class org.cyclos.impl.access.AbstractSessionData
bean, doGetConfigurationAccessor, doGetPreferredLocales, getAccessChannel, getAccessToken, getAccount, getApplicationContext, getBasicUser, getChannel, getChannelAccessAccessor, getChannelConfiguration, getChannelSettingsAccessor, getConfiguration, getConfigurationEntity, getCustomFieldValue, getIdentityProvider, getLoggedOperator, getLoggedUser, getMobilePhone, getNetwork, getPin, getPrincipal, getProducts, getRawEntityManagerHandler, getRemoteAddress, getRequestData, getSession, getSubjectId, getToken, getTrustedDevice, hasPermission, isAdmin, isAdminOf, isAliasOperator, isBroker, isBrokerOf, isGlobalAdmin, isGlobalAdminInNetwork, isLoggedIn, isManagerOf, isMember, isMemberOnly, isMultiNetworkAdminInGlobalMode, isNetworkAdmin, isOperator, isOwnerOf, isRestrictedOperator, isScript, isSystem, isTrusted, isUserManager, resolveNetworkId, runAsSystem, runAsSystem
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.impl.access.DelegatingUserPrincipal
getDelegate
-
Methods inherited from interface org.cyclos.impl.access.SessionData
hasPermission, isRest
-
-
-
-
Method Detail
-
checkConsistency
public void checkConsistency() throws InvalidSessionDataExceptionDescription copied from interface:SessionDataChecks for consistency. Called before invoking a service method, as system- Specified by:
checkConsistencyin interfaceSessionData- Overrides:
checkConsistencyin classAbstractSessionData- Throws:
InvalidSessionDataException
-
getAccessChannelName
public String getAccessChannelName()
Description copied from interface:SessionDataReturns the internal name of the original channel (i.e the channel used to access Cyclos) . Must be accessible outside transactions.
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal- Overrides:
getAccessClientin classAbstractSessionData
-
getAccessibleBasicGroups
public Set<BasicGroup> getAccessibleBasicGroups()
Description copied from interface:SessionDataReturns the basic groups accessible by the current session
-
getAuthenticatedUser
public UserAuthVO getAuthenticatedUser()
Description copied from interface:SessionDataReturns the user authentication data, or null if none
-
getChannelName
public String getChannelName()
Description copied from interface:SessionDataReturns the internal name of the current channel. Must be accessible outside transactions.
-
getGroup
public Group getGroup()
Description copied from interface:SessionDataReturns the group of the authenticated user, if any
-
getLoggedBasicUser
public BasicUser getLoggedBasicUser()
Description copied from interface:SessionDataReturns the authenticated basic user, or null if none
-
getPrincipalType
public PrincipalType getPrincipalType()
- Specified by:
getPrincipalTypein interfaceUserPrincipal- Overrides:
getPrincipalTypein classAbstractSessionData
-
getPublicRegisteredUserId
public Long getPublicRegisteredUserId()
-
hasRequiredValue
public boolean hasRequiredValue(Permission permission, Object value)
Description copied from interface:SessionDataReturns whether the current user has access to the given required value for the given permission
-
isGuest
public boolean isGuest()
Description copied from interface:SessionDataReturns whether the current session represents a guest- Specified by:
isGuestin interfaceSessionData- Overrides:
isGuestin classAbstractSessionData
-
isVisible
public boolean isVisible(EntityCheck<SimpleEntity> entityCheck, SimpleEntity entity)
Description copied from interface:SessionDataReturns whether the given entity is visible under the given entity check
-
manages
public boolean manages(BasicUser user)
Description copied from interface:SessionDataReturns whether the current user manages the given user. If the logged user and the given one are the same user then it returns true.
-
relatesTo
public boolean relatesTo(BasicUser basicUser)
Description copied from interface:SessionDataReturns whether the current user is related to (is allowed to view) the given user
-
setPublicRegisteredUserId
public void setPublicRegisteredUserId(Long publicRegisteredUserId)
-
doGetConfigurationId
protected Long doGetConfigurationId()
- Specified by:
doGetConfigurationIdin classAbstractSessionData
-
doGetProducts
protected ProductsAccessor doGetProducts()
Description copied from class:AbstractSessionDataMust be implemented to return a a validProductsAccessor- Specified by:
doGetProductsin classAbstractSessionData
-
doGetSubjectId
protected SessionDataSubjectId doGetSubjectId()
- Specified by:
doGetSubjectIdin classAbstractSessionData
-
doHasPermission
protected boolean doHasPermission(Permission permission)
- Specified by:
doHasPermissionin classAbstractSessionData
-
-