public class PublicationFollowerManager extends java.lang.Object implements DBConstants, JPropertiesListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PUBLICATION_FOLLOWER_AUTO_ENABLED |
static java.lang.String |
PUBLICATION_ID_FIELD |
static java.lang.String |
REVISION |
ALL_CATEGORIES_SET_FIELD, ATTACH_WS_SET_FIELD, AUTH_GRP_SET_FIELD, AUTH_MBR_SET_FIELD, AUTHOR_ID_FIELD, CATEGORIES_SET_FIELD, CDATE_FIELD, CHANNEL_JCMSDB_PROP, DBDATA_URID, HAS_ATTACH_WS_FIELD, HAS_NO_READ_RIGHTS, HIBERNATE_MAPPING_ADATE, HIBERNATE_MAPPING_AUTHOR, HIBERNATE_MAPPING_CDATE, HIBERNATE_MAPPING_EDATE, HIBERNATE_MAPPING_HAS_ATTACH_WS, HIBERNATE_MAPPING_HASNOREADRIGHTS, HIBERNATE_MAPPING_MAININSTANCE_ID, HIBERNATE_MAPPING_MAJORVERSION, HIBERNATE_MAPPING_MDATE, HIBERNATE_MAPPING_MERGE_DATE, HIBERNATE_MAPPING_MERGE_ID, HIBERNATE_MAPPING_MINORVERSION, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_READERCOUNT, 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 |
---|---|
void |
addFollower(Publication pub,
Member mbr)
Adds the given member as follower of the given publication.
|
boolean |
canFollow(Member mbr,
Publication pub)
Returns true if the given member can follow the given publication.
|
java.util.List<Publication> |
getFollowedPublicationList(Member mbr)
Returns publications followed by the given member.
|
java.util.List<Member> |
getFollowerList(Publication pub,
boolean searchParents)
Returns all the followers of the given publication.
|
static PublicationFollowerManager |
getInstance() |
int |
getPublicationFollowerCount(Publication pub,
boolean searchParents)
Returns the PublicationFollower count attached to the given publication.
|
java.util.List<PublicationFollower> |
getPublicationFollowerList(Publication pub,
boolean searchParents)
Returns the PublicationFollower list attached to the given publication.
|
boolean |
isAutoFollowEnabled()
Returns true if auto follow is enabled (A member is added to the PublicationFollower of the publication he creates)
|
boolean |
isFollowed(Publication pub,
Member mbr)
Returns true if the given publication is followed by the given member.
|
void |
notifyFollowers(Publication pub,
Member opAuthor,
java.util.Map context)
Notify all the follower of the given publication.
|
void |
notifyFollowers(Publication pub,
Member opAuthor,
java.util.Map context,
boolean searchParents)
Notify all the follower of the given publication.
|
void |
notifyFollowers(Publication pub,
Member opAuthor,
java.util.Map context,
Publication parent)
Notify all the follower of the given publication.
|
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
void |
removeAllFollowers(Publication pub)
Removes all the followers for the given publication.
|
void |
removeFollower(Publication pub,
Member mbr)
Removes the given members from the followers of the given publication.
|
public static final java.lang.String REVISION
public static final java.lang.String PUBLICATION_ID_FIELD
public static final java.lang.String PUBLICATION_FOLLOWER_AUTO_ENABLED
public static PublicationFollowerManager 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 boolean isAutoFollowEnabled()
public void addFollower(Publication pub, Member mbr)
pub
- the publicationmbr
- the memberpublic void removeFollower(Publication pub, Member mbr)
pub
- the publicationmbr
- the memberpublic void removeAllFollowers(Publication pub)
pub
- the publicationpublic boolean isFollowed(Publication pub, Member mbr)
pub
- the publicationmbr
- the memberpublic int getPublicationFollowerCount(Publication pub, boolean searchParents)
pub
- the publicationsearchParents
- if true search followers of the (TreeNode) parent of this publicationpublic java.util.List<PublicationFollower> getPublicationFollowerList(Publication pub, boolean searchParents)
pub
- the publicationsearchParents
- if true search followers of the (TreeNode) parent of this publicationpublic java.util.List<Member> getFollowerList(Publication pub, boolean searchParents)
pub
- the publicationsearchParents
- if true search followers of the (TreeNode) parent of this publicationpublic java.util.List<Publication> getFollowedPublicationList(Member mbr)
mbr
- the memberpublic boolean canFollow(Member mbr, Publication pub)
mbr
- the memberpub
- the publicationpublic void notifyFollowers(Publication pub, Member opAuthor, java.util.Map context)
pub
- the publicationopAuthor
- the author of the publication's operation which triggered this notificationcontext
- the context used in the publication's operation which triggered this notificationpublic void notifyFollowers(Publication pub, Member opAuthor, java.util.Map context, boolean searchParents)
pub
- the publicationopAuthor
- the author of the publication's operation which triggered this notificationcontext
- the context used in the publication's operation which triggered this notificationsearchParents
- if true search followers of the (TreeNode) parent of this publicationpublic void notifyFollowers(Publication pub, Member opAuthor, java.util.Map context, Publication parent)
pub
- the publicationopAuthor
- the author of the publication's operation which triggered this notificationcontext
- the context used in the publication's operation which triggered this notificationparent
- the parent Publication of notified pubCopyright © 2001-2018 Jalios SA. All Rights Reserved.