public class BasicNotificationItem extends java.lang.Object implements NotificationItem
NotificationItem
.
Can be used on its own or as extension point for further derivations.Modifier and Type | Field and Description |
---|---|
static java.lang.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,
java.io.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.
|
java.lang.String |
getHttpSessionId()
Get the session this item is destined for.
|
org.json.JSONObject |
getJsonPayload()
Returns null.
|
java.io.Serializable |
getPayload() |
java.lang.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(java.lang.String sessionId)
Set the sessionId (HttpSession.getId() for this notification Item.
|
void |
setPayload(java.io.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) |
java.lang.String |
toString() |
public static final java.lang.String COMMON_TOPIC
public BasicNotificationItem(Application application, Agent agent, OrgUnit dept, java.io.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(java.io.Serializable payload)
payload
- public java.io.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 java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getTopic()
getTopic
in interface NotificationItem
NotificationItem.getTopic()
public org.json.JSONObject getJsonPayload()
getJsonPayload
in interface NotificationItem
NotificationItem.getJsonPayload()
public void setPrivate(boolean isPrivate)
public boolean isPrivate()
public java.lang.String getHttpSessionId()
public void setHttpSessionId(java.lang.String sessionId)
sessionId
- @enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.