Package org.cyclos.impl.messaging
Class NotificationServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.messaging.NotificationServiceImpl
-
- All Implemented Interfaces:
NotificationServiceLocal,NotificationService,Service
@Service public class NotificationServiceImpl extends BaseServiceImpl implements NotificationServiceLocal
-
-
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 NotificationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NotificationsStatusVOgetNotificationsStatus()Returns the notifications status containing the unread/new notifications and the last view date.
The last view date is updated through theUserValidationService.updateUserActivity(org.cyclos.model.users.users.UserActivityType)method with the parameterUserActivityType.NOTIFICATION.NotificationVOload(@NotNull Long id)Loads a vo by idvoidmarkAllRead()Marks as read all the notifications of the logged uservoidmarkAsRead(List<Long> ids)Marks as read the given notification idsprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkvoidremove(Long id)Removes the given notification idvoidremoveAll(Collection<Long> ids)Removes a set of notificationsvoidremoveAll(BasicUser user)Removes all the notifications for this user.Page<NotificationVO>search(NotificationQuery params)Searches for notifications for the logged user-
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, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
getNotificationsStatus
public NotificationsStatusVO getNotificationsStatus()
Description copied from interface:NotificationServiceReturns the notifications status containing the unread/new notifications and the last view date.
The last view date is updated through theUserValidationService.updateUserActivity(org.cyclos.model.users.users.UserActivityType)method with the parameterUserActivityType.NOTIFICATION.- Specified by:
getNotificationsStatusin interfaceNotificationService
-
load
public NotificationVO load(@NotNull @NotNull Long id) throws FrameworkException
Description copied from interface:NotificationServiceLoads a vo by id- Specified by:
loadin interfaceNotificationService- Throws:
FrameworkException
-
markAllRead
public void markAllRead()
Description copied from interface:NotificationServiceMarks as read all the notifications of the logged user- Specified by:
markAllReadin interfaceNotificationService
-
markAsRead
public void markAsRead(List<Long> ids)
Description copied from interface:NotificationServiceMarks as read the given notification ids- Specified by:
markAsReadin interfaceNotificationService
-
remove
public void remove(Long id)
Description copied from interface:NotificationServiceRemoves the given notification id- Specified by:
removein interfaceNotificationService
-
removeAll
public void removeAll(BasicUser user)
Description copied from interface:NotificationServiceLocalRemoves all the notifications for this user.- Specified by:
removeAllin interfaceNotificationServiceLocal
-
removeAll
public void removeAll(Collection<Long> ids)
Description copied from interface:NotificationServiceRemoves a set of notifications- Specified by:
removeAllin interfaceNotificationService
-
search
public Page<NotificationVO> search(NotificationQuery params) throws FrameworkException
Description copied from interface:NotificationServiceSearches for notifications for the logged user- Specified by:
searchin interfaceNotificationService- 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
-
-