|
SAP NetWeaver 7.4 (SP03) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICMIMessage
A text provided by a model and intended to be displayed to an end user.
A message specifies how severe it is, whether it is
related to an object, as well as its lifetime.
Messages can be retrieved from any model entity that implements
ICMIMessageProvider.
For each distinct message requiring display to an end user, one and only one instance of an ICMIMessage should exist. CMI therefore requires, that equality is relevant for ICMIMessage objects. If two messages are equal, message consumers are encouraged to display only one of them. CMI implementations are free to ensure this by overriding equals(Object) and hashCode() or to guarantee unique instances of message objects and rely on the default implementation of equals(Object) and hashCode().
Type Classification:
This interface is part of the Common Model Interface and is intended to be implemented by applications.
| Field Summary | |
|---|---|
static Object[] |
NO_PARAMETERS
|
| Method Summary | |
|---|---|
CMIMessageLifetime |
getLifetime()
Lifetime of this message as described by CMIMessageLifetime. |
String |
getMessageKey()
Returns a key for the (unparameterized) text of message (optional information). |
Object[] |
getParameters()
|
CMIMessageSeverity |
getSeverity()
Severity of this message as described by CMIMessageSeverity. |
String |
getText()
Returns the text part of this message. |
String |
getText(Locale locale,
TimeZone tz)
Expanded text for this message in the given locale and formatted for the given timezone (optional operation). |
String |
getTextPattern()
|
boolean |
isObjectRelated()
Indicates whether at least one of the message providers containing this message can relate it to a model object. |
boolean |
isProcessed()
Whether or not the message already has been processed (displayed). |
boolean |
markAsProcessed()
Marks this message as processed, so that future calls of isProcessed()
return true. |
| Field Detail |
|---|
static final Object[] NO_PARAMETERS
| Method Detail |
|---|
CMIMessageSeverity getSeverity()
CMIMessageLifetime getLifetime()
boolean isObjectRelated()
boolean isProcessed()
boolean markAsProcessed()
isProcessed()
return true. If the processed flag has already been set before calling
this method, false is returned (indicating no change),
true otherwise. Message consumers typically should use this method and its result to check whether they have to process a message or not:
ICMIMessage message = ...
if ( message.markAsProcessed() ) {
// process it as no one has done so before
}
true, if this message has been marked for the first time.String getMessageKey()
null should be
returned The intention behind the key is that a key is stable over time while the text is not/has not to be stable. Applications that must check whether they received a specific message must not check the text, but check the text key instead.
Keys might be structured, but the structure is not defined by CMI. Model implementations must document how their text keys are structured.
String getText()
String getText(Locale locale,
TimeZone tz)
UnsupportedOperationException - if the model type doesn't support localized messages.String getTextPattern()
Object[] getParameters()
| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] FRAMEWORK
|
[sap.com] tc/cm/ejb/api
|
api
|
BC-JAS-EJB
|
[sap.com] FRAMEWORK
|
[sap.com] tc/cmi
|
default
|
BC-WD-JAV-RUN
|
|
SAP NetWeaver 7.4 (SP03) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||