Interface NotificationsManager

    • Method Detail

      • notifyFolderSharing

        boolean notifyFolderSharing​(String userIdToNotify,
                                    SocialSharedFolder sharedFolder)
                             throws Exception
        use to notify a user he got a workspace folder shared
        Parameters:
        userIdToNotify - the user you want to notify
        sharedFolder - the shared SocialSharedFolder instance
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyFolderUnsharing

        boolean notifyFolderUnsharing​(String userIdToNotify,
                                      String unsharedFolderId,
                                      String unsharedFolderName)
                               throws Exception
        use to notify a user he got a workspace folder shared
        Parameters:
        userIdToNotify - the user you want to notify
        unsharedFolderId - the unshared folder id
        unsharedFolderName - the unshared folder name
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyAdministratorUpgrade

        boolean notifyAdministratorUpgrade​(String userIdToNotify,
                                           SocialSharedFolder sharedFolder)
                                    throws Exception
        use to notify a user he got upgraded to Administrator of a folder shared
        Parameters:
        userIdToNotify - the user you want to notify
        sharedFolder - the shared SocialSharedFolder instance
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyAdministratorDowngrade

        boolean notifyAdministratorDowngrade​(String userIdToNotify,
                                             SocialSharedFolder sharedFolder)
                                      throws Exception
        use to notify a user he got downgraded from Administrator of a folder shared
        Parameters:
        userIdToNotify - the user you want to notify
        sharedFolder - the shared SocialSharedFolder
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyFolderRenaming

        boolean notifyFolderRenaming​(String userIdToNotify,
                                     String previousName,
                                     String newName,
                                     String renamedFolderId)
                              throws Exception
        use to notify a user he got a workspace folder renamed
        Parameters:
        userIdToNotify - the user you want to notify
        previousName - the previous name of the folder
        newName - the new name of the folder
        renamedFolderId - the folderId
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyFolderAddedUser

        boolean notifyFolderAddedUser​(String userIdToNotify,
                                      SocialSharedFolder sharedFolder,
                                      String newAddedUserId,
                                      org.gcube.vomanagement.usermanagement.UserManager um)
                               throws Exception
        use to notify a user that a new user was added in on of his workspace shared folder
        Parameters:
        userIdToNotify - the user you want to notify
        sharedFolder - the shared SocialSharedFolder instance
        newAddedUserId - the new user that was added
        UserManager - UserManager class instance
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyFolderAddedUsers

        boolean notifyFolderAddedUsers​(String userIdToNotify,
                                       SocialSharedFolder sharedFolder,
                                       List<String> newAddedUserIds,
                                       org.gcube.vomanagement.usermanagement.UserManager um)
                                throws Exception
        use to notify a user that a new user was added in on of his workspace shared folder
        Parameters:
        userIdToNotify - the user you want to notify
        sharedFolder - the shared SocialSharedFolder instance
        newAddedUserIds - List of new users that were added
        UserManager - UserManager class instance
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyFolderRemovedUser

        boolean notifyFolderRemovedUser​(String userIdToNotify,
                                        SocialSharedFolder sharedFolder)
                                 throws Exception
        use to notify a user that an existing user was removed from one of his workspace shared folder
        Parameters:
        userIdToNotify - the user you want to notify
        sharedFolder - the shared SocialSharedFolder
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyAddedItem

        boolean notifyAddedItem​(String userIdToNotify,
                                SocialFileItem item,
                                SocialSharedFolder sharedFolder)
                         throws Exception
        use to notify a user he got a workspace item new in some of his workspace shared folder
        Parameters:
        userIdToNotify - the user you want to notify
        newItem - the new shared SocialFileItem instance
        sharedFolder - the shared folder SocialSharedFolder instance
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyMovedItem

        boolean notifyMovedItem​(String userIdToNotify,
                                SocialFileItem item,
                                SocialSharedFolder sharedFolder)
                         throws Exception
        use to notify a user he got a workspace item deleted from one of his workspace shared folder
        Parameters:
        userIdToNotify - the user you want to notify
        removedItem - the removed item instance of SocialFileItem
        sharedFolder - the shared folder SocialSharedFolder
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyRemovedItem

        boolean notifyRemovedItem​(String userIdToNotify,
                                  String item,
                                  SocialSharedFolder sharedFolder)
                           throws Exception
        use to notify a user he got a workspace item deleted from one of his workspace shared folder
        Parameters:
        userIdToNotify - the user you want to notify
        removedItem - the removed name
        sharedFolder - the shared folder SocialSharedFolder
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyUpdatedItem

        boolean notifyUpdatedItem​(String userIdToNotify,
                                  SocialFileItem item,
                                  SocialSharedFolder sharedFolder)
                           throws Exception
        use to notify a user he got a workspace item updated from one of his workspace shared folder
        Parameters:
        userIdToNotify - the user you want to notify
        updatedItem - the updated shared SocialFileItem
        sharedFolder - the shared folder SocialSharedFolder
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyItemRenaming

        boolean notifyItemRenaming​(String userIdToNotify,
                                   String previousName,
                                   SocialFileItem renamedItem,
                                   SocialSharedFolder rootSharedFolder)
                            throws Exception
        use to notify a user he got a workspace item renamed
        Parameters:
        userIdToNotify - the user you want to notify
        previousName - the previous name of the folder
        renamedItem - the renamed SocialFileItem
        rootSharedFolder - the root shared SocialSharedFolder of the SocialFileItem
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyMessageReceived

        boolean notifyMessageReceived​(String userIdToNotify,
                                      String messageUniqueIdentifier,
                                      String subject,
                                      String messageText,
                                      String... otherRecipientsFullNames)
        Parameters:
        userIdToNotify - the user you want to notify
        messageUniqueIdentifier - the unique identifier of the message
        subject - the subject of the message sent
        messageText - the text of the message (text/plain)
        otherRecipientsFullNames - the Full Names of the other recipients. if any
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyCatalogueEvent

        boolean notifyCatalogueEvent​(org.gcube.portal.databook.shared.NotificationType type,
                                     String userIdToNotify,
                                     String itemId,
                                     String notifyText,
                                     URL url)
                              throws Exception
        use to notify a catalogue moderators someone submitted an item for consideration
        Parameters:
        type - the notification type
        userIdToNotify - the user you want to notify
        itemId - the item unique identifier
        notifyText - the text of the notification
        the - resolver URL pointing to the item
        Returns:
        true if the notification is correctly delivered, false otherwise
        Throws:
        Exception
      • notifyNewCalendarEvent

        boolean notifyNewCalendarEvent​(String userIdToNotify,
                                       String eventTitle,
                                       String eventType,
                                       Date startDate,
                                       Date endingDate)
        Deprecated.
        no longer supported
      • notifyEditedCalendarEvent

        boolean notifyEditedCalendarEvent​(String userIdToNotify,
                                          String eventTitle,
                                          String eventType,
                                          Date startDate,
                                          Date endingDate)
        Deprecated.
        no longer supported
      • notifyDeletedCalendarEvent

        boolean notifyDeletedCalendarEvent​(String userIdToNotify,
                                           String eventTitle,
                                           String eventType,
                                           Date startDate,
                                           Date endingDate)
        Deprecated.
        no longer supported
      • notifyPost

        @Deprecated
        boolean notifyPost​(String userIdToNotify,
                           String postid,
                           String postText,
                           String... hashtags)
        Deprecated.
        use to notify a user that someone created this post
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        postText - the liked post text or a portion of it
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyPost

        boolean notifyPost​(String userIdToNotify,
                           String postid,
                           String postText,
                           Set<String> mentionedVREGroups,
                           Set<String> hashtags)
        use to notify a user that someone created this post
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        postText - the liked post text or a portion of it
        mentionedVREGroups - the names of the mentioned vre's groups, if any
        hashtags - the set of hashtags in the post, if any
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyOwnCommentReply

        boolean notifyOwnCommentReply​(String userIdToNotify,
                                      String postid,
                                      String postText,
                                      String commentKey)
        use to notify a user that someone commented on his post
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        postText - the liked post text or a portion of it
        commentKey - when sending email, stop the shown discussion at that comment
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyCommentReply

        boolean notifyCommentReply​(String userIdToNotify,
                                   String postid,
                                   String postText,
                                   String postOwnerFullName,
                                   String postOwnerId,
                                   String commentKey)
        use to notify a user that commented on a post (Not his) that someone commented too
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        postText - the liked post text or a portion of it
        postOwnerFullName - the full name of the user who created the post
        postOwnerId - the username of the user who created the post
        commentKey - when sending email, stop the shown discussion at that comment
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyCommentOnFavorite

        boolean notifyCommentOnFavorite​(String userIdToNotify,
                                        String postid,
                                        String commentText,
                                        String commentKey)
        Deprecated.
        use notifyCommentOnLike use to notify a user that someone commented on one of his liked posts
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        commentText - the commentText
        commentKey - when sending email, stop the shown discussion at that comment
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyCommentOnLike

        boolean notifyCommentOnLike​(String userIdToNotify,
                                    String postid,
                                    String commentText,
                                    String commentKey)
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        commentText - the commentText
        commentKey - when sending email, stop the shown discussion at that comment
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyUserTag

        boolean notifyUserTag​(String userIdToNotify,
                              String postid,
                              String commentText,
                              String commentKey)
        use to notify a user that he was mentioned (tagged) on a post
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        feedText - the liked feed text or a portion of it
        commentKey - when sending email, stop the shown discussion at that comment
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyLikedFeed

        @Deprecated
        boolean notifyLikedFeed​(String userIdToNotify,
                                String postid,
                                String postText)
        Deprecated.
        use notifyLikedPost
        use to notify a user he got one of his post liked
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        postText - the liked post text or a portion of it
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyLikedPost

        boolean notifyLikedPost​(String userIdToNotify,
                                String postid,
                                String postText)
        use to notify a user he got one of his post liked
        Parameters:
        userIdToNotify - the user you want to notify
        postid - the liked postid
        postText - the liked post text or a portion of it
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyJobStatus

        boolean notifyJobStatus​(String userIdToNotify,
                                org.gcube.portal.databook.shared.RunningJob job)
        use to notify a user he got one of his job finished
        Parameters:
        userIdToNotify - the user you want to notify
        Returns:
        true if the notification is correctly delivered, false otherwise
      • notifyTDMTabularResourceSharing

        boolean notifyTDMTabularResourceSharing​(String userIdToNotify,
                                                String tabularResourceName,
                                                String encodedTabularResourceParams)
                                         throws Exception
        Deprecated.
        no longer supported
        Throws:
        Exception
      • notifyTDMObjectSharing

        boolean notifyTDMObjectSharing​(String userIdToNotify,
                                       org.gcube.portal.databook.shared.NotificationType type,
                                       String tdmObjectName,
                                       String encodedTabularResourceParams)
                                throws Exception
        Deprecated.
        no longer supported
        Throws:
        Exception