public interface RecommendationService extends DriverService
Modifier and Type | Method and Description |
---|---|
void |
addRecommendationToUser(String recommendationId,
String userId) |
String |
generateAnnouncement(int index,
boolean active,
String announcementTitle,
String announcementText,
Date creationDate,
Date expirationDate)
creates a new recommendation of type announcement
|
String |
generateCommunityRecommendation(int index,
boolean active,
String title,
String recommendationText,
Date creationDate,
Date expirationDate,
Set<String> communityIds)
creates a new recommendation of type community
|
eu.dnetlib.domain.functionality.Recommendation |
generateRecommendation(int index,
boolean active,
String title,
String recommendationText,
Date creationDate,
Date expirationDate)
creates a new recommendation
|
String |
generateUserRecommendation(int index,
boolean active,
String title,
String userId,
String recommendationText,
Date creationDate,
Date expirationDate)
creates a new recommendation of type user
|
List<String> |
getAllAnnouncementIds()
retrieves ths ids of all announcements
|
List<eu.dnetlib.domain.functionality.Recommendation> |
getAllAnnouncements()
retrieves the recommendation text of all announcements
|
List<String> |
getAllCommunityRecommendations()
retrieves all recommendations of type community, only the content
|
List<String> |
getAllCommunityRecommendations(String communityId)
retrieves all community recommendation content that are associated with a
community
|
List<eu.dnetlib.domain.functionality.Recommendation> |
getAllCommunityRecommendationsObj()
retrieves all recommendations of type community, the objects
|
List<eu.dnetlib.domain.functionality.Recommendation> |
getAllCommunityRecommendationsObj(String communityId)
retrieves all community recommendation objects that are associated with a
community.
|
List<String> |
getAllUserRecommendations(String userId) |
List<String> |
getAnnouncements()
retrieves the recommendation text of all announcements that haven't
expired
|
List<String> |
getCommunityRecommendations(String communityId) |
List<String> |
getCommunityRecommendationsForUser(String userId)
gets all the community recommendation for a specific user
|
List<eu.dnetlib.domain.functionality.Recommendation> |
getCommunityRecommendationsForUserObj(String userId)
gets all the community recommendation objects for a specific user
|
List<eu.dnetlib.domain.functionality.Recommendation> |
getCommunityRecommendationsObj(String communityId) |
eu.dnetlib.domain.functionality.Recommendation |
getRecommendation(String recommendationId)
retrieves a recommendation
|
List<String> |
getRecommendations(List<String> recommendationIds)
retrieves the recommendation text of a Set of recommendations
|
String |
getRecommendationText(String recommendationId)
retrieves the text of a recommendation
|
void |
removeAnnouncement(String announcementId)
removes a recommendation of type announcement
|
void |
removeCommunityRecommendation(String recommendationId)
removes a recommendation of type community
|
void |
removeRecommendation(String recommendationId)
removes a recommendation
|
void |
removeUserRecommendation(String recommendationId) |
void |
swapAnnouncements(String announcementId1,
String announcementId2)
Swap the index of 2 announcements
|
void |
swapCommunityRecommendations(String announcementId1,
String announcementId2)
Swap the index of 2 community recommendations
|
void |
swapUserRecommendations(String announcementId1,
String announcementId2)
Swap the index of 2 user recommendaitons
|
void |
updateAnnouncement(String announcementId,
int index,
boolean active,
String announcementTitle,
String announcementText,
Date creationDate,
Date expirationDate)
updates an announcement and the corresponding recommendation
|
void |
updateCommunityRecommendation(String recommendationId,
int index,
boolean active,
String title,
String recommendationText,
Date creationDate,
Date expirationDate,
Set<String> communityIds) |
void |
updateRecommendation(String recommendationId,
int index,
boolean active,
String title,
String recommendationText,
Date creationDate,
Date expirationDate)
updates a recommendation
|
identify, notify
String generateAnnouncement(int index, boolean active, String announcementTitle, String announcementText, Date creationDate, Date expirationDate) throws RecommendationServiceException
recommendationText
- the text of the recommendationcreationDate
- the creation date of the announcementexpirationDate
- the date the announcement expiresRecommendationWebServiceException
- if the announcement cannot be createdRecommendationServiceException
void swapAnnouncements(String announcementId1, String announcementId2) throws RecommendationServiceException
announcementId1
- the id of the fist announcementannouncementId2
- the id of the second announcementRecommendationServiceException
void swapUserRecommendations(String announcementId1, String announcementId2) throws RecommendationServiceException
announcementId1
- the id of the fist announcementannouncementId2
- the id of the second announcementRecommendationServiceException
void swapCommunityRecommendations(String announcementId1, String announcementId2) throws RecommendationServiceException
announcementId1
- the id of the fist announcementannouncementId2
- the id of the second announcementRecommendationServiceException
eu.dnetlib.domain.functionality.Recommendation generateRecommendation(int index, boolean active, String title, String recommendationText, Date creationDate, Date expirationDate) throws RecommendationServiceException
index
- the recommendation indexactive
- the state of the recommendaiton, is it active or not #param
title the title of the recommendationrText
- the recommendation textcreationDate
- the date the recommendation was createdexpirationDate
- the date the recommendation expiresRecommendationServiceException
- if the recommendation cannot be createdString generateCommunityRecommendation(int index, boolean active, String title, String recommendationText, Date creationDate, Date expirationDate, Set<String> communityIds) throws RecommendationServiceException
recommendationText
- the recommendation textcreationDate
- expirationDate
- communityId
- the ids of the associated communitiesRecommendationServiceException
- if the community recommendation cannot be createdString generateUserRecommendation(int index, boolean active, String title, String userId, String recommendationText, Date creationDate, Date expirationDate) throws RecommendationServiceException
recommendationText
- creationDate
- expirationDate
- RecommendationServiceException
- if the user recommendation cannot be createdList<String> getAnnouncements() throws RecommendationServiceException
RecommendationServiceException
List<String> getAllAnnouncementIds() throws RecommendationServiceException
RecommendationServiceException
List<eu.dnetlib.domain.functionality.Recommendation> getAllAnnouncements() throws RecommendationServiceException
RecommendationServiceException
List<String> getAllCommunityRecommendations() throws RecommendationServiceException
RecommendationServiceException
List<eu.dnetlib.domain.functionality.Recommendation> getAllCommunityRecommendationsObj() throws RecommendationServiceException
RecommendationServiceException
List<String> getCommunityRecommendations(String communityId) throws RecommendationServiceException
RecommendationServiceException
List<eu.dnetlib.domain.functionality.Recommendation> getCommunityRecommendationsObj(String communityId) throws RecommendationServiceException
RecommendationServiceException
List<String> getAllCommunityRecommendations(String communityId) throws RecommendationServiceException
communityId
- the id of the communityRecommendationServiceException
List<eu.dnetlib.domain.functionality.Recommendation> getAllCommunityRecommendationsObj(String communityId) throws RecommendationServiceException
communityId
- the id of the communityRecommendationServiceException
List<String> getAllUserRecommendations(String userId) throws RecommendationServiceException
RecommendationServiceException
eu.dnetlib.domain.functionality.Recommendation getRecommendation(String recommendationId) throws RecommendationServiceException
recommendationId
- the recommendation idRecommendationServiceException
String getRecommendationText(String recommendationId) throws RecommendationServiceException
recommendationId
- the id of the recommendationRecommendationServiceException
List<String> getRecommendations(List<String> recommendationIds) throws RecommendationServiceException
recommendationIds
- the ids of the recommendationsRecommendationServiceException
void removeRecommendation(String recommendationId) throws RecommendationServiceException
recommendationId
- the id of the recommendationRecommendationServiceException
- if the recommendation does not exist or cannot be updatedvoid removeAnnouncement(String announcementId) throws RecommendationServiceException
announcementId
- the id of the announcementRecommendationServiceException
- if the announcement does not exist or cannot be updatedvoid removeCommunityRecommendation(String recommendationId) throws RecommendationServiceException
recommendationId
- the id of the recommendationcommunityId
- the id of the communityRecommendationServiceException
void removeUserRecommendation(String recommendationId) throws RecommendationServiceException
RecommendationServiceException
void updateRecommendation(String recommendationId, int index, boolean active, String title, String recommendationText, Date creationDate, Date expirationDate) throws RecommendationServiceException
recommendationId
- the id of the recommendationrecommendationText
- the text of the recommendationcreationDate
- the date the recommendation is createdexpirationDate
- the date the recommendation expiresRecommendationServiceException
- if the recommendation does not exist or cannot be updatedvoid updateAnnouncement(String announcementId, int index, boolean active, String announcementTitle, String announcementText, Date creationDate, Date expirationDate) throws RecommendationServiceException
announcementId
- the id of the announcementrecommendationText
- the text of the corresponding recommendationcreationDate
- the creation date of the announcementexpirationDate
- the expiration date of the announcementRecommendationServiceException
- if the announcement recommendation does not exist or cannot
be updatedvoid updateCommunityRecommendation(String recommendationId, int index, boolean active, String title, String recommendationText, Date creationDate, Date expirationDate, Set<String> communityIds) throws RecommendationServiceException
RecommendationServiceException
void addRecommendationToUser(String recommendationId, String userId) throws RecommendationServiceException
RecommendationServiceException
List<String> getCommunityRecommendationsForUser(String userId) throws RecommendationServiceException
RecommendationServiceException
List<eu.dnetlib.domain.functionality.Recommendation> getCommunityRecommendationsForUserObj(String userId) throws RecommendationServiceException
RecommendationServiceException
Copyright © 2020. All rights reserved.