|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.MessageList
public class MessageList
A list of Messages.
Message,
Serialized Form| Constructor Summary | |
|---|---|
MessageList()
Creates an empty message list. |
|
MessageList(Message msg)
Creates a message list that contains the given message. |
|
| Method Summary | |
|---|---|
void |
add(Message msg)
Adds the message to the list. |
void |
add(MessageList msgList)
Adds the messages in the given list to this list. |
void |
add(MessageList msgList,
ObjectProperty invalidObjectProperty,
boolean override)
Copies the messages from the given list to this list and sets the message's invalid object properties. |
void |
clear()
Removes all of the messages from this list. |
boolean |
containsErrorMsg()
Returns true if one the messages in the list is an error message, otherwise false. |
static MessageList |
createCopy(MessageList list,
Object oldObject,
Object newObject)
Creates a copy from the message list and replaces all references to the old object with the new object. |
boolean |
equals(Object obj)
|
Message |
getFirstMessage(Severity severity)
Returns the first message with the given severity or null if none is found. |
Message |
getMessage(int index)
Returns the message at the indicated index (indexing starts with 0). |
Message |
getMessageByCode(String code)
Returns the first message in the list that has the specified message code. |
MessageList |
getMessagesByCode(String code)
Returns a new message list containing all the message in this list that have the specified message code. |
MessageList |
getMessagesFor(Object object)
Returns a new list with the messages in this list that belong to the given object (any property). |
MessageList |
getMessagesFor(Object object,
String property)
Returns a new list with the messages in this list that belong to the given object and property. |
MessageList |
getMessagesFor(Object object,
String property,
int index)
Returns a new list with the messages in this list that belong to the given object and property and the property is of the given index. |
int |
getNoOfMessages()
Deprecated. use #size() instead |
Severity |
getSeverity()
Returns the message list's severity. |
String |
getText()
Returns the text of all messages in the list, separated by the system's default line separator. |
int |
hashCode()
|
boolean |
isEmpty()
Returns true if the list is empty. |
Iterator<Message> |
iterator()
Returns an iterator over the messages in this list. |
int |
size()
Returns the number of messages in the list. |
String |
toString()
Returns all messages in the list separated by a line separator. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MessageList()
public MessageList(Message msg)
IllegalArgumentException - if msg is null.| Method Detail |
|---|
public static final MessageList createCopy(MessageList list,
Object oldObject,
Object newObject)
list - the list to copyoldObject - the old object reference that should be replaced.newObject - the object reference to setpublic void add(Message msg)
NullPointerException - if msg is null.public void add(MessageList msgList)
IllegalArgumentException - if msgList is null.
public void add(MessageList msgList,
ObjectProperty invalidObjectProperty,
boolean override)
msgList - the list to copy the messages from.invalidObjectProperty - the object and it's property that the messages refer to.override - true if the invalidObjectProperty should be set in all messages.
false if the invalidObjectProperty is set only for messages that do
not contain any invalid object property information.public boolean isEmpty()
@Deprecated public int getNoOfMessages()
public int size()
public Message getMessage(int index)
IndexOutOfBoundsException - if the index is out of range.public Message getFirstMessage(Severity severity)
public Message getMessageByCode(String code)
public MessageList getMessagesByCode(String code)
null or this list does
contain any message with the given code.
public Severity getSeverity()
public String getText()
public boolean containsErrorMsg()
public MessageList getMessagesFor(Object object)
public MessageList getMessagesFor(Object object,
String property,
int index)
public MessageList getMessagesFor(Object object,
String property)
public Iterator<Message> iterator()
iterator in interface Iterable<Message>public void clear()
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||