public class RecommendationManager extends java.lang.Object implements RecommendationConstants, DBConstants, JPropertiesListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
ALERT_DOMAIN, ALERT_NAME, CDATE_DESC_FIELD, DATA_ID_FIELD, GROUP_ID_SET_FIELD, GROUP_TABLE_ALIAS, OVERRIDE_ALERT_NAME_PROP, OVERRIDE_MODAL_TEXT_PROP, RECIPIENT_ID_SET_FIELD, RECIPIENT_TABLE_ALIAS, RECOMMENDATION_ALERT_PROP, RECOMMENDATION_ENABLED_PROP, TTCARD_GROUP_REGEXP, VALUE_FIELD
ALL_CATEGORIES_SET_FIELD, AUTH_GRP_SET_FIELD, AUTH_MBR_SET_FIELD, AUTHOR_ID_FIELD, CATEGORIES_SET_FIELD, CDATE_FIELD, CHANNEL_JCMSDB_PROP, DBDATA_URID, HAS_NO_READ_RIGHTS, HIBERNATE_MAPPING_ADATE, HIBERNATE_MAPPING_AUTHOR, HIBERNATE_MAPPING_CDATE, HIBERNATE_MAPPING_EDATE, HIBERNATE_MAPPING_HASNOREADRIGHTS, HIBERNATE_MAPPING_MAJORVERSION, HIBERNATE_MAPPING_MDATE, HIBERNATE_MAPPING_MINORVERSION, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_READERCOUNT, HIBERNATE_MAPPING_ROLEMAPSTR, HIBERNATE_MAPPING_TITLE, HIBERNATE_MAPPING_TRACKED, HIBERNATE_MAPPING_UDATE, HIBERNATE_MAPPING_VOTECOUNT, HIBERNATE_MAPPING_VOTESCORE, HIBERNATE_MAPPING_WORKFLOW_ID, HIBERNATE_MAPPING_WORKSPACE_ID, MAX_HIBERNATE_MAPPING_PUBLICATION, MDATE_FIELD, PSTATUS_FIELD, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKFLOW_ID_FIELD, WORKSPACE_ID_FIELD
Modifier and Type | Method and Description |
---|---|
boolean |
canBeReadBy(Recommendation recommendation,
Member mbr)
Returns true if given Member can read the given Recommendation data
|
boolean |
canBeRecommended(Data data) |
boolean |
canBeRecommendedBy(Data data,
Member mbr) |
void |
deleteAllRecommendation(Data data)
Deletes all the recommendation attached to the given Data.
|
java.lang.String |
getAddRecommendationLink(Data data,
java.lang.String css,
java.lang.String body,
java.lang.String userLang)
Returns the link to add a recommendation on a data
|
java.lang.String |
getAlertName(Data data)
Returns the alert name for a given data, in order to override the default alert name for Recommendation
|
static RecommendationManager |
getInstance() |
java.lang.String |
getModalText(Data data,
java.lang.String userLang)
Returns the alert name for a given data, in order to override the default alert name for Recommendation
|
int |
getReceivedRecommendationCount(Data data,
Member mbr)
Returns the count of Recommendation on given Data that given Member has received ordered by date desc
|
int |
getReceivedRecommendationCount(Member mbr)
Returns the count of Recommendation where given member is a recipient ordered by date desc
|
java.util.Set<Recommendation> |
getReceivedRecommendationSet(Data data,
Member mbr)
Returns the List of Recommendation on given Data, where given member is a recipient ordered by date desc
|
java.util.Set<Recommendation> |
getReceivedRecommendationSet(Data data,
java.util.Set<Member> recipientSet)
Returns the List of Recommendation on given Data, where given member are recipient ordered by date desc
|
java.util.Set<Recommendation> |
getReceivedRecommendationSet(Member mbr)
Returns the List of Recommendation where given member is a recipient ordered by date desc
|
int |
getRecommendationCount(Data data)
Returns the count Recommendation for given Data
|
java.util.List<Recommendation> |
getRecommendationList(Data data)
Returns the List of Recommendation for given Data ordered by date desc
|
int |
getRecommendationReaderTrackingMemberCount(Recommendation recommendation) |
java.util.List<ReaderTracker> |
getRecommendationReaderTrackingMemberSet(Recommendation recommendation)
Returns a List of ReaderTracker which have read the recommendation's Publication yet since the recommendation has been sent
|
int |
getSentRecommendationCount(Data data,
Member mbr)
Returns the count of Recommendation on given Data the given Member has made
|
int |
getSentRecommendationCount(Member mbr)
Returns the count of Recommendation for given Member
|
java.util.List<Recommendation> |
getSentRecommendationList(Data data,
Member mbr)
Returns the List of Recommendation on given Data the given Member has sent ordered by date desc
|
java.util.List<Recommendation> |
getSentRecommendationList(Member mbr)
Returns the List of Recommendation for given Member ordered by date desc
|
int |
getTotalRecipientCount(Recommendation recommendation) |
boolean |
isDataTracked(Recommendation recommendation) |
boolean |
isGroupContainsMember(java.util.Set<Group> groupSet) |
boolean |
isRecommendationEnabled() |
void |
printAddRecommendationLinkEnd(java.lang.StringBuilder sb)
Prints the end of the link for Recommendation
|
void |
printRecommendationLinkStart(java.lang.StringBuilder sb,
Data data,
java.lang.String css,
java.lang.String userLang)
Prints the start of the link for Recommendation
|
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
void |
sendRecommendation(Recommendation recommendation,
boolean isAuthorRecipient)
Sends the given recommendation
|
public static final java.lang.String REVISION
public static RecommendationManager getInstance()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public void sendRecommendation(Recommendation recommendation, boolean isAuthorRecipient)
isAuthorRecipient
- defines if author should receive the recommendation toorecommendation
- the Recommendationpublic java.lang.String getAlertName(Data data)
data
- the Data
public java.lang.String getModalText(Data data, java.lang.String userLang)
data
- the Data
userLang
- the user languagepublic int getRecommendationCount(Data data)
data
- the Data
public java.util.List<Recommendation> getRecommendationList(Data data)
data
- the Data
public int getSentRecommendationCount(Member mbr)
mbr
- the Member
public int getSentRecommendationCount(Data data, Member mbr)
public java.util.List<Recommendation> getSentRecommendationList(Member mbr)
mbr
- the Member
public java.util.List<Recommendation> getSentRecommendationList(Data data, Member mbr)
public int getReceivedRecommendationCount(Data data, Member mbr)
public int getReceivedRecommendationCount(Member mbr)
mbr
- the Member
public java.util.Set<Recommendation> getReceivedRecommendationSet(Member mbr)
mbr
- the Member
public java.util.Set<Recommendation> getReceivedRecommendationSet(Data data, Member mbr)
public java.util.Set<Recommendation> getReceivedRecommendationSet(Data data, java.util.Set<Member> recipientSet)
public int getTotalRecipientCount(Recommendation recommendation)
recommendation
- the Recommendation
public int getRecommendationReaderTrackingMemberCount(Recommendation recommendation)
recommendation
- the Recommendation
public java.util.List<ReaderTracker> getRecommendationReaderTrackingMemberSet(Recommendation recommendation)
recommendation
- the Recommendation
public boolean isGroupContainsMember(java.util.Set<Group> groupSet)
groupSet
- a Set of Group
public boolean canBeRecommended(Data data)
data
- the Data
to recommendpublic boolean canBeReadBy(Recommendation recommendation, Member mbr)
recommendation
- the Recommendation
mbr
- the Member
public boolean isRecommendationEnabled()
public boolean isDataTracked(Recommendation recommendation)
recommendation
- the Recommendation
public void deleteAllRecommendation(Data data)
data
- the Data
public void printRecommendationLinkStart(java.lang.StringBuilder sb, Data data, java.lang.String css, java.lang.String userLang)
sb
- the StringBuilder
data
- the Data
css
- optionnal classname to use in the linkuserLang
- the user languagepublic java.lang.String getAddRecommendationLink(Data data, java.lang.String css, java.lang.String body, java.lang.String userLang)
data
- the Data
css
- optionnal classname to use in the linkbody
- the content in the linkuserLang
- the user languagepublic void printAddRecommendationLinkEnd(java.lang.StringBuilder sb)
sb
- the StringBuilderCopyright © 2001-2010 Jalios SA. All Rights Reserved.