Class AbstractResourceUserNotificationBuilder<T>

    • Constructor Detail

      • AbstractResourceUserNotificationBuilder

        public AbstractResourceUserNotificationBuilder​(T resource)
    • Method Detail

      • isUserCanBeNotified

        protected boolean isUserCanBeNotified​(String userId)
        The access control of the specified user to the resource behind this notification builder is verified. If the resource is a contribution, then the access controllers are used to verify such an access. Otherwise, by default the user can be notified (no access control required).
        Specified by:
        isUserCanBeNotified in class AbstractUserNotificationBuilder
        Parameters:
        userId - the unique identifier of the user.
        Returns:
        true if the user can access the resource. False otherwise.
      • isGroupCanBeNotified

        protected boolean isGroupCanBeNotified​(String groupId)
        The access control of the specified group to the resource behind this notification builder is verified. If the resource is a contribution, then the access controllers are used to verify such an access. Otherwise, by default the users in the group can be notified (no access control required).
        Specified by:
        isGroupCanBeNotified in class AbstractUserNotificationBuilder
        Parameters:
        groupId - the unique identifier of the group of users.
        Returns:
        true if the group can access the resource. False otherwise.
      • performBuild

        protected abstract void performBuild​(T resource)
      • performNotificationResource

        protected void performNotificationResource​(T resource)
      • performNotificationResource

        protected abstract void performNotificationResource​(T resource,
                                                            NotificationResourceData notificationResourceData)
      • getResourceURL

        protected String getResourceURL​(T resource)
      • isSendImmediately

        protected boolean isSendImmediately()
        Description copied from class: AbstractUserNotificationBuilder
        Is the notification to build has to be sent immediately? If no, then its sending will be delayed according to the preferences of the users.
        Overrides:
        isSendImmediately in class AbstractUserNotificationBuilder
        Returns:
        true if the notification to build has to be sent immediately.
      • getResource

        protected final T getResource()
      • setResource

        protected final void setResource​(T resource)