001/**
002 *
003 * Copyright 2003-2007 Jive Software.
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 */
017
018package org.jivesoftware.smackx.workgroup.agent;
019
020import java.util.Date;
021
022/**
023 * An immutable simple class to embody the information concerning a revoked offer, this is namely
024 *  the reason, the workgroup, the userJID, and the timestamp which the message was received.<br>
025 *
026 * @author loki der quaeler
027 */
028public class RevokedOffer {
029
030    private String userJID;
031    private String userID;
032    private String workgroupName;
033    private String sessionID;
034    private String reason;
035    private Date timestamp;
036
037    /**
038     *
039     * @param userJID the JID of the user for which this revocation was issued.
040     * @param userID the user ID of the user for which this revocation was issued.
041     * @param workgroupName the fully qualified name of the workgroup
042     * @param sessionID the session id attributed to this chain of packets
043     * @param reason the server issued message as to why this revocation was issued.
044     * @param timestamp the timestamp at which the revocation was issued
045     */
046    RevokedOffer(String userJID, String userID, String workgroupName, String sessionID,
047            String reason, Date timestamp) {
048        super();
049
050        this.userJID = userJID;
051        this.userID = userID;
052        this.workgroupName = workgroupName;
053        this.sessionID = sessionID;
054        this.reason = reason;
055        this.timestamp = timestamp;
056    }
057
058    public String getUserJID() {
059        return userJID;
060    }
061
062    /**
063     * @return the jid of the user for which this revocation was issued
064     */
065    public String getUserID() {
066        return this.userID;
067    }
068
069    /**
070     * @return the fully qualified name of the workgroup
071     */
072    public String getWorkgroupName() {
073        return this.workgroupName;
074    }
075
076    /**
077     * @return the session id which will associate all packets for the pending chat
078     */
079    public String getSessionID() {
080        return this.sessionID;
081    }
082
083    /**
084     * @return the server issued message as to why this revocation was issued
085     */
086    public String getReason() {
087        return this.reason;
088    }
089
090    /**
091     * @return the timestamp at which the revocation was issued
092     */
093    public Date getTimestamp() {
094        return this.timestamp;
095    }
096}