com.liferay.portal.notifications
Class UserNotificationManagerImpl
java.lang.Object
com.liferay.portal.notifications.UserNotificationManagerImpl
- All Implemented Interfaces:
- UserNotificationManager
public class UserNotificationManagerImpl
- extends Object
- implements UserNotificationManager
|
Method Summary |
void |
addUserNotificationDefinition(String portletId,
UserNotificationDefinition userNotificationDefinition)
|
void |
addUserNotificationHandler(UserNotificationHandler userNotificationHandler)
Adds the use notification handler to the list of available handlers. |
void |
deleteUserNotificationDefinitions(String portletId)
|
void |
deleteUserNotificationHandler(UserNotificationHandler userNotificationHandler)
|
UserNotificationDefinition |
fetchUserNotificationDefinition(String portletId,
long classNameId,
int notificationType)
|
Map<String,Map<String,UserNotificationHandler>> |
getUserNotificationHandlers()
|
UserNotificationFeedEntry |
interpret(String selector,
UserNotificationEvent userNotificationEvent,
ServiceContext serviceContext)
Creates a human readable user notification feed entry for the user
notification using an available compatible user notification handler. |
boolean |
isDeliver(long userId,
String portletId,
long classNameId,
int notificationType,
int deliveryType)
|
boolean |
isDeliver(long userId,
String selector,
String portletId,
long classNameId,
int notificationType,
int deliveryType,
ServiceContext serviceContext)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserNotificationManagerImpl
public UserNotificationManagerImpl()
addUserNotificationDefinition
public void addUserNotificationDefinition(String portletId,
UserNotificationDefinition userNotificationDefinition)
- Specified by:
addUserNotificationDefinition in interface UserNotificationManager
addUserNotificationHandler
public void addUserNotificationHandler(UserNotificationHandler userNotificationHandler)
- Adds the use notification handler to the list of available handlers.
- Specified by:
addUserNotificationHandler in interface UserNotificationManager
- Parameters:
userNotificationHandler - the user notification handler
deleteUserNotificationDefinitions
public void deleteUserNotificationDefinitions(String portletId)
- Specified by:
deleteUserNotificationDefinitions in interface UserNotificationManager
deleteUserNotificationHandler
public void deleteUserNotificationHandler(UserNotificationHandler userNotificationHandler)
- Specified by:
deleteUserNotificationHandler in interface UserNotificationManager
fetchUserNotificationDefinition
public UserNotificationDefinition fetchUserNotificationDefinition(String portletId,
long classNameId,
int notificationType)
- Specified by:
fetchUserNotificationDefinition in interface UserNotificationManager
getUserNotificationHandlers
public Map<String,Map<String,UserNotificationHandler>> getUserNotificationHandlers()
- Specified by:
getUserNotificationHandlers in interface UserNotificationManager
interpret
public UserNotificationFeedEntry interpret(String selector,
UserNotificationEvent userNotificationEvent,
ServiceContext serviceContext)
throws PortalException
- Creates a human readable user notification feed entry for the user
notification using an available compatible user notification handler.
This method finds the appropriate handler for the user notification by
going through the available handler and asking them if they can handle
the user notidication based on the portlet.
- Specified by:
interpret in interface UserNotificationManager
- Parameters:
userNotificationEvent - the user notification event to be
translated to human readable form
- Returns:
- the user notification feed that is a human readable form of the
user notification record or
null if a compatible
handler is not found
- Throws:
PortalException
isDeliver
public boolean isDeliver(long userId,
String portletId,
long classNameId,
int notificationType,
int deliveryType)
throws PortalException,
SystemException
- Specified by:
isDeliver in interface UserNotificationManager
- Throws:
PortalException
SystemException
isDeliver
public boolean isDeliver(long userId,
String selector,
String portletId,
long classNameId,
int notificationType,
int deliveryType,
ServiceContext serviceContext)
throws PortalException,
SystemException
- Specified by:
isDeliver in interface UserNotificationManager
- Throws:
PortalException
SystemException