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 org.jxmpp.jid.EntityBareJid;
021import org.jxmpp.jid.EntityJid;
022
023/**
024 * Request sent by an agent to invite another agent or user.
025 *
026 * @author Gaston Dombiak
027 */
028public class InvitationRequest extends OfferContent {
029
030    private final EntityJid inviter;
031    private final EntityBareJid room;
032    private final String reason;
033
034    public InvitationRequest(EntityJid inviter, EntityBareJid room, String reason) {
035        this.inviter = inviter;
036        this.room = room;
037        this.reason = reason;
038    }
039
040    public EntityJid getInviter() {
041        return inviter;
042    }
043
044    public EntityBareJid getRoom() {
045        return room;
046    }
047
048    public String getReason() {
049        return reason;
050    }
051
052    @Override
053    boolean isUserRequest() {
054        return false;
055    }
056
057    @Override
058    boolean isInvitation() {
059        return true;
060    }
061
062    @Override
063    boolean isTransfer() {
064        return false;
065    }
066}