public class BasicNotificationItem extends Object implements NotificationItem
NotificationItem
.
Can be used on its own or as extension point for further derivations.Modifier and Type | Field and Description |
---|---|
static String |
COMMON_TOPIC
Topic string which could be used for "generic" NotificationItems
|
Constructor and Description |
---|
BasicNotificationItem()
Public constructor.
|
BasicNotificationItem(Application application,
Agent agent,
OrgUnit dept,
Serializable payload)
Construct a BasicNotificationItem.
|
Modifier and Type | Method and Description |
---|---|
Agent |
getAgent()
The agent the item is to be destined for.
|
Application |
getApplication()
The application of the item.
|
OrgUnit |
getDept()
The department of the item.
|
String |
getHttpSessionId()
Get the session this item is destined for.
|
JSONObject |
getJsonPayload()
Returns null.
|
Serializable |
getPayload() |
String |
getTopic()
Returns null.
|
short |
getType()
Get the type of the NotificationEvent.
|
boolean |
isPrivate()
Check, if an item is for private notification without substitution.
|
void |
setAgent(Agent agent)
Set the items agent.
|
void |
setApplication(Application application)
Sets the items application.
|
void |
setDept(OrgUnit dept) |
void |
setHttpSessionId(String sessionId)
Set the sessionId (HttpSession.getId() for this notification Item.
|
void |
setPayload(Serializable payload)
Set the Object to transport to the clients.
|
void |
setPrivate(boolean isPrivate)
Can be used to designate an item for private notification without substitution ('for your eyes only');
agent must be a User.
|
void |
setType(short type) |
String |
toString() |
public static final String COMMON_TOPIC
public BasicNotificationItem(Application application, Agent agent, OrgUnit dept, Serializable payload)
application
- set items Applicationagent
- the items Agentdept
- the items Orgunitpayload
- the object to transportpublic BasicNotificationItem()
public short getType()
public void setType(short type)
public void setPayload(Serializable payload)
payload
- public Serializable getPayload()
public void setApplication(Application application)
application
- the application to set.public Application getApplication()
NotificationItem
getApplication
in interface NotificationItem
public void setAgent(Agent agent)
agent
- the agent to set.public Agent getAgent()
NotificationItem
Names.EVERYBODY
.getAgent
in interface NotificationItem
public void setDept(OrgUnit dept)
public OrgUnit getDept()
NotificationItem
getDept
in interface NotificationItem
public String getTopic()
getTopic
in interface NotificationItem
NotificationItem.getTopic()
public JSONObject getJsonPayload()
getJsonPayload
in interface NotificationItem
NotificationItem.getJsonPayload()
public void setPrivate(boolean isPrivate)
public boolean isPrivate()
public String getHttpSessionId()
public void setHttpSessionId(String sessionId)
sessionId
- @enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.