Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.muc
Class MUCRoomHistory

    java.lang.Object
      org.jivesoftware.openfire.muc.MUCRoomHistory

    public final class MUCRoomHistory

extends Object

Represent the data model for one `MUCRoom` history. Including chat transcript, joining and leaving times.

Author:
  Gaston Dombiak

Constructor Summary
`MUCRoomHistory(MUCRoom mucRoom, HistoryStrategy historyStrategy)`

Method Summary
`void` | `addMessage(org.xmpp.packet.Message packet)`
`void` | `addOldMessage(String senderJID, String nickname, Date sentDate, String subject, String body)` Creates a new message and adds it to the history.
`org.xmpp.packet.Message` | `getChangedSubject()` Returns the message within the history of the room that has changed the room's subject.
`Iterator` | `getMessageHistory()`
`ListIterator` | `getReverseMessageHistory()` Obtain the current history to be iterated in reverse mode.
`boolean` | `hasChangedSubject()` Returns true if there is a message within the history of the room that has changed the room's subject.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MUCRoomHistory

    public MUCRoomHistory(MUCRoom mucRoom,
                          HistoryStrategy historyStrategy)

Method Detail

### addMessage

    public void addMessage(org.xmpp.packet.Message packet)

### getMessageHistory

    public Iterator getMessageHistory()

### getReverseMessageHistory

    public ListIterator getReverseMessageHistory()

  Obtain the current history to be iterated in reverse mode. This means that the returned list iterator will be positioned at the end of the history so senders of this message must traverse the list in reverse mode.

  Returns:
    A list iterator of Message objects positioned at the end of the list.

### addOldMessage

    public void addOldMessage(String senderJID,
                              String nickname,
                              Date sentDate,
                              String subject,
                              String body)

  Creates a new message and adds it to the history. The new message will be created based on the provided information. This information will likely come from the database when loading the room history from the database.

  Parameters:
    `senderJID` - the sender's JID of the message to add to the history.
    `nickname` - the sender's nickname of the message to add to the history.
    `sentDate` - the date when the message was sent to the room.
    `subject` - the subject included in the message.
    `body` - the body of the message.

### hasChangedSubject

    public boolean hasChangedSubject()

  Returns true if there is a message within the history of the room that has changed the room's subject.

  Returns:
    true if there is a message within the history of the room that has changed the room's subject.

### getChangedSubject

    public org.xmpp.packet.Message getChangedSubject()

  Returns the message within the history of the room that has changed the room's subject.

  Returns:
    the latest room subject change or null if none exists yet.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.