com.jalios.jcms.publicationfollower
Class PublicationFollowerManager

java.lang.Object
  extended by com.jalios.jcms.publicationfollower.PublicationFollowerManager
All Implemented Interfaces:
DBConstants

public class PublicationFollowerManager
extends Object
implements DBConstants

This class manages PublicationFollower

Since:
jcms-7.0.0
Author:
Olivier Dedieu

Field Summary
static String PUBLICATION_ID_FIELD
           
static String REVISION
           
 
Fields inherited from interface com.jalios.jcms.db.DBConstants
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_MDATE, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_TITLE, HIBERNATE_MAPPING_WORKFLOW_ID, HIBERNATE_MAPPING_WORKSPACE_ID, MDATE_FIELD, PSTATUS_FIELD, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKFLOW_ID_FIELD, WORKSPACE_ID_FIELD
 
Method Summary
 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.
 List<Publication> getFollowedPublicationList(Member mbr)
          Returns publications followed by the given member.
 List<Member> getFollowerList(Publication pub, boolean searchParents)
          Returns all the followers of the given publication.
static PublicationFollowerManager getInstance()
           
 List<PublicationFollower> getPublicationFollowerList(Publication pub, boolean searchParents)
          Returns the PublicationFollower list attached to the given publication.
 boolean isFollowed(Publication pub, Member mbr)
          Returns true if the given publication is followed by the given member.
 void notifyFollowers(Publication pub, Member opAuthor, Map context)
          Notify all the follower of the given publication.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

PUBLICATION_ID_FIELD

public static final String PUBLICATION_ID_FIELD
See Also:
Constant Field Values
Method Detail

getInstance

public static PublicationFollowerManager getInstance()

addFollower

public void addFollower(Publication pub,
                        Member mbr)
Adds the given member as follower of the given publication.

Parameters:
pub - the publication
mbr - the member
Since:
jcms-7.0.0

removeFollower

public void removeFollower(Publication pub,
                           Member mbr)
Removes the given members from the followers of the given publication.

Parameters:
pub - the publication
mbr - the member
Since:
jcms-7.0.0

removeAllFollowers

public void removeAllFollowers(Publication pub)
Removes all the followers for the given publication.

Parameters:
pub - the publication
Since:
jcms-7.0.0

isFollowed

public boolean isFollowed(Publication pub,
                          Member mbr)
Returns true if the given publication is followed by the given member.

Parameters:
pub - the publication
mbr - the member
Returns:
true if the given publication is followed by the given member.
Since:
jcms-7.0.0

getPublicationFollowerList

public List<PublicationFollower> getPublicationFollowerList(Publication pub,
                                                            boolean searchParents)
Returns the PublicationFollower list attached to the given publication.

Parameters:
pub - the publication
searchParents - 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

public List<Member> getFollowerList(Publication pub,
                                    boolean searchParents)
Returns all the followers of the given publication.

Parameters:
pub - the publication
searchParents - 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

public List<Publication> getFollowedPublicationList(Member mbr)
Returns publications followed by the given member.

Parameters:
mbr - the member
Returns:
publications followed by the given member.
Since:
jcms-7.0.0

canFollow

public boolean canFollow(Member mbr,
                         Publication pub)
Returns true if the given member can follow the given publication.

Parameters:
mbr - the member
pub - the publication
Returns:
true if the given member can follow the given publication.
Since:
jcms-7.0.0

notifyFollowers

public void notifyFollowers(Publication pub,
                            Member opAuthor,
                            Map context)
Notify all the follower of the given publication.

Parameters:
pub - the publication
opAuthor - the author of the publication's operation which triggered this notification
context - the context used in the publication's operation which triggered this notification
Since:
jcms-7.0.0


Copyright © 2001-2010 Jalios SA. All Rights Reserved.