Class FollowListenerService
java.lang.Object
fr.paris.lutece.plugins.extend.modules.follow.service.FollowListenerService
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcancelFollow(String strExtendableResourceType, String strIdExtendableResource, javax.servlet.http.HttpServletRequest request) Notify to listeners canceled follow.static booleancanFollow(String strExtendableResourceType, String strIdExtendableResource, fr.paris.lutece.portal.service.security.LuteceUser user) static voidfollow(String strExtendableResourceType, String strIdExtendableResource, javax.servlet.http.HttpServletRequest request) Notify to listeners new follow.static booleanCheck if there is listeners to notifystatic voidregisterListener(String strExtendableResourceType, IFollowListener listener) Register a comment listener.
-
Method Details
-
registerListener
Register a comment listener.- Parameters:
strExtendableResourceType- The extendable resource type associated with the listener. Use#CONSTANT_EVERY_EXTENDABLE_RESOURCE_TYPEto associated the listener with every resource type.listener- The listener to register
-
hasListener
public static boolean hasListener()Check if there is listeners to notify- Returns:
- True if there is at last one listener, false otherwise
-
follow
public static void follow(String strExtendableResourceType, String strIdExtendableResource, javax.servlet.http.HttpServletRequest request) Notify to listeners new follow. Only listeners associated with the extendable resource type of the comment are notified.- Parameters:
strExtendableResourceType- The extendable resource typestrIdExtendableResource- The extendable resource id of the commentrequest- the HTTP request
-
cancelFollow
public static void cancelFollow(String strExtendableResourceType, String strIdExtendableResource, javax.servlet.http.HttpServletRequest request) Notify to listeners canceled follow. Only listeners associated with the extendable resource type of the comment are notified.- Parameters:
strExtendableResourceType- The extendable resource typestrIdExtendableResource- The extendable resource id of the commentrequest- the HTTP request
-
canFollow
-