com.crystaldecisions.sdk.occa.infostore
Interface IFollowable


public interface IFollowable

An interface to support user to follow/unfollow a document related StreamWork feeds

Since:
4.1

Method Summary
 boolean follow(int userID)
          Allow a user to follow the StreamWork topic related to the current document
 java.util.Set getFollowers()
          Returns the IDs of the users who follow the current document To read this value, this object must contain the SI_DOC_FOLLOWERS property.
 java.util.Set getFollowers(IInfoObject parent)
          Returns the IDs of the users who follow the current document To read this value, this object must contain the SI_DOC_FOLLOWERS property.
 boolean hasStreamWorkDiscussion()
           
 boolean unfollow(int userID)
          Stop a user from follow the StreamWork topic related to the current document
 

Method Detail

follow

boolean follow(int userID)
               throws SDKException
Allow a user to follow the StreamWork topic related to the current document

Parameters:
userID - The ID of the user to add to the list of followers
Returns:
true if the user or is successfully added to the followers' list, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_DOC_FOLLOWERS, SI_DOC_UNFOLLOWERS

unfollow

boolean unfollow(int userID)
                 throws SDKException
Stop a user from follow the StreamWork topic related to the current document

Parameters:
userID - The ID of the user to remove from the list of followers.
Returns:
true if the user is successfully removed from the followers list, false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_DOC_FOLLOWERS, SI_DOC_UNFOLLOWERS

getFollowers

java.util.Set getFollowers()
                           throws SDKException
Returns the IDs of the users who follow the current document

To read this value, this object must contain the SI_DOC_FOLLOWERS property.

Returns:
A set of IDs representing users that follow the current document.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_DOC_FOLLOWERS, SI_DOC_UNFOLLOWERS, SI_NEW_JOB_ID

getFollowers

java.util.Set getFollowers(IInfoObject parent)
                           throws SDKException
Returns the IDs of the users who follow the current document

To read this value, this object must contain the SI_DOC_FOLLOWERS property.

This method, compared with the overloaded version without the parent parameter, is more efficient when current object is an instance and the parent contains SI_DOC_FOLLOWERS property bag because it does not require a back query to the CMS to retrieve the inherited follower info

Parameters:
parent - The parent of the current object
Returns:
A set of IDs representing users that follow the current document.
Throws:
SDKException - This is thrown if the process is unsuccessful.
InfoObject properties to query for:
SI_DOC_FOLLOWERS, SI_DOC_UNFOLLOWERS, SI_NEW_JOB_ID

hasStreamWorkDiscussion

boolean hasStreamWorkDiscussion()
Returns:
true if document has a discussion in StreamWorks