MongoMucDAO

public class MongoMucDAO extends AbstractMucDAO<MongoDataSource, byte[]>

Created by andrzej on 20.10.2016.

Fields

roomAffilaitionsCollection

protected MongoCollection<Document> roomAffilaitionsCollection

roomsCollection

protected MongoCollection<Document> roomsCollection

Methods

calculateHash

protected byte[] calculateHash(String user)

createRoom

public byte[] createRoom(RoomWithId<byte[]> room)

destroyRoom

public void destroyRoom(BareJID roomJID)

generateId

protected byte[] generateId(BareJID user)

getAffiliations

public Map<BareJID, RoomAffiliation> getAffiliations(RoomWithId<byte[]> room)

getRoom

public RoomWithId<byte[]> getRoom(BareJID roomJID)

getRoomAvatar

public String getRoomAvatar(RoomWithId<byte[]> room)

getRoomsJIDList

public ArrayList<BareJID> getRoomsJIDList()

setAffiliation

public void setAffiliation(RoomWithId<byte[]> room, BareJID jid, RoomAffiliation affiliation)

setDataSource

public void setDataSource(MongoDataSource dataSource)

setSubject

public void setSubject(RoomWithId<byte[]> room, String subject, String creatorNickname, Date changeDate)

updateRoomAvatar

public void updateRoomAvatar(RoomWithId<byte[]> room, String encodedAvatar, String hash)

updateRoomConfig

public void updateRoomConfig(RoomConfig roomConfig)