Class PublicationFollowerManager
java.lang.Object
com.jalios.jcms.publicationfollower.PublicationFollowerManager
- All Implemented Interfaces:
DBConstants,JPropertiesListener
This class manages PublicationFollower
- Since:
- jcms-7.0.0
- Author:
- Olivier Dedieu
-
Field Summary
FieldsFields inherited from interface com.jalios.jcms.db.DBConstants
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, CLASSIFICATION_LEVEL_FIELD, DBDATA_URID, EXTENDED_READ_RIGHTS, 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_OPAUTHOR, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_READ_ACK, HIBERNATE_MAPPING_READERCOUNT, HIBERNATE_MAPPING_RESTRICTIVE_UPDATE_RIGHTS, 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, OPAUTHOR_ID_FIELD, PSTATUS_FIELD, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKFLOW_ID_FIELD, WORKSPACE_ID_FIELD -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFollower(Publication pub, Member mbr) Adds the given member as follower of the given publication.booleancanFollow(Member mbr, Publication pub) Returns true if the given member can follow the given publication.Returns publications followed by the given member.getFollowerList(Publication pub, boolean searchParents) Returns all the followers of the given publication.static PublicationFollowerManagerintgetPublicationFollowerCount(Publication pub, boolean searchParents) Returns the PublicationFollower count attached to the given publication.getPublicationFollowerList(Publication pub, boolean searchParents) Returns the PublicationFollower list attached to the given publication.booleanReturns true if auto follow is enabled (A member is added to the PublicationFollower of the publication he creates)booleanisFollowed(Publication pub, Member mbr) Returns true if the given publication is followed by the given member.voidnotifyFollowers(Publication pub, Member opAuthor, Map context) Notify all the follower of the given publication.voidnotifyFollowers(Publication pub, Member opAuthor, Map context, boolean searchParents) Notify all the follower of the given publication.voidnotifyFollowers(Publication pub, Member opAuthor, Map context, Publication parent) Notify all the follower of the given publication.voidpropertiesChange(JProperties properties) Invoked after properties have been modified in JCMS and save on disk.voidRemoves all the followers for the given publication.voidremoveFollower(Publication pub, Member mbr) Removes the given members from the followers of the given publication.
-
Field Details
-
PUBLICATION_ID_FIELD
- See Also:
-
PUBLICATION_FOLLOWER_AUTO_ENABLED
- See Also:
-
-
Method Details
-
getInstance
-
propertiesChange
Description copied from interface:JPropertiesListenerInvoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
isAutoFollowEnabled
public boolean isAutoFollowEnabled()Returns true if auto follow is enabled (A member is added to the PublicationFollower of the publication he creates)- Returns:
- true if auto follow is enabled
- Since:
- jcms-9.0.0
-
addFollower
Adds the given member as follower of the given publication.- Parameters:
pub- the publicationmbr- the member- Since:
- jcms-7.0.0
-
removeFollower
Removes the given members from the followers of the given publication.- Parameters:
pub- the publicationmbr- the member- Since:
- jcms-7.0.0
-
removeAllFollowers
Removes all the followers for the given publication.- Parameters:
pub- the publication- Since:
- jcms-7.0.0
-
isFollowed
Returns true if the given publication is followed by the given member.- Parameters:
pub- the publicationmbr- the member- Returns:
- true if the given publication is followed by the given member.
- Since:
- jcms-7.0.0
-
getPublicationFollowerCount
Returns the PublicationFollower count attached to the given publication.- Parameters:
pub- the publicationsearchParents- if true search followers of the (TreeNode) parent of this publication- Returns:
- the PublicationFollower count attached to the given publication.
- Since:
- jcms-8.0.1
-
getPublicationFollowerList
Returns the PublicationFollower list attached to the given publication.- Parameters:
pub- the publicationsearchParents- if true search followers of the (TreeNode) parent of this publication- Returns:
- the PublicationFollower list attached to the given publication.
- Since:
- jcms-7.0.0
-
getFollowerList
Returns all the followers of the given publication.- Parameters:
pub- the publicationsearchParents- if true search followers of the (TreeNode) parent of this publication- Returns:
- all the followers of the given publication.
- Since:
- jcms-7.0.0
-
getFollowedPublicationList
Returns publications followed by the given member.- Parameters:
mbr- the member- Returns:
- publications followed by the given member.
- Since:
- jcms-7.0.0
-
canFollow
Returns true if the given member can follow the given publication.- Parameters:
mbr- the memberpub- the publication- Returns:
- true if the given member can follow the given publication.
- Since:
- jcms-7.0.0
-
notifyFollowers
Notify all the follower of the given publication.- Parameters:
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 notification- Since:
- jcms-7.0.0
-
notifyFollowers
Notify all the follower of the given publication.- Parameters:
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 publication- Since:
- jcms-8.0.1
-
notifyFollowers
Notify all the follower of the given publication.- Parameters:
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 pub- Since:
- jcms-8.0.1
-