com.sap.tc.cmi.messages

Interface ICMIMessageProvider


public interface ICMIMessageProvider

Provides model messages to a model consumer; this is only a preliminary version of the interface and might change after AP4.

If an ICMIMessageProvider does not retrieve ALL messages, but defines a subscope, then it must reference a @{link #getParent() parent provider}, which is of a more global scope. This means, that if an ICMIMessageProvider does not have a parent, then that MessageProvider is the “global� MessageProvider, which is capable of providing ALL messages, of any type or severity. A parent of a provider must In generall, calling a method on the parent should have the same effect as if calling the same method on the child - if the message is handled by the child. A parent most probably will be capable to answer questions for more messages as its childs.


Method Summary
 ICMIMessageList getMessages()
          Returns a list of all messages currently known to this provider.
 ICMIMessageList getMessagesRelatedToObject(ICMIModelClass modelObject)
           
 ICMIMessageList getMessagesRelatedToObjectAndProperty(ICMIModelClass modelObject, ICMIModelClassPropertyInfo propertyInfo)
           
 ICMIMessageList getMessagesRelatedToObjectAndProperty(ICMIModelClass modelObject, String propertyName)
          Deprecated. don't use. Will be removed after AP4.
 ICMIMessageList getMessagesRelatedToObjectAndProperty(Object modelObject, String propertyName)
           
 ICMIMessageProvider getParent()
          Returns the parent of this message provider or null if this provider has no parent.
 boolean isMessageRelatedToObject(ICMIMessage message, ICMIModelClass modelObject)
           
 boolean isMessageRelatedToObject(ICMIMessage message, Object modelObject)
          Returns true, if the given message is handled by this provider (or one of its children) and if the message is related to the given object.
 boolean isMessageRelatedToObjectAndProperty(ICMIMessage message, ICMIModelClass modelObject, ICMIModelClassPropertyInfo property)
          Returns true, if the given message is handled by this provider (or one of its children) and if the message is related to the given object and property.
 boolean isMessageRelatedToObjectAndProperty(ICMIMessage message, ICMIModelClass modelObject, String propertyName)
          Deprecated. don't use. Will be removed after AP4
 boolean isMessageRelatedToObjectAndProperty(ICMIMessage message, Object modelObject, String propertyName)
          Returns true, if the given message is handled by this provider (or one of its children) and if the message is related to the given object and property.
 void resetOrDeleteAllProcessed()
          Does the final processing of all messages in a processing trip.
 

Method Detail

getParent

ICMIMessageProvider getParent()
Returns the parent of this message provider or null if this provider has no parent. See class documentation for a description of the contract between a provider and its parent.


getMessages

ICMIMessageList getMessages()
Returns a list of all messages currently known to this provider. A provider is free to return any already processed messages.


getMessagesRelatedToObject

ICMIMessageList getMessagesRelatedToObject(ICMIModelClass modelObject)

getMessagesRelatedToObjectAndProperty

ICMIMessageList getMessagesRelatedToObjectAndProperty(ICMIModelClass modelObject,
                                                      String propertyName)
Deprecated. don't use. Will be removed after AP4.


getMessagesRelatedToObjectAndProperty

ICMIMessageList getMessagesRelatedToObjectAndProperty(Object modelObject,
                                                      String propertyName)

getMessagesRelatedToObjectAndProperty

ICMIMessageList getMessagesRelatedToObjectAndProperty(ICMIModelClass modelObject,
                                                      ICMIModelClassPropertyInfo propertyInfo)

isMessageRelatedToObject

boolean isMessageRelatedToObject(ICMIMessage message,
                                 ICMIModelClass modelObject)

isMessageRelatedToObject

boolean isMessageRelatedToObject(ICMIMessage message,
                                 Object modelObject)
Returns true, if the given message is handled by this provider (or one of its children) and if the message is related to the given object. Note: This method is intended for use with typed models that don't implement any of the CMI interfaces for model classes and which typically don't provide runtime metadata.


isMessageRelatedToObjectAndProperty

boolean isMessageRelatedToObjectAndProperty(ICMIMessage message,
                                            ICMIModelClass modelObject,
                                            String propertyName)
Deprecated. don't use. Will be removed after AP4


isMessageRelatedToObjectAndProperty

boolean isMessageRelatedToObjectAndProperty(ICMIMessage message,
                                            Object modelObject,
                                            String propertyName)
Returns true, if the given message is handled by this provider (or one of its children) and if the message is related to the given object and property. Note: This method is intended for use with typed models that don't implement any of the CMI interfaces for model classes and which typically don't provide runtime metadata.


isMessageRelatedToObjectAndProperty

boolean isMessageRelatedToObjectAndProperty(ICMIMessage message,
                                            ICMIModelClass modelObject,
                                            ICMIModelClassPropertyInfo property)
Returns true, if the given message is handled by this provider (or one of its children) and if the message is related to the given object and property. Note: This method is intended for use with models that have a generic CMI runtime and therefore implement the CMI interfaces for model classes and provide runtime metadata.


resetOrDeleteAllProcessed

void resetOrDeleteAllProcessed()
Does the final processing of all messages in a processing trip. If a message is not marked as processed, it is not touched. If it is processed and has lifetime DISPLAY_ONCE, it is deleted (as it has been processed(=displayed) once). For remaining messages, the processed flag is reset, so that they will be processed again in the next cycle.



Copyright 2009 SAP AG Complete Copyright Notice