MUCLightRoomInfo.java

  1. /**
  2.  *
  3.  * Copyright 2016 Fernando Ramirez
  4.  *
  5.  * Licensed under the Apache License, Version 2.0 (the "License");
  6.  * you may not use this file except in compliance with the License.
  7.  * You may obtain a copy of the License at
  8.  *
  9.  *     http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.jivesoftware.smackx.muclight;

  18. import java.util.HashMap;

  19. import org.jxmpp.jid.Jid;

  20. /**
  21.  * MUC Light room info class.
  22.  *
  23.  * @author Fernando Ramirez
  24.  */
  25. public class MUCLightRoomInfo {

  26.     private final String version;
  27.     private final Jid room;
  28.     private final MUCLightRoomConfiguration configuration;
  29.     private final HashMap<Jid, MUCLightAffiliation> occupants;

  30.     /**
  31.      * MUC Light room info model constructor.
  32.      *
  33.      * @param version TODO javadoc me please
  34.      * @param roomJid TODO javadoc me please
  35.      * @param configuration TODO javadoc me please
  36.      * @param occupants TODO javadoc me please
  37.      */
  38.     public MUCLightRoomInfo(String version, Jid roomJid, MUCLightRoomConfiguration configuration,
  39.             HashMap<Jid, MUCLightAffiliation> occupants) {
  40.         this.version = version;
  41.         this.room = roomJid;
  42.         this.configuration = configuration;
  43.         this.occupants = occupants;
  44.     }

  45.     /**
  46.      * Returns the version.
  47.      *
  48.      * @return the version
  49.      */
  50.     public String getVersion() {
  51.         return version;
  52.     }

  53.     /**
  54.      * Returns the JID of the room whose information was discovered.
  55.      *
  56.      * @return the JID of the room whose information was discovered.
  57.      */
  58.     public Jid getRoom() {
  59.         return room;
  60.     }

  61.     /**
  62.      * Returns the configuration.
  63.      *
  64.      * @return the room configuration
  65.      */
  66.     public MUCLightRoomConfiguration getConfiguration() {
  67.         return configuration;
  68.     }

  69.     /**
  70.      * Returns the room occupants.
  71.      *
  72.      * @return the occupants of the room.
  73.      */
  74.     public HashMap<Jid, MUCLightAffiliation> getOccupants() {
  75.         return occupants;
  76.     }

  77. }