Interface NotificationSettingsServiceLocal

    • Method Detail

      • appendAccountSettingsValidations

        void appendAccountSettingsValidations​(BasicUser owner,
                                              Property property)
        Appends validations of account settings according to the given owner
      • getNotificationTypeSettings

        NotificationTypeSettingsDTO getNotificationTypeSettings​(Notification notification)
        Returns the notifications settings for an already generated notification.
        This method never return null, if the user hasn't saved his preferences it creates a default one.
      • isAllowedNotificationType

        boolean isAllowedNotificationType​(AdminNotificationType type,
                                          User user,
                                          Object option)
        It checks if the user has the Permission.MY_NOTIFICATIONS_ENABLE permission and is allowed to be notified by the specified type and the selected option. It assumes the user has selected being notified by the specified type
        For example: if type is AdminNotificationType.PAYMENT_PERFORMED (option must be a TransferTypeVO) then this method will return true if that TT is contained in the available TT list.
        Parameters:
        type - the notification type to be checked
        user - the user to check if he/she is allowed to be notified
        option - (optional) the selected option to be notified by (chosen by the user). If it's null this method only checks if there are any available options.
        Returns:
        true if the user can be notified.
      • isEnabled

        boolean isEnabled​(UserNotificationType type,
                          BasicUser user,
                          SimpleEntity entity)
        It returns true if the notification type is enabled by permission and if the user had selected being notified by that type. The given entity is the one that triggered the notification, such as the performed payment, or the assigned broker.
      • isPaymentAmountInRange

        boolean isPaymentAmountInRange​(BasicUser user,
                                       UserAccountType accountType,
                                       BigDecimal amount)
        Returns whether the given amount is included in the payment amount range the given user has set for payments from / to the given account type
      • usersToForwardMessageIterator

        com.mysema.commons.lang.CloseableIterator<BasicUser> usersToForwardMessageIterator​(IncomingMessage message)
        It returns an iterator over all users allowed to forward the corresponding incoming message.