Issue #232 - Modified invitation methods
Former-commit-id:0b6a076129
[formerly 1c9381e1ba1a8b01084717db7ff3e94b26eb0b89] Former-commit-id:436b967ff1
This commit is contained in:
parent
dc50eb06d7
commit
a907eeb4ed
4 changed files with 118 additions and 187 deletions
|
@ -257,8 +257,7 @@ public class CollaborationGroupView extends ViewPart {
|
||||||
System.out.println("room: " + info.getVenueName());
|
System.out.println("room: " + info.getVenueName());
|
||||||
System.out.println("subject: "
|
System.out.println("subject: "
|
||||||
+ session.getVenue().getInfo().getVenueSubject());
|
+ session.getVenue().getInfo().getVenueSubject());
|
||||||
session.sendInvitation(info.getVenueName(), ids, session
|
session.sendInvitation(ids, "body");
|
||||||
.getVenue().getInfo().getVenueSubject(), "body");
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
inviteAction.setImageDescriptor(IconUtil.getImageDescriptor(bundle,
|
inviteAction.setImageDescriptor(IconUtil.getImageDescriptor(bundle,
|
||||||
|
|
|
@ -31,30 +31,34 @@ import com.raytheon.uf.viz.collaboration.comm.identity.listener.IVenueParticipan
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole;
|
import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>EventBus subscription events. Implementors are required to post the following events.</li>
|
* <li>EventBus subscription events. Implementors are required to post the
|
||||||
|
* following events.</li>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li><strong>IVenueParticipantEvent</strong> : This event is posted when a venue participant enters, leaves a venue, or
|
* <li><strong>IVenueParticipantEvent</strong> : This event is posted when a
|
||||||
* updates their status in the venue.</li>
|
* venue participant enters, leaves a venue, or updates their status in the
|
||||||
* <li><strong>TextMessage</strong> : Text messages send between users. Meant to be displayed as conversation.</li>
|
* venue.</li>
|
||||||
* <li><strong>CollaborationMessage</strong> : These messages are CAVE to CAVE command messages.</li>
|
* <li><strong>TextMessage</strong> : Text messages send between users. Meant to
|
||||||
|
* be displayed as conversation.</li>
|
||||||
|
* <li><strong>CollaborationMessage</strong> : These messages are CAVE to CAVE
|
||||||
|
* command messages.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Mar 5, 2012 jkorman Initial creation
|
* Mar 5, 2012 jkorman Initial creation
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author jkorman
|
* @author jkorman
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public interface IVenueSession extends ISession, IEventPublisher {
|
public interface IVenueSession extends ISession, IEventPublisher {
|
||||||
|
@ -62,16 +66,18 @@ public interface IVenueSession extends ISession, IEventPublisher {
|
||||||
/**
|
/**
|
||||||
* Return this session as an ISharedDisplaySession if it is supported. If
|
* Return this session as an ISharedDisplaySession if it is supported. If
|
||||||
* the interface is not supported the method must return a null reference.
|
* the interface is not supported the method must return a null reference.
|
||||||
* @return
|
*
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
ISharedDisplaySession spawnSharedDisplaySession();
|
ISharedDisplaySession spawnSharedDisplaySession();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns information about a venue.
|
* Returns information about a venue.
|
||||||
|
*
|
||||||
* @return Information about a venue
|
* @return Information about a venue
|
||||||
*/
|
*/
|
||||||
IVenue getVenue();
|
IVenue getVenue();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param role
|
* @param role
|
||||||
|
@ -79,37 +85,49 @@ public interface IVenueSession extends ISession, IEventPublisher {
|
||||||
*/
|
*/
|
||||||
boolean hasRole(ParticipantRole role);
|
boolean hasRole(ParticipantRole role);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the subject of this collaboration venue conversation.
|
||||||
|
*
|
||||||
|
* @param subject
|
||||||
|
* The subject.
|
||||||
|
*/
|
||||||
|
void setSubject(String subject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the subject of this collaboration venue conversation.
|
||||||
|
*
|
||||||
|
* @return The subject.
|
||||||
|
*/
|
||||||
|
String getSubject();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a Collaboration message.
|
* Send a Collaboration message.
|
||||||
* @param message The message to send.
|
*
|
||||||
|
* @param message
|
||||||
|
* The message to send.
|
||||||
*/
|
*/
|
||||||
void sendTextMessage(String message) throws CollaborationException;
|
void sendTextMessage(String message) throws CollaborationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send an invitation from this venue to another user.
|
* Send an invitation from this venue to another user.
|
||||||
* @param invitation An invitation
|
*
|
||||||
|
* @param id
|
||||||
|
* The target user for this invitation.
|
||||||
|
* @param subject
|
||||||
|
* The intended subject of the venue conversation.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int sendInvitation(IInvitation invitation);
|
int sendInvitation(String id, String body);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send an invitation from this venue to another user.
|
* Send an invitation from this venue to one or more users.
|
||||||
* @param room The target venue for this invitation.
|
*
|
||||||
* @param id The target user for this invitation.
|
* @param ids
|
||||||
* @param subject The intended subject of the venue conversation.
|
* A list of target users for this invitation.
|
||||||
* @param body Any text that the user may wish to include.
|
* @param body
|
||||||
|
* Any text that the user may wish to include.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int sendInvitation(String room, String id, String subject, String body);
|
int sendInvitation(List<String> ids, String body);
|
||||||
|
|
||||||
/**
|
|
||||||
* Send an invitation from this venue to another user.
|
|
||||||
* @param room The target venue for this invitation.
|
|
||||||
* @param ids A list of target users for this invitation.
|
|
||||||
* @param subject The intended subject of the venue conversation.
|
|
||||||
* @param body Any text that the user may wish to include.
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int sendInvitation(String room, List<String> ids, String subject, String body);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.event.VenueInvitationEven
|
||||||
import com.raytheon.uf.viz.collaboration.comm.provider.info.InfoAdapter;
|
import com.raytheon.uf.viz.collaboration.comm.provider.info.InfoAdapter;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.provider.roster.RosterManager;
|
import com.raytheon.uf.viz.collaboration.comm.provider.roster.RosterManager;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
|
import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter;
|
||||||
|
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueId;
|
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueId;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueUserId;
|
import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueUserId;
|
||||||
|
|
||||||
|
@ -68,9 +69,12 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueUserId;
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>EventBus subscription events.</li>
|
* <li>EventBus subscription events.</li>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li><strong>IVenueInvitationEvent</strong> : This event is posted when a
|
* <li><strong>IVenueInvitationEvent</strong> : This event is posted when the
|
||||||
* venue participant enters, leaves a venue, or updates their status in the
|
* SessionManager receives a venue invitation requesting that the user join some
|
||||||
* venue.</li>
|
* particular collaboration session.</li>
|
||||||
|
* <li><strong>IConnectionStatusEvent</strong> : This event is posted when the
|
||||||
|
* state of the underlying connection changes, reconnecting, connecting,
|
||||||
|
* disconnected, for example.</li>
|
||||||
* <li><strong>---------------</strong> : ---------------.</li>
|
* <li><strong>---------------</strong> : ---------------.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
@ -341,11 +345,23 @@ public class SessionManager implements IEventPublisher {
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
session.createVenue(venueName, subject);
|
session.createVenue(venueName, subject);
|
||||||
|
|
||||||
|
IChatID me = new VenueUserId("jkorman",
|
||||||
|
"awipscm.omaha.us.ray.com");
|
||||||
|
|
||||||
|
session.setSessionLeader(me);
|
||||||
|
session.setSessionDataProvider(me);
|
||||||
|
|
||||||
IPresence presence = new Presence();
|
IPresence presence = new Presence();
|
||||||
presence.setMode(IPresence.Mode.AVAILABLE);
|
presence.setMode(IPresence.Mode.AVAILABLE);
|
||||||
presence.setType(IPresence.Type.AVAILABLE);
|
presence.setType(IPresence.Type.AVAILABLE);
|
||||||
presence.setProperty("DATA_PROVIDER", "");
|
presence.setProperty("DATA_PROVIDER", me.getFQName());
|
||||||
presence.setProperty("SESSION_LEADER", "");
|
presence.setProperty("SESSION_LEADER", me.getFQName());
|
||||||
|
|
||||||
|
presenceAdapter
|
||||||
|
.getRosterManager()
|
||||||
|
.getPresenceSender()
|
||||||
|
.sendPresenceUpdate(null,
|
||||||
|
Presence.convertPresence(presence));
|
||||||
|
|
||||||
sessions.put(session.getSessionId(), session);
|
sessions.put(session.getSessionId(), session);
|
||||||
}
|
}
|
||||||
|
@ -441,6 +457,9 @@ public class SessionManager implements IEventPublisher {
|
||||||
// Connection listener
|
// Connection listener
|
||||||
// ***************************
|
// ***************************
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private void setupInternalConnectionListeners() {
|
private void setupInternalConnectionListeners() {
|
||||||
|
|
||||||
if (container != null) {
|
if (container != null) {
|
||||||
|
@ -491,13 +510,13 @@ public class SessionManager implements IEventPublisher {
|
||||||
String subject, String body) {
|
String subject, String body) {
|
||||||
|
|
||||||
IQualifiedID venueId = null;
|
IQualifiedID venueId = null;
|
||||||
if(roomID instanceof XMPPRoomID) {
|
if (roomID instanceof XMPPRoomID) {
|
||||||
XMPPRoomID room = (XMPPRoomID) roomID;
|
XMPPRoomID room = (XMPPRoomID) roomID;
|
||||||
venueId = new VenueId();
|
venueId = new VenueId();
|
||||||
venueId.setName(room.getLongName());
|
venueId.setName(room.getLongName());
|
||||||
|
|
||||||
}
|
}
|
||||||
if(venueId != null) {
|
if (venueId != null) {
|
||||||
IQualifiedID id = IDConverter.convertFrom(from);
|
IQualifiedID id = IDConverter.convertFrom(from);
|
||||||
|
|
||||||
IChatID invitor = new VenueUserId(id.getName(),
|
IChatID invitor = new VenueUserId(id.getName(),
|
||||||
|
@ -505,8 +524,6 @@ public class SessionManager implements IEventPublisher {
|
||||||
|
|
||||||
IVenueInvitationEvent invite = new VenueInvitationEvent(
|
IVenueInvitationEvent invite = new VenueInvitationEvent(
|
||||||
venueId, invitor, subject, body);
|
venueId, invitor, subject, body);
|
||||||
System.out.println("Posting invitation using eventBus:"
|
|
||||||
+ eventBus.hashCode());
|
|
||||||
eventBus.post(invite);
|
eventBus.post(invite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,6 @@ import org.eclipse.ecf.presence.chatroom.IChatRoomParticipantListener;
|
||||||
import org.eclipse.ecf.provider.xmpp.identity.XMPPRoomID;
|
import org.eclipse.ecf.provider.xmpp.identity.XMPPRoomID;
|
||||||
|
|
||||||
import com.google.common.eventbus.EventBus;
|
import com.google.common.eventbus.EventBus;
|
||||||
// import com.google.common.eventbus.Subscribe;
|
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
|
import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.IMessage;
|
import com.raytheon.uf.viz.collaboration.comm.identity.IMessage;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.IPresence;
|
import com.raytheon.uf.viz.collaboration.comm.identity.IPresence;
|
||||||
|
@ -54,7 +53,6 @@ import com.raytheon.uf.viz.collaboration.comm.identity.event.IRenderable;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.event.IVenueParticipantEvent;
|
import com.raytheon.uf.viz.collaboration.comm.identity.event.IVenueParticipantEvent;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.event.ParticipantEventType;
|
import com.raytheon.uf.viz.collaboration.comm.identity.event.ParticipantEventType;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenue;
|
import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenue;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.listener.IInvitation;
|
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IChatID;
|
import com.raytheon.uf.viz.collaboration.comm.identity.user.IChatID;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID;
|
import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID;
|
||||||
import com.raytheon.uf.viz.collaboration.comm.identity.user.IVenueParticipant;
|
import com.raytheon.uf.viz.collaboration.comm.identity.user.IVenueParticipant;
|
||||||
|
@ -130,6 +128,8 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
|
|
||||||
private Map<Object, Object> initSubscribers = new HashMap<Object, Object>();
|
private Map<Object, Object> initSubscribers = new HashMap<Object, Object>();
|
||||||
|
|
||||||
|
private String subject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param container
|
* @param container
|
||||||
|
@ -149,75 +149,8 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
SessionManager manager) throws CollaborationException {
|
SessionManager manager) throws CollaborationException {
|
||||||
super(container, externalBus, manager);
|
super(container, externalBus, manager);
|
||||||
|
|
||||||
Runnable r = new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
Thread.sleep(30000);
|
|
||||||
|
|
||||||
// TestJAXBObject j = new TestJAXBObject();
|
|
||||||
// j.setItem_1("This is an object");
|
|
||||||
// j.setValue(5);
|
|
||||||
// sendRenderableObject(j);
|
|
||||||
//
|
|
||||||
// VenueParticipant id = new VenueParticipant("jkorman",
|
|
||||||
// "paul", "awipscm.omaha.us.ray.com");
|
|
||||||
// id.setResource("cave");
|
|
||||||
// IInitData d = new InitData();
|
|
||||||
// ((InitData) d).setName("This is a test init data object");
|
|
||||||
//
|
|
||||||
// IDisplayEvent e = new DisplayEvent();
|
|
||||||
// ((DisplayEvent) e).setName("This is a test display event");
|
|
||||||
//
|
|
||||||
// sendInitData(id, d);
|
|
||||||
// sendEvent(id, e);
|
|
||||||
//
|
|
||||||
// Thread.sleep(10000);
|
|
||||||
System.out.println("Sending invitation");
|
|
||||||
|
|
||||||
sendInvitation(
|
|
||||||
"tester5@conference.awipscm.omaha.us.ray.com",
|
|
||||||
"jkorman", "Test Room", "Join the test");
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println("Error sending RenderableObject");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Thread t = new Thread(r);
|
|
||||||
t.start();
|
|
||||||
registerEventHandler(this);
|
|
||||||
try {
|
|
||||||
DataHandler h = new DataHandler();
|
|
||||||
subscribeToPeerToPeerData(h);
|
|
||||||
} catch (CollaborationException ce) {
|
|
||||||
ce.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Subscribe
|
|
||||||
// public void handle(IRenderable renderable) {
|
|
||||||
// System.out.println("Renderable found");
|
|
||||||
// if (renderable instanceof TestJAXBObject) {
|
|
||||||
// TestJAXBObject j = (TestJAXBObject) renderable;
|
|
||||||
// if (j.getValue() < 100) {
|
|
||||||
// System.out.println(String.format("%s %d Renderable",
|
|
||||||
// j.getItem_1(), j.getValue()));
|
|
||||||
// j.setValue(j.getValue() + 200);
|
|
||||||
// j.setItem_1("Now for the return trip");
|
|
||||||
// try {
|
|
||||||
// sendRenderableObject(j);
|
|
||||||
// } catch (CollaborationException ce) {
|
|
||||||
// System.out.println("Error sending RenderableObject");
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// System.out.println(String.format("%s %d Renderable",
|
|
||||||
// j.getItem_1(), j.getValue()));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the identification of the owner of this session.
|
* Get the identification of the owner of this session.
|
||||||
*
|
*
|
||||||
|
@ -295,40 +228,19 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
}
|
}
|
||||||
return venue;
|
return venue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the subject
|
||||||
|
*/
|
||||||
|
public String getSubject() {
|
||||||
|
return subject;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send an invitation from this venue to another user.
|
* @param subject the subject to set
|
||||||
*
|
|
||||||
* @param invitation
|
|
||||||
* An invitation
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Override
|
public void setSubject(String subject) {
|
||||||
public int sendInvitation(IInvitation invitation) {
|
this.subject = subject;
|
||||||
int status = Errors.NO_ERROR;
|
|
||||||
IChatRoomInvitationSender sender = getConnectionPresenceAdapter()
|
|
||||||
.getChatRoomManager().getInvitationSender();
|
|
||||||
if (sender != null) {
|
|
||||||
ID roomId = getConnectionPresenceAdapter().getChatRoomManager()
|
|
||||||
.getChatRoomInfo(invitation.getRoomId()).getConnectedID();
|
|
||||||
|
|
||||||
// *******************
|
|
||||||
// ** TODO : The host part of this need to defined
|
|
||||||
ID userId = IDFactory.getDefault().createID(
|
|
||||||
getConnectionNamespace(),
|
|
||||||
invitation.getFrom() + "@awipscm.omaha.us.ray.com");
|
|
||||||
// *******************
|
|
||||||
|
|
||||||
try {
|
|
||||||
String body = insertSessionId(invitation.getBody());
|
|
||||||
|
|
||||||
sender.sendInvitation(roomId, userId, invitation.getSubject(),
|
|
||||||
body);
|
|
||||||
} catch (ECFException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -347,8 +259,7 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
* java.lang.String, java.lang.String, java.lang.String)
|
* java.lang.String, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int sendInvitation(String room, String id, String subject,
|
public int sendInvitation(String id, String body) {
|
||||||
String body) {
|
|
||||||
// Assume success
|
// Assume success
|
||||||
int status = Errors.NO_ERROR;
|
int status = Errors.NO_ERROR;
|
||||||
IChatRoomInvitationSender sender = getConnectionPresenceAdapter()
|
IChatRoomInvitationSender sender = getConnectionPresenceAdapter()
|
||||||
|
@ -356,11 +267,11 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
if (sender != null) {
|
if (sender != null) {
|
||||||
body = insertSessionId(body);
|
body = insertSessionId(body);
|
||||||
|
|
||||||
ID roomId = getConnectionPresenceAdapter().getChatRoomManager()
|
ID roomId = venueInfo.getConnectedID();
|
||||||
.getChatRoomInfo(room).getConnectedID();
|
|
||||||
ID userId = IDFactory.getDefault().createID(
|
|
||||||
getConnectionNamespace(), id + "@awipscm.omaha.us.ray.com");
|
|
||||||
|
|
||||||
|
ID userId = IDFactory.getDefault().createID(
|
||||||
|
getConnectionNamespace(), id);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sender.sendInvitation(roomId, userId, subject, body);
|
sender.sendInvitation(roomId, userId, subject, body);
|
||||||
} catch (ECFException e) {
|
} catch (ECFException e) {
|
||||||
|
@ -386,20 +297,19 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
* java.lang.String, java.lang.String, java.lang.String)
|
* java.lang.String, java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int sendInvitation(String room, List<String> ids, String subject,
|
public int sendInvitation(List<String> ids, String body) {
|
||||||
String body) {
|
|
||||||
// Assume success
|
// Assume success
|
||||||
int status = Errors.NO_ERROR;
|
int status = Errors.NO_ERROR;
|
||||||
if (ids != null) {
|
if (ids != null) {
|
||||||
for (String id : ids) {
|
for (String id : ids) {
|
||||||
sendInvitation(room, id, subject, body);
|
sendInvitation(id, body);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
status = -1;
|
status = -1;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param body
|
* @param body
|
||||||
|
@ -596,6 +506,20 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
// Internal methods
|
// Internal methods
|
||||||
// ***************************
|
// ***************************
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void setSessionLeader(IChatID id) {
|
||||||
|
sessionLeader = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void setSessionDataProvider(IChatID id) {
|
||||||
|
sessionDataProvider = id;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @see com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession#joinVenue(java.lang.String)
|
* @see com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession#joinVenue(java.lang.String)
|
||||||
|
@ -607,13 +531,13 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
venueManager = getConnectionPresenceAdapter().getChatRoomManager();
|
venueManager = getConnectionPresenceAdapter().getChatRoomManager();
|
||||||
if (venueManager != null) {
|
if (venueManager != null) {
|
||||||
venueInfo = venueManager.getChatRoomInfo(venueName);
|
venueInfo = venueManager.getChatRoomInfo(venueName);
|
||||||
|
subject = venueInfo.getSubject();
|
||||||
if (venueInfo != null) {
|
if (venueInfo != null) {
|
||||||
errorStatus = completeVenueConnection(venueInfo);
|
errorStatus = completeVenueConnection(venueInfo);
|
||||||
|
|
||||||
roles.add(ParticipantRole.PARTICIPANT);
|
roles.add(ParticipantRole.PARTICIPANT);
|
||||||
} else {
|
} else {
|
||||||
// Could not join venue.
|
// Could not join venue.
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -635,6 +559,7 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
int createVenue(String venueName, String subject) {
|
int createVenue(String venueName, String subject) {
|
||||||
int errorStatus = -1;
|
int errorStatus = -1;
|
||||||
try {
|
try {
|
||||||
|
this.subject = subject;
|
||||||
// Create chat room container from manager
|
// Create chat room container from manager
|
||||||
venueManager = getConnectionPresenceAdapter().getChatRoomManager();
|
venueManager = getConnectionPresenceAdapter().getChatRoomManager();
|
||||||
if (venueManager != null) {
|
if (venueManager != null) {
|
||||||
|
@ -677,42 +602,14 @@ public class VenueSession extends BaseSession implements IVenueSession,
|
||||||
IChatRoomParticipantListener pListener = new IChatRoomParticipantListener() {
|
IChatRoomParticipantListener pListener = new IChatRoomParticipantListener() {
|
||||||
@Override
|
@Override
|
||||||
public void handleArrived(IUser participant) {
|
public void handleArrived(IUser participant) {
|
||||||
// IVenueParticipant p = new VenueParticipant(
|
|
||||||
// participant.getName(),
|
|
||||||
// participant.getNickname());
|
|
||||||
//
|
|
||||||
// System.out.println("Arrived");
|
|
||||||
// IVenueParticipantEvent event = new
|
|
||||||
// VenueParticipantEvent(
|
|
||||||
// p, ParticipantEventType.ARRIVED);
|
|
||||||
//
|
|
||||||
// getEventPublisher().post(event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleUpdated(IUser participant) {
|
public void handleUpdated(IUser participant) {
|
||||||
// IVenueParticipant p = new VenueParticipant(
|
|
||||||
// participant.getName(),
|
|
||||||
// participant.getNickname());
|
|
||||||
//
|
|
||||||
// System.out.println("Updated");
|
|
||||||
// IVenueParticipantEvent event = new
|
|
||||||
// VenueParticipantEvent(
|
|
||||||
// p, ParticipantEventType.UPDATED);
|
|
||||||
// getEventPublisher().post(event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleDeparted(IUser participant) {
|
public void handleDeparted(IUser participant) {
|
||||||
// IVenueParticipant p = new VenueParticipant(
|
|
||||||
// participant.getName(),
|
|
||||||
// participant.getNickname());
|
|
||||||
//
|
|
||||||
// System.out.println("Departed");
|
|
||||||
// IVenueParticipantEvent event = new
|
|
||||||
// VenueParticipantEvent(
|
|
||||||
// p, ParticipantEventType.DEPARTED);
|
|
||||||
// getEventPublisher().post(event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue