001/** 002 * 003 * Copyright 2016 Fernando Ramirez 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.jivesoftware.smackx.muclight; 018 019import java.util.HashMap; 020import org.jxmpp.jid.Jid; 021 022/** 023 * MUC Light room info class. 024 * 025 * @author Fernando Ramirez 026 */ 027public class MUCLightRoomInfo { 028 029 private final String version; 030 private final Jid room; 031 private final MUCLightRoomConfiguration configuration; 032 private final HashMap<Jid, MUCLightAffiliation> occupants; 033 034 /** 035 * MUC Light room info model constructor. 036 * 037 * @param version 038 * @param roomJid 039 * @param configuration 040 * @param occupants 041 */ 042 public MUCLightRoomInfo(String version, Jid roomJid, MUCLightRoomConfiguration configuration, 043 HashMap<Jid, MUCLightAffiliation> occupants) { 044 this.version = version; 045 this.room = roomJid; 046 this.configuration = configuration; 047 this.occupants = occupants; 048 } 049 050 /** 051 * Returns the version. 052 * 053 * @return the version 054 */ 055 public String getVersion() { 056 return version; 057 } 058 059 /** 060 * Returns the JID of the room whose information was discovered. 061 * 062 * @return the JID of the room whose information was discovered. 063 */ 064 public Jid getRoom() { 065 return room; 066 } 067 068 /** 069 * Returns the configuration. 070 * 071 * @return the room configuration 072 */ 073 public MUCLightRoomConfiguration getConfiguration() { 074 return configuration; 075 } 076 077 /** 078 * Returns the room occupants. 079 * 080 * @return the occupants of the room. 081 */ 082 public HashMap<Jid, MUCLightAffiliation> getOccupants() { 083 return occupants; 084 } 085 086}