Package org.cyclos.impl.users
Class ConnectedUserServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.users.ConnectedUserServiceImpl
-
- All Implemented Interfaces:
ConnectedUserServiceLocal,Service,ConnectedUserService
@Service public class ConnectedUserServiceImpl extends BaseServiceImpl implements ConnectedUserServiceLocal
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description ConnectedUserServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountConnectedUsers(Role role)Counts visible connected users with the given roleintdisconnect(UserLocatorVO locator)Disconnects the given user.intdisconnectBySessionTokens(Set<String> tokens)Removes all sessions with the given tokens, returning the number of sessions actually removedintdisconnectUserAndOperators(User user)Disconnects a user and all his operatorsConnectedUserSearchDatagetSearchData()Returns data for searching connected usersbooleanisOnline(BasicUser user)checks if this user is online.voidnotifySessionsOfPermissionChange(ProductOwner productOwner)Notify each session belonging to the given user or group that the permissions have changedprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkPage<ConnectedUserVO>search(ConnectedUserQuery params)Searches users connected to the application-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
countConnectedUsers
public int countConnectedUsers(Role role)
Description copied from interface:ConnectedUserServiceLocalCounts visible connected users with the given role- Specified by:
countConnectedUsersin interfaceConnectedUserServiceLocal
-
disconnect
public int disconnect(UserLocatorVO locator) throws FrameworkException
Description copied from interface:ConnectedUserServiceDisconnects the given user. Returns the number of sessions actually removed- Specified by:
disconnectin interfaceConnectedUserService- Throws:
FrameworkException
-
disconnectBySessionTokens
public int disconnectBySessionTokens(Set<String> tokens) throws FrameworkException
Description copied from interface:ConnectedUserServiceRemoves all sessions with the given tokens, returning the number of sessions actually removed- Specified by:
disconnectBySessionTokensin interfaceConnectedUserService- Throws:
FrameworkException
-
disconnectUserAndOperators
public int disconnectUserAndOperators(User user)
Description copied from interface:ConnectedUserServiceLocalDisconnects a user and all his operators- Specified by:
disconnectUserAndOperatorsin interfaceConnectedUserServiceLocal
-
getSearchData
public ConnectedUserSearchData getSearchData() throws FrameworkException
Description copied from interface:ConnectedUserServiceReturns data for searching connected users- Specified by:
getSearchDatain interfaceConnectedUserService- Throws:
FrameworkException
-
isOnline
public boolean isOnline(BasicUser user)
Description copied from interface:ConnectedUserServiceLocalchecks if this user is online.- Specified by:
isOnlinein interfaceConnectedUserServiceLocal- Returns:
trueif the user is the LoggedUser;falseif the loggedUser has no permission to view who's online; for other users it returns true if the requested user has a session which is not yet expired.
-
notifySessionsOfPermissionChange
public void notifySessionsOfPermissionChange(ProductOwner productOwner)
Description copied from interface:ConnectedUserServiceLocalNotify each session belonging to the given user or group that the permissions have changed- Specified by:
notifySessionsOfPermissionChangein interfaceConnectedUserServiceLocal
-
search
public Page<ConnectedUserVO> search(ConnectedUserQuery params) throws FrameworkException
Description copied from interface:ConnectedUserServiceSearches users connected to the application- Specified by:
searchin interfaceConnectedUserService- Throws:
FrameworkException
-
registerNetworkMappings
protected void registerNetworkMappings(NetworkPathRegistry networkPathRegistry)
Description copied from class:BaseServiceImplNeeds to be overridden by subclasses to register the path up to the network- Specified by:
registerNetworkMappingsin classBaseServiceImpl
-
-