Dashboard Builder Commons 6.0.0.CR2

org.jboss.dashboard.commons.message
Class MessageList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by org.jboss.dashboard.commons.message.MessageList
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess

public class MessageList
extends ArrayList

A list of messages.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
MessageList()
           
MessageList(Collection c)
           
 
Method Summary
 boolean addAll(Collection c, boolean discardDuplicates)
           
 boolean containsMessagesOfType(int type)
           
 Date getCreationDate()
           
 List getMessagesForElement(Object element)
          Retrieves from the list of messages those elements that produces the specified message code.
 List getMessagesOfType(int type)
           
 String[] getMessagesOfTypeForElement(Object element, int type)
          Method that looks up the messages of the specified type for the specified element, and returns them in a String[].
 List getMessagesWithCode(String messageCode)
          Retrieves from the list of messages those elements that produces the specified message code.
 boolean hasErrors()
           
 void keepOnlyMessagesOfType(int type)
           
 void removeMessagesOfType(int type)
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

MessageList

public MessageList()

MessageList

public MessageList(Collection c)
Method Detail

getCreationDate

public Date getCreationDate()

addAll

public boolean addAll(Collection c,
                      boolean discardDuplicates)

getMessagesWithCode

public List getMessagesWithCode(String messageCode)
Retrieves from the list of messages those elements that produces the specified message code.

Parameters:
messageCode - The message code.
Returns:
A list of Message instances.

getMessagesForElement

public List getMessagesForElement(Object element)
Retrieves from the list of messages those elements that produces the specified message code.

Parameters:
element - The process element.
Returns:
A list of Message instances.

hasErrors

public boolean hasErrors()

containsMessagesOfType

public boolean containsMessagesOfType(int type)

removeMessagesOfType

public void removeMessagesOfType(int type)

keepOnlyMessagesOfType

public void keepOnlyMessagesOfType(int type)

getMessagesOfType

public List getMessagesOfType(int type)

getMessagesOfTypeForElement

public String[] getMessagesOfTypeForElement(Object element,
                                            int type)
Method that looks up the messages of the specified type for the specified element, and returns them in a String[]. If the element is null, or no messages were found, null is returned


Dashboard Builder Commons 6.0.0.CR2

Copyright © 2012-2013 JBoss by Red Hat. All Rights Reserved.