public class CommentListenerService extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSTANT_EVERY_EXTENDABLE_RESOURCE_TYPE
Constant that represents every extendable resource type
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canComment(fr.paris.lutece.portal.service.security.LuteceUser user,
String strIdExtendableResource,
String strExtendableResourceType)
Check if a user can comment.
|
static String |
checkComment(String comment,
String strExtendableResourceType,
String uidUser)
Notify the check comment
|
static String |
checkComment(String comment,
String strExtendableResourceType,
String strResourceId,
String uidUser)
Notify the check comment
|
static void |
createComment(String strExtendableResourceType,
String strIdExtendableResource,
boolean bPublished)
Notify to listeners the creation of a comment.
|
static void |
createComment(String strExtendableResourceType,
String strIdExtendableResource,
boolean bPublished,
javax.servlet.http.HttpServletRequest request)
Notify to listeners the creation of a comment.
|
static void |
deleteComment(String strExtendableResourceType,
String strIdExtendableResource,
List<Integer> listIdRemovedComment)
Notify to listeners the modification of a comment.
|
static boolean |
hasListener()
Check if there is listeners to notify
|
static void |
publishComment(int nIdComment,
boolean bPublished)
Notify to listeners the modification of a comment.
|
static void |
publishComment(String strExtendableResourceType,
String strIdExtendableResource,
boolean bPublished)
Notify to listeners the modification of a comment.
|
static void |
registerListener(String strExtendableResourceType,
ICommentListener listener)
Register a comment listener.
|
public static final String CONSTANT_EVERY_EXTENDABLE_RESOURCE_TYPE
public static void registerListener(String strExtendableResourceType, ICommentListener listener)
strExtendableResourceType - The extendable resource type associated
with the listener. Use
CONSTANT_EVERY_EXTENDABLE_RESOURCE_TYPE to associated
the listener with every resource type.listener - The listener to registerpublic static boolean hasListener()
public static void createComment(String strExtendableResourceType, String strIdExtendableResource, boolean bPublished)
strExtendableResourceType - The extendable resource type of the
created commentstrIdExtendableResource - The extendable resource id of the commentbPublished - True if the comment is published, false otherwisepublic static void createComment(String strExtendableResourceType, String strIdExtendableResource, boolean bPublished, javax.servlet.http.HttpServletRequest request)
strExtendableResourceType - The extendable resource type of the
created commentstrIdExtendableResource - The extendable resource id of the commentbPublished - True if the comment is published, false otherwiserequest - the HTTP requestpublic static void publishComment(int nIdComment,
boolean bPublished)
nIdComment - The id of the updated commentbPublished - True if the comment was published, false if it was
unpublishedpublic static void publishComment(String strExtendableResourceType, String strIdExtendableResource, boolean bPublished)
strExtendableResourceType - The extendable resource type of the
updated commentstrIdExtendableResource - The extendable resource id of the commentbPublished - True if the comment was published, false if it was
unpublishedpublic static void deleteComment(String strExtendableResourceType, String strIdExtendableResource, List<Integer> listIdRemovedComment)
strExtendableResourceType - The extendable resource type of the
removed commentstrIdExtendableResource - The extendable resource id of the commentlistIdRemovedComment - The list of ids of removed commentspublic static String checkComment(String comment, String strExtendableResourceType, String uidUser)
listErrors - public static String checkComment(String comment, String strExtendableResourceType, String strResourceId, String uidUser)
listErrors - public static boolean canComment(fr.paris.lutece.portal.service.security.LuteceUser user,
String strIdExtendableResource,
String strExtendableResourceType)
user - The lutece userstrIdExtendableResource - The id of the extendable resourcestrExtendableResourceType - The type of the resourceCopyright © 2019 City of Paris. All rights reserved.