Shuyi Chen | d7955ce | 2013-05-22 14:51:55 -0700 | [diff] [blame] | 1 | /**
|
| 2 | * $Revision$
|
| 3 | * $Date$
|
| 4 | *
|
| 5 | * Copyright 2003-2007 Jive Software.
|
| 6 | *
|
| 7 | * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
|
| 8 | * you may not use this file except in compliance with the License.
|
| 9 | * You may obtain a copy of the License at
|
| 10 | *
|
| 11 | * http://www.apache.org/licenses/LICENSE-2.0
|
| 12 | *
|
| 13 | * Unless required by applicable law or agreed to in writing, software
|
| 14 | * distributed under the License is distributed on an "AS IS" BASIS,
|
| 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 16 | * See the License for the specific language governing permissions and
|
| 17 | * limitations under the License.
|
| 18 | */
|
| 19 |
|
| 20 | package org.jivesoftware.smackx.workgroup.agent;
|
| 21 |
|
| 22 | import java.util.Date;
|
| 23 |
|
| 24 | /**
|
| 25 | * An immutable simple class to embody the information concerning a revoked offer, this is namely
|
| 26 | * the reason, the workgroup, the userJID, and the timestamp which the message was received.<br>
|
| 27 | *
|
| 28 | * @author loki der quaeler
|
| 29 | */
|
| 30 | public class RevokedOffer {
|
| 31 |
|
| 32 | private String userJID;
|
| 33 | private String userID;
|
| 34 | private String workgroupName;
|
| 35 | private String sessionID;
|
| 36 | private String reason;
|
| 37 | private Date timestamp;
|
| 38 |
|
| 39 | /**
|
| 40 | *
|
| 41 | * @param userJID the JID of the user for which this revocation was issued.
|
| 42 | * @param userID the user ID of the user for which this revocation was issued.
|
| 43 | * @param workgroupName the fully qualified name of the workgroup
|
| 44 | * @param sessionID the session id attributed to this chain of packets
|
| 45 | * @param reason the server issued message as to why this revocation was issued.
|
| 46 | * @param timestamp the timestamp at which the revocation was issued
|
| 47 | */
|
| 48 | RevokedOffer(String userJID, String userID, String workgroupName, String sessionID,
|
| 49 | String reason, Date timestamp) {
|
| 50 | super();
|
| 51 |
|
| 52 | this.userJID = userJID;
|
| 53 | this.userID = userID;
|
| 54 | this.workgroupName = workgroupName;
|
| 55 | this.sessionID = sessionID;
|
| 56 | this.reason = reason;
|
| 57 | this.timestamp = timestamp;
|
| 58 | }
|
| 59 |
|
| 60 | public String getUserJID() {
|
| 61 | return userJID;
|
| 62 | }
|
| 63 |
|
| 64 | /**
|
| 65 | * @return the jid of the user for which this revocation was issued
|
| 66 | */
|
| 67 | public String getUserID() {
|
| 68 | return this.userID;
|
| 69 | }
|
| 70 |
|
| 71 | /**
|
| 72 | * @return the fully qualified name of the workgroup
|
| 73 | */
|
| 74 | public String getWorkgroupName() {
|
| 75 | return this.workgroupName;
|
| 76 | }
|
| 77 |
|
| 78 | /**
|
| 79 | * @return the session id which will associate all packets for the pending chat
|
| 80 | */
|
| 81 | public String getSessionID() {
|
| 82 | return this.sessionID;
|
| 83 | }
|
| 84 |
|
| 85 | /**
|
| 86 | * @return the server issued message as to why this revocation was issued
|
| 87 | */
|
| 88 | public String getReason() {
|
| 89 | return this.reason;
|
| 90 | }
|
| 91 |
|
| 92 | /**
|
| 93 | * @return the timestamp at which the revocation was issued
|
| 94 | */
|
| 95 | public Date getTimestamp() {
|
| 96 | return this.timestamp;
|
| 97 | }
|
| 98 | } |