RevokedOffer.java

  1. /**
  2.  *
  3.  * Copyright 2003-2007 Jive Software.
  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.workgroup.agent;

  18. import java.util.Date;

  19. import org.jxmpp.jid.Jid;

  20. /**
  21.  * An immutable simple class to embody the information concerning a revoked offer, this is namely
  22.  *  the reason, the workgroup, the userJID, and the timestamp which the message was received.<br>
  23.  *
  24.  * @author loki der quaeler
  25.  */
  26. public class RevokedOffer {

  27.     private Jid userJID;
  28.     private Jid userID;
  29.     private Jid workgroupName;
  30.     private String sessionID;
  31.     private String reason;
  32.     private Date timestamp;

  33.     /**
  34.      *
  35.      * @param userJID the JID of the user for which this revocation was issued.
  36.      * @param userID the user ID of the user for which this revocation was issued.
  37.      * @param workgroupName the fully qualified name of the workgroup
  38.      * @param sessionID the session id attributed to this chain of packets
  39.      * @param reason the server issued message as to why this revocation was issued.
  40.      * @param timestamp the timestamp at which the revocation was issued
  41.      */
  42.     RevokedOffer(Jid userJID, Jid userID, Jid workgroupName, String sessionID,
  43.             String reason, Date timestamp) {
  44.         super();

  45.         this.userJID = userJID;
  46.         this.userID = userID;
  47.         this.workgroupName = workgroupName;
  48.         this.sessionID = sessionID;
  49.         this.reason = reason;
  50.         this.timestamp = timestamp;
  51.     }

  52.     public Jid getUserJID() {
  53.         return userJID;
  54.     }

  55.     /**
  56.      * @return the jid of the user for which this revocation was issued
  57.      */
  58.     public Jid getUserID() {
  59.         return this.userID;
  60.     }

  61.     /**
  62.      * @return the fully qualified name of the workgroup
  63.      */
  64.     public Jid getWorkgroupName() {
  65.         return this.workgroupName;
  66.     }

  67.     /**
  68.      * @return the session id which will associate all packets for the pending chat
  69.      */
  70.     public String getSessionID() {
  71.         return this.sessionID;
  72.     }

  73.     /**
  74.      * @return the server issued message as to why this revocation was issued
  75.      */
  76.     public String getReason() {
  77.         return this.reason;
  78.     }

  79.     /**
  80.      * @return the timestamp at which the revocation was issued
  81.      */
  82.     public Date getTimestamp() {
  83.         return this.timestamp;
  84.     }
  85. }