Class NotificationContext
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- org.silverpeas.core.notification.user.NotificationContext
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
public class NotificationContext extends HashMap<String,Object>
Context about a user notification. The context a dictionary of notification properties from which a user notification can be built.- Author:
- mmoquillon
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_ID
The predefined key in the context mapped with the unique identifier of a Silverpeas component instance.static String
CONTRIBUTION_ID
The predefined key in the context mapped with the unique identifier of a contribution in Silverpeas.static String
MANUAL
The predefined key in the context mapped with a boolean.static String
NODE_ID
The predefined key in the context mapped with the unique identifier of a node.static String
PUBLICATION_ID
The predefined key in the context mapped with the unique identifier of a publication.static String
RECIPIENT_GROUPS
The predefined key in the context mapped with the list of group identifiers separated by comma.static String
RECIPIENT_USERS
The predefined key in the context mapped with the list of user identifiers separated by comma.static String
RESOURCE_ID
The predefined key in the context mapped with the unique identifier of a resource in Silverpeas.
-
Constructor Summary
Constructors Constructor Description NotificationContext(User sender)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
get(Object key)
boolean
getAsBoolean(String key)
List<String>
getAsList(String key)
String
getComponentId()
String
getContent()
String
getContributionId()
String
getNodeId()
<T> T
getObject(Object key)
String
getPublicationId()
String
getResourceId()
User
getSender()
String
getTitle()
int
hashCode()
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
toString
-
-
-
-
Field Detail
-
COMPONENT_ID
public static final String COMPONENT_ID
The predefined key in the context mapped with the unique identifier of a Silverpeas component instance. This key is used to identify the component instance for which a user notification has to be sent. It is used further in the user selection to filter the users that can access the component instance.- See Also:
- Constant Field Values
-
RESOURCE_ID
public static final String RESOURCE_ID
The predefined key in the context mapped with the unique identifier of a resource in Silverpeas. The mapped resource identifier should be a concat of the type and of the true identifier of the resource. Such a resource can be for example a node within which some contributions are put. If the resource is managed by a given component instance, then the keyCOMPONENT_ID
must be defined. This key is used in the user selection to filter the users that can access the specified resource.- See Also:
- Constant Field Values
-
CONTRIBUTION_ID
public static final String CONTRIBUTION_ID
The predefined key in the context mapped with the unique identifier of a contribution in Silverpeas. If the contribution is managed by a given component instance, then the keyCOMPONENT_ID
must be defined. This key is used by the user notification mechanism to get any attachments of such a contribution in order to automatically indicate them in the notification message. (Those links to attachment can be or not processed by the notification service at the endpoint.)- See Also:
- Constant Field Values
-
PUBLICATION_ID
public static final String PUBLICATION_ID
The predefined key in the context mapped with the unique identifier of a publication. Used to specify the unique identifier of a contribution with attachments. In the case the contributions managed by a Silverpeas component don't have attachments in themselves but another resource mapped with them, this key is a way to specify the identifier of that resource in order to get the attachments to automatically indicate in the notification message. (Those links to attachment can be or not processed by the notification service at the endpoint.)- See Also:
- Constant Field Values
-
NODE_ID
public static final String NODE_ID
The predefined key in the context mapped with the unique identifier of a node. Used to specify the unique identifier of a node or a folder with contributions.- See Also:
- Constant Field Values
-
RECIPIENT_USERS
public static final String RECIPIENT_USERS
The predefined key in the context mapped with the list of user identifiers separated by comma. Used to specify automatically the user receivers of a notification.- See Also:
- Constant Field Values
-
RECIPIENT_GROUPS
public static final String RECIPIENT_GROUPS
The predefined key in the context mapped with the list of group identifiers separated by comma. Used to specify automatically the group receivers of a notification.- See Also:
- Constant Field Values
-
MANUAL
public static final String MANUAL
The predefined key in the context mapped with a boolean. Used to specify a manual notification of not.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NotificationContext
public NotificationContext(User sender)
-
-
Method Detail
-
getComponentId
public String getComponentId()
-
getResourceId
public String getResourceId()
-
getNodeId
public String getNodeId()
-
getPublicationId
public String getPublicationId()
-
getContributionId
public String getContributionId()
-
getTitle
public String getTitle()
-
getContent
public String getContent()
-
getAsBoolean
public boolean getAsBoolean(String key)
-
getSender
public User getSender()
-
getObject
public <T> T getObject(Object key)
-
equals
public boolean equals(Object o)
-
-