public abstract class AbstractNotification extends Object implements ICustomNotification
Changes between major releases 7.0 and 7.X Added methods: public String getSubject(IRecipient recipient, IChannel channel, Properties properties); Copyright 2004 SAP AG
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CONFIG_FORMAT_TAG
configuration tag: the format (e.g.
|
protected static String |
CONFIG_TEMPLATES_DEFAULT
configuration default: the default notificator's template directory.
|
protected static String |
CONFIG_TEMPLATES_TAG
configuration tag: notificator's template directory.
|
protected IResourceContext |
m_Context
the context to use for the producers.
|
protected String |
m_ID
unique system ID for this notification event
|
protected static String |
SUBJECT_FORMAT
the subject format is always plain text.
|
protected static String |
SUBJECT_TEMPLATE
use this template for the subject.
|
protected static String |
XMLSUFFIX
XML file suffix.
|
protected static String |
XSLSUFFIX
XSL file suffix.
|
| Constructor and Description |
|---|
AbstractNotification(String id,
IResourceContext context)
Create a notification for a given system ID.
|
| Modifier and Type | Method and Description |
|---|---|
IContent |
getContent(IRecipient recipient,
IChannel channel,
Properties properties)
Get the content (depending on recipient and channel).
|
String |
getDescription()
Get a displayable name (title).
|
String |
getDescription(Locale locale)
Get a displayable name (title) for a specific locale.
|
String |
getDescription(Locale locale,
Object obj1) |
String |
getFromAddress(IChannel channel)
Get the 'from' address for a specific channel.
|
String |
getID()
Get a system id for this notification.
|
protected Properties |
getProperties(IRecipient recipient,
IChannel channel,
Properties properties)
Get the properties to pass to the pipeline.
|
String |
getSubject(IRecipient recipient,
IChannel channel,
Properties properties)
Get the subject line (depending on recipient, channel and properties).
|
protected IProducer |
getXmlProducer(IResourceFactory factory,
RID xmlRID)
Get the XML producer for feeding the pipeline.
|
protected RID |
getXmlRID(IResourceFactory factory,
String templates,
IRecipient recipient)
Get the URI to use for the XML by trying several locale-specific URI-s.
|
protected IProducer |
getXslProducer(IResourceFactory factory,
RID xslRID)
Get the XSL producer for feeding the pipeline.
|
protected RID |
getXslRID(IResourceFactory factory,
String templates,
IChannel channel)
Get the URI to use for the XSL by trying a channel-specific URI first.
|
protected static final String CONFIG_TEMPLATES_TAG
protected static final String CONFIG_TEMPLATES_DEFAULT
protected static final String CONFIG_FORMAT_TAG
protected static final String XMLSUFFIX
protected static final String XSLSUFFIX
protected static final String SUBJECT_TEMPLATE
protected static final String SUBJECT_FORMAT
protected String m_ID
protected IResourceContext m_Context
public AbstractNotification(String id, IResourceContext context)
id - a String with the system notification type.context - a IResourceContext with the context to use for
the notification.protected RID getXmlRID(IResourceFactory factory, String templates, IRecipient recipient) throws WcmException
factory - the IResourceFactory to use for getting the
resource.templates - a String with the name of the notificator's
template directory.recipient - the IRecipient to get the XML for.RID of the XML.WcmException - Exception raised in failure situationprotected RID getXslRID(IResourceFactory factory, String templates, IChannel channel) throws WcmException
factory - the IResourceFactory to use for getting the
resource.templates - a String with the name of the notificator's
template directory.channel - the IChannel to get the XSL for.RID of the XSL.WcmException - Exception raised in failure situationprotected IProducer getXmlProducer(IResourceFactory factory, RID xmlRID) throws WcmException
factory - the IResourceFactory to get resources from.xmlRID - a RID of the XML.IProducer for the XML.WcmException - Exception raised in failure situationprotected IProducer getXslProducer(IResourceFactory factory, RID xslRID) throws WcmException
factory - the ResourceFactory to get resources from.xslRID - a RID of the XSL.IProducer for the XSL.WcmException - Exception raised in failure situationprotected Properties getProperties(IRecipient recipient, IChannel channel, Properties properties)
recipient - the IRecipient which will get the message.channel - the IChannel which will be used for sending the
message.properties - the Properties from the notificator config.Properties to pass to the pipeline for adding to
the XML-/XSL-output.public String getID()
INotificationsubscription
' for a subscription notification.getID in interface INotificationString is the system id.public String getDescription()
INotificationgetDescription in interface INotificationString is the displayable name.public String getDescription(Locale locale)
INotificationgetDescription in interface INotificationlocale - a Locale defining the language to get the description
for.String is the displayable name for the given locale.public String getFromAddress(IChannel channel)
INotificationgetFromAddress in interface INotificationchannel - a IChannel with the channel to get the from
address for.String with from address for the given channel.public IContent getContent(IRecipient recipient, IChannel channel, Properties properties) throws WcmException
INotificationgetContent in interface INotificationrecipient - a IRecipient to send the notification to.channel - a IChannel to use to send the notification.properties - a Properties needed to construct the notification.IContent is the content, which should depend on the
specified channel and the given recipient (e.g. content can differ for
WAP- and eMail-channels, or it may depend on the receivers locale).WcmException - Exception raised in failure situationpublic String getSubject(IRecipient recipient, IChannel channel, Properties properties) throws WcmException
ICustomNotificationgetSubject in interface ICustomNotificationrecipient - a IRecipient to send the notification to.channel - a IChannel to use to send the notification.properties - a Properties needed to construct the notification.WcmException - Exception raised in failure situation| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2021 SAP SE Complete Copyright Notice