com.edustructures.sifworks.library
Class MessageList

java.lang.Object
  extended by com.edustructures.sifworks.Element
      extended by com.edustructures.sifworks.SIFElement
          extended by com.edustructures.sifworks.SIFList<T>
              extended by com.edustructures.sifworks.SIFKeyedList<Message>
                  extended by com.edustructures.sifworks.library.MessageList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Message>, java.util.Collection<Message>

public class MessageList
extends SIFKeyedList<Message>

Since:
1.1
Version:
2.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.edustructures.sifworks.Element
CURRENT_SERIALIZE_VERSION
 
Constructor Summary
MessageList()
          Constructor
MessageList(Message message)
          Constructor that accepts values for all mandatory fields
 
Method Summary
 void addMessage(Priority priority, java.lang.String text)
          Adds a new <Message> repeatable element.
 Message getMessage(Priority priority)
          Gets a Message object instance.
 Message[] getMessages()
          Gets all Message object instances.
 void removeMessage(Priority priority)
          Removes a Message object instance.
 void setMessages(Message[] messages)
          Sets an array of Message objects.
 
Methods inherited from class com.edustructures.sifworks.SIFKeyedList
getChild, getChild
 
Methods inherited from class com.edustructures.sifworks.SIFList
add, addAll, clear, contains, containsAll, get, iterator, remove, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from class com.edustructures.sifworks.SIFElement
addChild, addChild, clone, compareGraphTo, create, effectiveSIFVersion, getChild, getChild, getChild, getChildCount, getChildList, getChildList, getChildList, getChildren, getChildren, getContent, getContent, getField, getField, getFieldCount, getFields, getFieldValue, getKey, getSIFValue, getSIFVersion, getTextValue, getXmlId, hasTextValue, removeChild, removeChild, removeChild, removeChild, restoreImplementationDef, setChanged, setChildren, setEmpty, setField, setField, setField, setField, setSIFValue, setSIFVersion, setTextValue, setXmlId, tag
 
Methods inherited from class com.edustructures.sifworks.Element
compareTo, getElementDef, getParent, getRoot, isChanged, isDoNotEncode, isEmpty, setChanged, setDoNotEncode, setElementDef, setEmpty, setParent, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode, isEmpty
 

Constructor Detail

MessageList

public MessageList()
Constructor


MessageList

public MessageList(Message message)
Constructor that accepts values for all mandatory fields

Parameters:
message -
Method Detail

addMessage

public void addMessage(Priority priority,
                       java.lang.String text)
Adds a new <Message> repeatable element. This form of setMessage is provided as a convenience method that is functionally equivalent to the version of setMessage that accepts a single Message object.

Parameters:
priority - The level of urgency associated with this message.
text - The contents of the message.
Since:
1.1

removeMessage

public void removeMessage(Priority priority)
Removes a Message object instance. More than one instance can be defined for this object because it is a repeatable field element.

Parameters:
priority - Identifies the Message object to remove by its Priority value
Since:
1.1

getMessage

public Message getMessage(Priority priority)
Gets a Message object instance. More than one instance can be defined for this object because it is a repeatable field element.

Parameters:
priority - Identifies the Message object to return by its "Priority" attribute value
Returns:
A Message object
Since:
1.1

getMessages

public Message[] getMessages()
Gets all Message object instances. More than one instance can be defined for this object because it is a repeatable field element.

Returns:
An array of Message objects
Since:
1.1

setMessages

public void setMessages(Message[] messages)
Sets an array of Message objects. All existing Message instances are removed and replaced with this list. Calling this method with the parameter value set to null removes all Messages.

Since:
1.1


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.