diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/data/CollaborationDataManager.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/data/CollaborationDataManager.java index 969e28cf68..094695247d 100644 --- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/data/CollaborationDataManager.java +++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/data/CollaborationDataManager.java @@ -59,11 +59,11 @@ import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRoster; import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterEntry; import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterGroup; import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID; -import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole; +import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole; import com.raytheon.uf.viz.collaboration.comm.provider.Presence; import com.raytheon.uf.viz.collaboration.comm.provider.TextMessage; import com.raytheon.uf.viz.collaboration.comm.provider.roster.RosterEntry; -import com.raytheon.uf.viz.collaboration.comm.provider.session.SessionManager; +import com.raytheon.uf.viz.collaboration.comm.provider.session.CollaborationConnection; import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId; import com.raytheon.uf.viz.collaboration.ui.CollaborationUtils; import com.raytheon.uf.viz.collaboration.ui.editor.CollaborationEditor; @@ -99,7 +99,7 @@ public class CollaborationDataManager implements IRosterEventSubscriber { /** * The connection to the server. */ - private SessionManager sessionManager; + private CollaborationConnection sessionManager; String loginId; @@ -284,7 +284,7 @@ public class CollaborationDataManager implements IRosterEventSubscriber { * * @return sessionManager or null if unable to get connection. */ - synchronized public SessionManager getSessionManager() { + synchronized public CollaborationConnection getSessionManager() { // Get user's server account information and make connection. if (isConnected() == false) { VizApp.runSync(new Runnable() { @@ -492,7 +492,7 @@ public class CollaborationDataManager implements IRosterEventSubscriber { */ public String createCollaborationSession(String venue, String subject) throws CollaborationException { - SessionManager sessionManager = getSessionManager(); + CollaborationConnection sessionManager = getSessionManager(); IVenueSession session = null; String sessionId = null; // try { @@ -505,7 +505,7 @@ public class CollaborationDataManager implements IRosterEventSubscriber { ISharedDisplaySession displaySession = (ISharedDisplaySession) session; sessionsMap.put(sessionId, session); SharedDisplaySessionMgr.joinSession(displaySession, - ParticipantRole.DATA_PROVIDER); + SharedDisplayRole.DATA_PROVIDER); } @@ -514,7 +514,7 @@ public class CollaborationDataManager implements IRosterEventSubscriber { public String createTextOnlySession(String venueName, String subject) throws CollaborationException { - SessionManager sessionManager = getSessionManager(); + CollaborationConnection sessionManager = getSessionManager(); IVenueSession session = null; String sessionId = null; session = sessionManager.createTextOnlyVenue(venueName, subject); @@ -577,7 +577,7 @@ public class CollaborationDataManager implements IRosterEventSubscriber { if (sharedDisplay) { ISharedDisplaySession displaySession = (ISharedDisplaySession) session; SharedDisplaySessionMgr.joinSession(displaySession, - ParticipantRole.PARTICIPANT); + SharedDisplayRole.PARTICIPANT); PlatformUI .getWorkbench() diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/data/SharedDisplaySessionMgr.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/data/SharedDisplaySessionMgr.java index e525ef0fb0..98f1f27333 100644 --- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/data/SharedDisplaySessionMgr.java +++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/data/SharedDisplaySessionMgr.java @@ -26,7 +26,7 @@ import java.util.Map; import java.util.Set; import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession; -import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole; +import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole; import com.raytheon.uf.viz.collaboration.ui.role.DataProviderEventController; import com.raytheon.uf.viz.collaboration.ui.role.IRoleEventController; import com.raytheon.uf.viz.collaboration.ui.role.ParticipantEventController; @@ -34,7 +34,8 @@ import com.raytheon.viz.ui.VizWorkbenchManager; import com.raytheon.viz.ui.editor.AbstractEditor; /** - * TODO Add Description + * Tracks all of the active sessions that are SharedDisplaySessions. Provides + * SessionContainers that contain the data related to those sessions. * *
  * 
@@ -63,7 +64,7 @@ public class SharedDisplaySessionMgr {
     }
 
     protected static void joinSession(ISharedDisplaySession session,
-            ParticipantRole initialRole) {
+            SharedDisplayRole initialRole) {
         SessionContainer container = new SessionContainer();
         container.setSessionId(session.getSessionId());
         container.setSession(session);
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/CollaborationGroupView.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/CollaborationGroupView.java
index 0e3781fb8c..b4de915eff 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/CollaborationGroupView.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/CollaborationGroupView.java
@@ -83,7 +83,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterEntry;
 import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterGroup;
 import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterManager;
 import com.raytheon.uf.viz.collaboration.comm.provider.Tools;
-import com.raytheon.uf.viz.collaboration.comm.provider.session.SessionManager;
+import com.raytheon.uf.viz.collaboration.comm.provider.session.CollaborationConnection;
 import com.raytheon.uf.viz.collaboration.data.CollaborationDataManager;
 import com.raytheon.uf.viz.collaboration.data.CollaborationGroup;
 import com.raytheon.uf.viz.collaboration.data.CollaborationNode;
@@ -438,7 +438,7 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
         Object result = dialog.getReturnValue();
         if (result != null) {
             char[] password = result.toString().toCharArray();
-            SessionManager sessionManager = CollaborationDataManager
+            CollaborationConnection sessionManager = CollaborationDataManager
                     .getInstance().getSessionManager();
             try {
                 sessionManager.getAccountManager().changePassword(password);
@@ -605,7 +605,7 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
     private void createSession() {
         CollaborationDataManager manager = CollaborationDataManager
                 .getInstance();
-        SessionManager sessionManager = manager.getSessionManager();
+        CollaborationConnection sessionManager = manager.getSessionManager();
         if (sessionManager == null) {
             System.err.println("Unable to get session manager");
             return;
@@ -917,7 +917,7 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
     protected void populateTree() {
         CollaborationDataManager manager = CollaborationDataManager
                 .getInstance();
-        SessionManager sessionManager = manager.getSessionManager();
+        CollaborationConnection sessionManager = manager.getSessionManager();
         topLevel.removeChildren();
         if (sessionManager == null) {
             usersTreeViewer.getTree().setEnabled(false);
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/login/LoginDialog.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/login/LoginDialog.java
index 5d51b6b2d4..2d524c23b5 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/login/LoginDialog.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/login/LoginDialog.java
@@ -55,7 +55,7 @@ import com.raytheon.uf.common.status.UFStatus;
 import com.raytheon.uf.common.status.UFStatus.Priority;
 import com.raytheon.uf.viz.collaboration.comm.identity.IPresence;
 import com.raytheon.uf.viz.collaboration.comm.identity.event.IRosterEventSubscriber;
-import com.raytheon.uf.viz.collaboration.comm.provider.session.SessionManager;
+import com.raytheon.uf.viz.collaboration.comm.provider.session.CollaborationConnection;
 import com.raytheon.uf.viz.collaboration.data.CollaborationDataManager;
 import com.raytheon.uf.viz.collaboration.data.DataUser;
 import com.raytheon.uf.viz.collaboration.ui.CollaborationUtils;
@@ -110,7 +110,7 @@ public class LoginDialog extends CaveSWTDialog {
 
     private IRosterEventSubscriber rosterEventSubscriber;
 
-    private SessionManager sessionManager;
+    private CollaborationConnection sessionManager;
 
     public LoginDialog(Shell parentShell,
             IRosterEventSubscriber rosterEventSubscriber) {
@@ -378,7 +378,7 @@ public class LoginDialog extends CaveSWTDialog {
                         // .getSelectionIndex()], messageTF
                         // .getText().trim());
                         try {
-                            sessionManager = new SessionManager(loginData
+                            sessionManager = new CollaborationConnection(loginData
                                     .getAccount(), loginData.getPassword(),
                                     rosterEventSubscriber);
                             DataUser dUser = CollaborationDataManager
@@ -495,7 +495,7 @@ public class LoginDialog extends CaveSWTDialog {
     /**
      * @return the sessionManager
      */
-    public SessionManager getSessionManager() {
+    public CollaborationConnection getSessionManager() {
         return sessionManager;
     }
 }
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/role/DataProviderEventController.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/role/DataProviderEventController.java
index 2524fba2de..0039583fb7 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/role/DataProviderEventController.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/role/DataProviderEventController.java
@@ -30,7 +30,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
 import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession;
 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.user.ParticipantRole;
+import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole;
 import com.raytheon.uf.viz.collaboration.comm.provider.TransferRoleCommand;
 import com.raytheon.uf.viz.collaboration.data.SessionContainer;
 import com.raytheon.uf.viz.collaboration.data.SharedDisplaySessionMgr;
@@ -106,7 +106,7 @@ public class DataProviderEventController extends AbstractRoleEventController {
 
     @Subscribe
     public void roleTransferred(TransferRoleCommand cmd) {
-        if (cmd.getRole() == ParticipantRole.SESSION_LEADER) {
+        if (cmd.getRole() == SharedDisplayRole.SESSION_LEADER) {
             session.setCurrentSessionLeader(cmd.getUser());
             if (cmd.getUser().getFQName()
                     .equals(session.getUserID().getFQName())) {
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/role/ParticipantEventController.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/role/ParticipantEventController.java
index 6a2d32d69f..0ffdcefe61 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/role/ParticipantEventController.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/role/ParticipantEventController.java
@@ -24,7 +24,7 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
 import com.raytheon.uf.common.status.UFStatus;
 import com.raytheon.uf.common.status.UFStatus.Priority;
 import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession;
-import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole;
+import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole;
 import com.raytheon.uf.viz.collaboration.comm.provider.TransferRoleCommand;
 import com.raytheon.uf.viz.collaboration.data.CollaborationDataManager;
 import com.raytheon.uf.viz.collaboration.data.SharedDisplaySessionMgr;
@@ -186,7 +186,7 @@ public class ParticipantEventController extends AbstractRoleEventController {
 
     @Subscribe
     public void roleTransferred(TransferRoleCommand cmd) {
-        if (cmd.getRole() == ParticipantRole.SESSION_LEADER) {
+        if (cmd.getRole() == SharedDisplayRole.SESSION_LEADER) {
             session.setCurrentSessionLeader(cmd.getUser());
             if (cmd.getUser().getFQName()
                     .equals(session.getUserID().getFQName())) {
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/CollaborationSessionView.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/CollaborationSessionView.java
index 53333143f6..ca588b25bf 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/CollaborationSessionView.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/CollaborationSessionView.java
@@ -41,7 +41,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
 import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession;
 import com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession;
 import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenueInfo;
-import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole;
+import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole;
 import com.raytheon.uf.viz.collaboration.comm.provider.Tools;
 import com.raytheon.uf.viz.collaboration.comm.provider.TransferRoleCommand;
 import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
@@ -93,7 +93,7 @@ public class CollaborationSessionView extends SessionView {
                 if (menu == null || menu.isDisposed()) {
                     menu = new Menu(parent);
                 }
-                if (session.hasRole(ParticipantRole.SESSION_LEADER)) {
+                if (session.hasRole(SharedDisplayRole.SESSION_LEADER)) {
                     Action leaderAction = new Action("Session Leader") {
                         public void run() {
                             IStructuredSelection selection = (IStructuredSelection) usersTable
@@ -108,7 +108,7 @@ public class CollaborationSessionView extends SessionView {
                     leaderItem.fill(menu, -1);
                 }
 
-                if (session.hasRole(ParticipantRole.DATA_PROVIDER)) {
+                if (session.hasRole(SharedDisplayRole.DATA_PROVIDER)) {
                     Action dataProviderAction = new Action("Data Provider") {
                         public void run() {
                             IStructuredSelection selection = (IStructuredSelection) usersTable
@@ -152,7 +152,7 @@ public class CollaborationSessionView extends SessionView {
         UserId vp = new UserId(Tools.parseName(fqname), Tools.parseHost(fqname));
         trc.setUser(vp);
         session.setCurrentSessionLeader(vp);
-        trc.setRole(ParticipantRole.SESSION_LEADER);
+        trc.setRole(SharedDisplayRole.SESSION_LEADER);
         try {
             session.sendObjectToVenue(trc);
         } catch (CollaborationException e) {
@@ -236,8 +236,8 @@ public class CollaborationSessionView extends SessionView {
     @Override
     protected void fillContextMenu(IMenuManager manager) {
         super.fillContextMenu(manager);
-        if (session.hasRole(ParticipantRole.DATA_PROVIDER)
-                || session.hasRole(ParticipantRole.SESSION_LEADER)) {
+        if (session.hasRole(SharedDisplayRole.DATA_PROVIDER)
+                || session.hasRole(SharedDisplayRole.SESSION_LEADER)) {
             IStructuredSelection selection = (IStructuredSelection) usersTable
                     .getSelection();
             CollaborationUser selectedUser = (CollaborationUser) selection
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SessionView.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SessionView.java
index 47360f6b16..b986277f13 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SessionView.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SessionView.java
@@ -68,7 +68,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.event.ParticipantEventTyp
 import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenueInfo;
 import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterEntry;
 import com.raytheon.uf.viz.collaboration.comm.provider.Presence;
-import com.raytheon.uf.viz.collaboration.comm.provider.session.SessionManager;
+import com.raytheon.uf.viz.collaboration.comm.provider.session.CollaborationConnection;
 import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
 import com.raytheon.uf.viz.collaboration.data.CollaborationDataManager;
 import com.raytheon.uf.viz.collaboration.data.CollaborationUser;
@@ -139,7 +139,7 @@ public class SessionView extends AbstractSessionView {
             @Override
             public void run() {
                 try {
-                    SessionManager sessionManager = CollaborationDataManager
+                    CollaborationConnection sessionManager = CollaborationDataManager
                             .getInstance().getSessionManager();
                     ISession session = sessionManager.getPeerToPeerSession();
                     PlatformUI
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SharedDisplayParticipantsLabelProvider.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SharedDisplayParticipantsLabelProvider.java
index f11cf175b7..46e99e4027 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SharedDisplayParticipantsLabelProvider.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/session/SharedDisplayParticipantsLabelProvider.java
@@ -25,7 +25,7 @@ import java.util.List;
 import org.eclipse.swt.graphics.Image;
 
 import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession;
-import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole;
+import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole;
 import com.raytheon.uf.viz.collaboration.data.CollaborationUser;
 import com.raytheon.uf.viz.collaboration.data.SharedDisplaySessionMgr;
 import com.raytheon.uf.viz.collaboration.ui.CollaborationUtils;
@@ -62,12 +62,12 @@ public class SharedDisplayParticipantsLabelProvider extends
                     .getCurrentSessionLeader());
             String dataProviderId = CollaborationUtils.makeUserId(sdSession
                     .getCurrentDataProvider());
-            List roleList = new ArrayList();
+            List roleList = new ArrayList();
             if (userId.equals(sessionLeaderId)) {
-                roleList.add(ParticipantRole.SESSION_LEADER);
+                roleList.add(SharedDisplayRole.SESSION_LEADER);
             }
             if (userId.equals(dataProviderId)) {
-                roleList.add(ParticipantRole.DATA_PROVIDER);
+                roleList.add(SharedDisplayRole.DATA_PROVIDER);
             }
             if (roleList.size() > 0) {
                 image = getModifier(roleList, user);
@@ -86,19 +86,19 @@ public class SharedDisplayParticipantsLabelProvider extends
      *            -
      * @return image - modified with indicator(s)
      */
-    private Image getModifier(List roles,
+    private Image getModifier(List roles,
             CollaborationUser user) {
         String key = user.getImageKey();
         StringBuilder modKey = new StringBuilder(key);
         int roleCnt = 0;
-        if (roles.contains(ParticipantRole.SESSION_LEADER)) {
+        if (roles.contains(SharedDisplayRole.SESSION_LEADER)) {
             ++roleCnt;
             modKey.append(":")
-                    .append(ParticipantRole.SESSION_LEADER.toString());
+                    .append(SharedDisplayRole.SESSION_LEADER.toString());
         }
-        if (roles.contains(ParticipantRole.DATA_PROVIDER)) {
+        if (roles.contains(SharedDisplayRole.DATA_PROVIDER)) {
             ++roleCnt;
-            modKey.append(":").append(ParticipantRole.DATA_PROVIDER.toString());
+            modKey.append(":").append(SharedDisplayRole.DATA_PROVIDER.toString());
         }
         Image image = imageMap.get(modKey.toString());
 
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/telestrator/CollaborationPathDrawingTool.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/telestrator/CollaborationPathDrawingTool.java
index bd555aa7ce..5f021ef154 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/telestrator/CollaborationPathDrawingTool.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/telestrator/CollaborationPathDrawingTool.java
@@ -19,7 +19,7 @@
  **/
 package com.raytheon.uf.viz.collaboration.ui.telestrator;
 
-import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole;
+import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole;
 import com.raytheon.uf.viz.collaboration.data.SharedDisplaySessionMgr;
 import com.raytheon.uf.viz.core.rsc.AbstractResourceData;
 import com.raytheon.uf.viz.core.rsc.IInputHandler;
@@ -95,7 +95,7 @@ public class CollaborationPathDrawingTool extends PathDrawingTool {
                     .isAllowDraw();
             boolean isSessionLeader = SharedDisplaySessionMgr
                     .getSessionContainer(session).getSession()
-                    .hasRole(ParticipantRole.SESSION_LEADER);
+                    .hasRole(SharedDisplayRole.SESSION_LEADER);
             if (allowDraw && !isSessionLeader) {
                 return false;
             }
@@ -114,7 +114,7 @@ public class CollaborationPathDrawingTool extends PathDrawingTool {
                     .isAllowDraw();
             boolean isSessionLeader = SharedDisplaySessionMgr
                     .getSessionContainer(session).getSession()
-                    .hasRole(ParticipantRole.SESSION_LEADER);
+                    .hasRole(SharedDisplayRole.SESSION_LEADER);
             if (allowDraw && !isSessionLeader) {
                 return false;
             }
@@ -133,7 +133,7 @@ public class CollaborationPathDrawingTool extends PathDrawingTool {
                     .isAllowDraw();
             boolean isSessionLeader = SharedDisplaySessionMgr
                     .getSessionContainer(session).getSession()
-                    .hasRole(ParticipantRole.SESSION_LEADER);
+                    .hasRole(SharedDisplayRole.SESSION_LEADER);
             if (allowDraw && !isSessionLeader) {
                 return false;
             }
diff --git a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/telestrator/CollaborationPathToolbar.java b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/telestrator/CollaborationPathToolbar.java
index 2d1f3273a9..47acb29f0a 100644
--- a/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/telestrator/CollaborationPathToolbar.java
+++ b/cave/com.raytheon.uf.viz.collaboration.ui/src/com/raytheon/uf/viz/collaboration/ui/telestrator/CollaborationPathToolbar.java
@@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.ToolItem;
 
 import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession;
-import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole;
+import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole;
 import com.raytheon.uf.viz.collaboration.data.SharedDisplaySessionMgr;
 import com.raytheon.uf.viz.collaboration.ui.Activator;
 import com.raytheon.uf.viz.collaboration.ui.telestrator.event.CollaborationDrawingEvent;
@@ -122,7 +122,7 @@ public class CollaborationPathToolbar extends PathToolbar {
             ISharedDisplaySession session = SharedDisplaySessionMgr
                     .getSessionContainer(sessionId).getSession();
             if (session != null
-                    && !session.hasRole(ParticipantRole.SESSION_LEADER)
+                    && !session.hasRole(SharedDisplayRole.SESSION_LEADER)
                     && leaderOnly != null) {
                 leaderOnly.setEnabled(false);
             }
diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/IAccountManager.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/IAccountManager.java
index aa14faed75..c2cd8a08e6 100644
--- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/IAccountManager.java
+++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/IAccountManager.java
@@ -19,14 +19,10 @@
  **/
 package com.raytheon.uf.viz.collaboration.comm.identity;
 
-import java.util.Collection;
 import java.util.Map;
 
-import com.raytheon.uf.viz.collaboration.comm.identity.listener.IMessageFilter;
-import com.raytheon.uf.viz.collaboration.comm.identity.listener.IPresenceListener;
 import com.raytheon.uf.viz.collaboration.comm.identity.roster.ISubscriptionResponder;
 
-
 /**
  * TODO Add Description
  * 
@@ -35,8 +31,8 @@ import com.raytheon.uf.viz.collaboration.comm.identity.roster.ISubscriptionRespo
  * 
  * 
    * EventBus subscription events. - *
  • ISubscriptionResponseEvent : This event is posted when a subscription request has - * been responded to.
  • + *
  • ISubscriptionResponseEvent : This event is posted when a subscription + * request has been responded to.
  • *
* * @@ -73,16 +69,16 @@ public interface IAccountManager { boolean getAutoSubscriptionMode(); /** - * + * * @param responder */ void setSubscriptionRequestResponder(ISubscriptionResponder responder); - + /** * Removes the current subscription request responder. */ void removeSubscriptionRequestResponder(); - + /** * * @param name @@ -90,34 +86,40 @@ public interface IAccountManager { * @param attributes * @throws CollaborationException */ - void createAccount(String name, char [] password, Map attributes) throws CollaborationException; - + void createAccount(String name, char[] password, + Map attributes) throws CollaborationException; + /** - * Allows the user to change their account password. If the server does - * not allow this operation an exception will be thrown. + * Allows the user to change their account password. If the server does not + * allow this operation an exception will be thrown. + * * @param password * @throws CollaborationException */ - void changePassword(char [] password) throws CollaborationException; - + void changePassword(char[] password) throws CollaborationException; + /** * Allows the user to delete this account on the server. An exception will - * be thrown if the account deletion fails. If the account is currently + * be thrown if the account deletion fails. If the account is currently * connected, it and any associated objects will be closed followed by the * account deletion. + * * @throws CollaborationException */ void deleteAccount() throws CollaborationException; - + /** * Can an account be created on the server. + * * @return Can an account be created on the server? - * @throws CollaborationException The query failed. + * @throws CollaborationException + * The query failed. */ boolean canCreateAccount() throws CollaborationException; - + /** * Allow the user to send presence information to the transport provider. + * * @param presence * @return Return status information. * @throws CollaborationException diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/IPeerToPeer.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/IPeerToPeer.java index e3484ff8de..efb9f3b811 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/IPeerToPeer.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/IPeerToPeer.java @@ -25,33 +25,38 @@ import com.raytheon.uf.viz.collaboration.comm.identity.event.IEventPublisher; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Mar 21, 2012            jkorman     Initial creation
- *
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ public interface IPeerToPeer extends ISession, IEventPublisher { /** - * Send a Text message. Note that the recipient of the message is - * included as an attribute of the message. + * Send a Text message. Note that the recipient of the message is included + * as an attribute of the message. + * * @param message */ - int sendPeerToPeer(IMessage message); + void sendPeerToPeer(IMessage message) throws CollaborationException; /** * Send a Text message to a specific receiver. - * @param to The intended receiver. - * @param message The message to send. + * + * @param to + * The intended receiver. + * @param message + * The message to send. */ - int sendPeerToPeer(String to, String message); + void sendPeerToPeer(String to, String message) + throws CollaborationException; } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/ISharedDisplaySession.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/ISharedDisplaySession.java index 78348b59bf..3353f4bfb5 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/ISharedDisplaySession.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/ISharedDisplaySession.java @@ -20,7 +20,7 @@ package com.raytheon.uf.viz.collaboration.comm.identity; import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID; -import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole; +import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole; import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId; /** @@ -121,7 +121,7 @@ public interface ISharedDisplaySession extends IVenueSession { * @param role * @return */ - public boolean hasRole(ParticipantRole role); + public boolean hasRole(SharedDisplayRole role); /** * Gets the connection status of the session. diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/info/IVenueInfo.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/info/IVenueInfo.java index 14c3e760f6..6b3f73fb22 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/info/IVenueInfo.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/info/IVenueInfo.java @@ -19,73 +19,73 @@ **/ package com.raytheon.uf.viz.collaboration.comm.identity.info; -import java.util.Collection; - /** * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Mar 1, 2012            jkorman     Initial creation
- *
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ public interface IVenueInfo { - + /** * * @return */ String getVenueDescription(); - + /** * Get a long name for venue + * * @return */ String getVenueName(); - + /** * * @return */ String getVenueSubject(); - + /** * * @return */ String getVenueID(); - + /** - * Get a count of the current number of room participants - * @return Count of the current number of room participants + * Get a count of the current number of room participants + * + * @return Count of the current number of room participants */ int getParticipantCount(); - + /** * * @return */ boolean isModerated(); - + /** * * @return */ boolean isPersistent(); - + /** * * @return */ boolean requiresPassword(); - + } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/roster/IRosterGroup.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/roster/IRosterGroup.java index 1ce61cc5c2..bd57aaf686 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/roster/IRosterGroup.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/roster/IRosterGroup.java @@ -25,35 +25,27 @@ import java.util.Collection; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Feb 27, 2012            jkorman     Initial creation
- *
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ public interface IRosterGroup extends IRosterItem { /** - * Collection of entries belonging to this group. This method must - * always return a not null collection with zero or more entries. + * Collection of entries belonging to this group. This method must always + * return a not null collection with zero or more entries. + * * @return Entries belonging to this group. */ - Collection getEntries(); - - /** - * Collection of nested groups belonging to this group. This method must - * return a null reference if nested groups are not allowed. If nested - * groups are allowed the method must return a not null collection with - * zero or more entries. - * @return Groups belonging to this group. - */ - Collection getGroups(); - + Collection getEntries(); + } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/roster/IRosterItem.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/roster/IRosterItem.java index 70004c2f57..ed5d54719e 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/roster/IRosterItem.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/roster/IRosterItem.java @@ -19,22 +19,21 @@ **/ package com.raytheon.uf.viz.collaboration.comm.identity.roster; - /** * * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Feb 27, 2012            jkorman     Initial creation
- *
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ public interface IRosterItem { @@ -44,16 +43,11 @@ public interface IRosterItem { * @return */ String getName(); - + /** * * @return */ IRosterItem getParent(); - - /** - * Get a reference to the roster containing this item. - * @return The containing roster. - */ - IRoster getRoster(); + } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/IVenueId.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/IVenueId.java index de9a5b002f..f6e8677f28 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/IVenueId.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/IVenueId.java @@ -23,27 +23,21 @@ package com.raytheon.uf.viz.collaboration.comm.identity.user; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Mar 29, 2012            jkorman     Initial creation
- *
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ public interface IVenueId extends IQualifiedID { - + String getVenueName(); - - - String getDomain(); - - - } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/ParticipantRole.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/SharedDisplayRole.java similarity index 97% rename from cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/ParticipantRole.java rename to cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/SharedDisplayRole.java index 08e91661ad..bffbcdaab1 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/ParticipantRole.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/identity/user/SharedDisplayRole.java @@ -36,6 +36,6 @@ package com.raytheon.uf.viz.collaboration.comm.identity.user; * @version 1.0 */ -public enum ParticipantRole { +public enum SharedDisplayRole { DATA_PROVIDER, SESSION_LEADER, PARTICIPANT; } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/Errors.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/Errors.java deleted file mode 100644 index 408464e593..0000000000 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/Errors.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This software was developed and / or modified by Raytheon Company, - * pursuant to Contract DG133W-05-CQ-1067 with the US Government. - * - * U.S. EXPORT CONTROLLED TECHNICAL DATA - * This software product contains export-restricted data whose - * export/transfer/disclosure is restricted by U.S. law. Dissemination - * to non-U.S. persons whether in the United States or abroad requires - * an export license or other authorization. - * - * Contractor Name: Raytheon Company - * Contractor Address: 6825 Pine Street, Suite 340 - * Mail Stop B8 - * Omaha, NE 68106 - * 402.291.0100 - * - * See the AWIPS II Master Rights File ("Master Rights File.pdf") for - * further licensing information. - **/ -package com.raytheon.uf.viz.collaboration.comm.provider; - -/** - * TODO Add Description - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Mar 8, 2012            jkorman     Initial creation
- * 
- * 
- * - * @author jkorman - * @version 1.0 - */ - -public abstract class Errors { - - public static final int NO_ERROR = 0; - - public static final int CANNOT_CONNECT = -50; - - public static final int ALREADY_CONNECTED = -51; - - public static final int BAD_NAME = -52; - - // Error - An attempt to use a Venue that has been disposed. - public static final int VENUE_DISPOSED = -100; - - // Error - Venue exists when attempting to create a new venue. - public static final int VENUE_EXISTS = -101; - - // Error - Venue not found when attempting to join an existing venue. - public static final int VENUE_NOT_FOUND = -102; - -} diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/TransferRoleCommand.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/TransferRoleCommand.java index bbdc7977e8..e521663359 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/TransferRoleCommand.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/TransferRoleCommand.java @@ -21,7 +21,7 @@ package com.raytheon.uf.viz.collaboration.comm.provider; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; -import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole; +import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole; import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId; /** @@ -45,16 +45,16 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId; public class TransferRoleCommand { @DynamicSerializeElement - private ParticipantRole role; + private SharedDisplayRole role; @DynamicSerializeElement private UserId user; - public ParticipantRole getRole() { + public SharedDisplayRole getRole() { return role; } - public void setRole(ParticipantRole role) { + public void setRole(SharedDisplayRole role) { this.role = role; } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/Roster.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/Roster.java index dc5fee741b..0e2d2e0b5e 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/Roster.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/Roster.java @@ -124,11 +124,6 @@ public class Roster extends RosterItem implements IRoster { if (re == null) { // put in the internal entries first. internalEntries.put(entry.getUser(), entry); - - for (IRosterGroup g : entry.getGroups()) { - RosterGroup rg = (RosterGroup) g; - rg.setRoster(this); - } } } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterGroup.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterGroup.java index ff626229b6..7498511898 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterGroup.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterGroup.java @@ -51,15 +51,12 @@ public class RosterGroup extends RosterItem implements IRosterGroup { private Map entries = null; - private Map groups = null; - /** * */ public RosterGroup(String name, IRosterItem parent, IRoster roster) { super(name, parent, roster); entries = new HashMap(); - groups = new HashMap(); } /** @@ -97,12 +94,4 @@ public class RosterGroup extends RosterItem implements IRosterGroup { return entries.remove(entry.getUser()); } - /** - * - * @see com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterGroup#getGroups() - */ - @Override - public Collection getGroups() { - return groups.values(); - } } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterItem.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterItem.java index 4549e42f74..23cf87ecaa 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterItem.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterItem.java @@ -63,9 +63,6 @@ public class RosterItem implements IRosterItem { // private IRosterItem parent = null; - // - private IRoster roster = null; - /** * * @param name @@ -75,7 +72,6 @@ public class RosterItem implements IRosterItem { public RosterItem(String name, IRosterItem parent, IRoster roster) { this.name = name; this.parent = parent; - this.roster = roster; } /** @@ -127,23 +123,6 @@ public class RosterItem implements IRosterItem { return parent; } - /** - * - * @param roster - */ - public void setRoster(IRoster roster) { - this.roster = roster; - } - - /** - * - * @see com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterItem#getRoster() - */ - @Override - public IRoster getRoster() { - return null; - } - /** * * @see java.lang.Object#hashCode() diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterManager.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterManager.java index bf9aaf818d..95db51356f 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterManager.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/roster/RosterManager.java @@ -33,7 +33,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRoster; import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterEntry; import com.raytheon.uf.viz.collaboration.comm.identity.roster.IRosterManager; import com.raytheon.uf.viz.collaboration.comm.provider.Presence; -import com.raytheon.uf.viz.collaboration.comm.provider.session.SessionManager; +import com.raytheon.uf.viz.collaboration.comm.provider.session.CollaborationConnection; import com.raytheon.uf.viz.collaboration.comm.provider.user.IDConverter; import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId; @@ -56,19 +56,17 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId; public class RosterManager implements IRosterManager { - private String owner; - private IRoster roster; private org.eclipse.ecf.presence.roster.IRoster baseRoster; - private SessionManager sessionManager; + private CollaborationConnection sessionManager; /** * * @param roster */ - public RosterManager(SessionManager manager) { + public RosterManager(CollaborationConnection manager) { sessionManager = manager; updateRoster(); } @@ -243,12 +241,8 @@ public class RosterManager implements IRosterManager { * * @return */ - public SessionManager getSessionManager() { + public CollaborationConnection getSessionManager() { return sessionManager; } - private void printRoster(IRoster roster) { - - } - } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/AccountManager.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/AccountManager.java index 3e89831016..4cfeac9fb2 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/AccountManager.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/AccountManager.java @@ -35,7 +35,6 @@ import com.raytheon.uf.viz.collaboration.comm.identity.IPresence; import com.raytheon.uf.viz.collaboration.comm.identity.roster.ISubscriptionResponder; import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID; import com.raytheon.uf.viz.collaboration.comm.provider.Presence; -import com.raytheon.uf.viz.collaboration.comm.provider.Tools; /** * TODO Add Description @@ -102,13 +101,14 @@ public class AccountManager implements IAccountManager { private ISubscriptionResponder responder; - private SessionManager sessionManager = null; + private CollaborationConnection sessionManager = null; /** * * @param adapter */ - AccountManager(IPresenceContainerAdapter adapter, SessionManager manager) { + AccountManager(IPresenceContainerAdapter adapter, + CollaborationConnection manager) { sessionManager = manager; presenceAdapter = adapter; presenceAdapter.getRosterManager().addRosterSubscriptionListener( @@ -246,7 +246,8 @@ public class AccountManager implements IAccountManager { try { manager.createAccount(name, new String(password), map); } catch (ECFException e) { - throw new CollaborationException("Could not create account "); + throw new CollaborationException( + "Could not create account "); } } // all done so clear the password. @@ -297,7 +298,5 @@ public class AccountManager implements IAccountManager { throw new CollaborationException("Could not send presence"); } } - - - + } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/BaseSession.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/BaseSession.java index f6b6817145..beefe9a5eb 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/BaseSession.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/BaseSession.java @@ -69,7 +69,7 @@ public abstract class BaseSession implements ISession { private Namespace connectionNamespace = null; // The session manager that created this session. - private SessionManager sessionManager; + private CollaborationConnection sessionManager; /** * @@ -78,7 +78,7 @@ public abstract class BaseSession implements ISession { * @param manager */ protected BaseSession(IContainer container, EventBus externalBus, - SessionManager manager) throws CollaborationException { + CollaborationConnection manager) throws CollaborationException { this(container, externalBus, manager, UUID.randomUUID().toString()); } @@ -90,7 +90,7 @@ public abstract class BaseSession implements ISession { * @param sessionId */ protected BaseSession(IContainer container, EventBus externalBus, - SessionManager manager, String sessionId) + CollaborationConnection manager, String sessionId) throws CollaborationException { // Set the session identifier. this.sessionId = sessionId; @@ -161,7 +161,7 @@ public abstract class BaseSession implements ISession { * * @return */ - SessionManager getSessionManager() { + CollaborationConnection getSessionManager() { return sessionManager; } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/SessionManager.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/CollaborationConnection.java similarity index 97% rename from cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/SessionManager.java rename to cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/CollaborationConnection.java index b8af526ac6..cac214efb9 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/SessionManager.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/CollaborationConnection.java @@ -101,6 +101,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueId; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Feb 24, 2012 jkorman Initial creation + * Apr 18, 2012 njensen Major cleanup * *
* @@ -109,10 +110,10 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueId; * @see com.raytheon.uf.viz.collaboration.comm.identity.event.IVenueInvitationEvent */ -public class SessionManager implements IEventPublisher { +public class CollaborationConnection implements IEventPublisher { private static final transient IUFStatusHandler statusHandler = UFStatus - .getHandler(SessionManager.class); + .getHandler(CollaborationConnection.class); private static final String PROVIDER = "ecf.xmpp.smack"; @@ -154,7 +155,7 @@ public class SessionManager implements IEventPublisher { * @throws ContainerCreateException * */ - public SessionManager(String account, String password) + public CollaborationConnection(String account, String password) throws CollaborationException { this(account, password, (IRosterEventSubscriber) null); } @@ -170,7 +171,7 @@ public class SessionManager implements IEventPublisher { * @throws ContainerCreateException * */ - public SessionManager(String account, String password, + public CollaborationConnection(String account, String password, IPresence initialPresence) throws Exception { this(account, password, (IRosterEventSubscriber) null); if (accountManager != null) { @@ -192,7 +193,7 @@ public class SessionManager implements IEventPublisher { * A roster event subscriber. * @throws CollaborationException */ - public SessionManager(String account, String password, + public CollaborationConnection(String account, String password, IRosterEventSubscriber rosterEventSubscriber) throws CollaborationException { eventBus = new EventBus(); @@ -484,9 +485,9 @@ public class SessionManager implements IEventPublisher { session.joinVenue(venueName); sessions.put(session.getSessionId(), session); } - } catch (Exception e) { - + throw new CollaborationException( + "Error joining venue " + venueName, e); } return session; } @@ -506,9 +507,9 @@ public class SessionManager implements IEventPublisher { session.createVenue(venueName, subject); sessions.put(session.getSessionId(), session); } - } catch (Exception e) { - + throw new CollaborationException("Error creating venue " + + venueName, e); } return session; } @@ -542,11 +543,7 @@ public class SessionManager implements IEventPublisher { info.add(vi); } } - } else { - // Could not create venueManager } - } else { - // not currently connected } return info; @@ -578,8 +575,6 @@ public class SessionManager implements IEventPublisher { if (rosterManager != null) { ((RosterManager) rosterManager).updateEntry(id, p); - } else { - // No rosterManager - nothing to do } } }); @@ -644,8 +639,7 @@ public class SessionManager implements IEventPublisher { private void setupP2PComm(IPresenceContainerAdapter presenceAdapter) { if (isConnected() && (presenceAdapter != null)) { - PeerToPeerCommHelper helper = new PeerToPeerCommHelper(this, - presenceAdapter); + PeerToPeerCommHelper helper = new PeerToPeerCommHelper(this); presenceAdapter.getChatManager().addMessageListener(helper); } } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/PeerToPeerChat.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/PeerToPeerChat.java index 3c13b4b6b1..16629e88f8 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/PeerToPeerChat.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/PeerToPeerChat.java @@ -34,7 +34,6 @@ 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.IPeerToPeer; import com.raytheon.uf.viz.collaboration.comm.identity.IPropertied.Property; -import com.raytheon.uf.viz.collaboration.comm.provider.Errors; /** * @@ -48,6 +47,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.Errors; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Mar 21, 2012 jkorman Initial creation + * Apr 18, 2012 njensen Cleanup * * * @@ -66,19 +66,18 @@ public class PeerToPeerChat extends BaseSession implements IPeerToPeer { * @param manager */ PeerToPeerChat(IContainer container, EventBus externalBus, - SessionManager manager) throws CollaborationException { + CollaborationConnection manager) throws CollaborationException { super(container, externalBus, manager); chatSender = getConnectionPresenceAdapter().getChatManager() .getChatMessageSender(); } /** + * @throws CollaborationException * */ @Override - public int sendPeerToPeer(IMessage message) { - // Assume success - int status = Errors.NO_ERROR; + public void sendPeerToPeer(IMessage message) throws CollaborationException { if (chatSender != null) { ID toID = createID(message.getTo().getFQName()); String subject = message.getSubject(); @@ -95,11 +94,11 @@ public class PeerToPeerChat extends BaseSession implements IPeerToPeer { chatSender.sendChatMessage(toID, null, IChatMessage.Type.CHAT, subject, body, props); } catch (ECFException e) { - System.out.println("Error sending message"); - e.printStackTrace(); + throw new CollaborationException( + "Error sending message to peer " + + message.getTo().getName(), e); } } - return status; } /** @@ -109,20 +108,18 @@ public class PeerToPeerChat extends BaseSession implements IPeerToPeer { * The recipient of the message. * @param message * The body of the message to send. + * @throws CollaborationException */ @Override - public int sendPeerToPeer(String to, String message) { - // Assume success - int status = Errors.NO_ERROR; + public void sendPeerToPeer(String to, String message) + throws CollaborationException { ID toID = createID(to); try { chatSender.sendChatMessage(toID, message); } catch (ECFException e) { - System.out.println("Error sending message"); - e.printStackTrace(); + throw new CollaborationException("Error sending message to peer " + + to, e); } - - return status; } /** diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/PeerToPeerCommHelper.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/PeerToPeerCommHelper.java index 60d6ae063b..b213e3a41b 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/PeerToPeerCommHelper.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/PeerToPeerCommHelper.java @@ -23,7 +23,6 @@ import java.util.Map; import org.eclipse.ecf.presence.IIMMessageEvent; import org.eclipse.ecf.presence.IIMMessageListener; -import org.eclipse.ecf.presence.IPresenceContainerAdapter; import org.eclipse.ecf.presence.im.IChatMessage; import org.eclipse.ecf.presence.im.IChatMessageEvent; @@ -55,18 +54,14 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId; public class PeerToPeerCommHelper implements IIMMessageListener { - private SessionManager manager; - - private IPresenceContainerAdapter presenceAdapter; + private CollaborationConnection manager; /** * * @param manager * @param presenceAdapter */ - PeerToPeerCommHelper(SessionManager manager, - IPresenceContainerAdapter presenceAdapter) { - this.presenceAdapter = presenceAdapter; + PeerToPeerCommHelper(CollaborationConnection manager) { this.manager = manager; } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/SharedDisplaySession.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/SharedDisplaySession.java index 5e3dd568ba..1e449c12f8 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/SharedDisplaySession.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/SharedDisplaySession.java @@ -25,13 +25,13 @@ import com.google.common.eventbus.EventBus; import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException; import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession; import com.raytheon.uf.viz.collaboration.comm.identity.invite.VenueInvite; -import com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole; +import com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole; import com.raytheon.uf.viz.collaboration.comm.provider.TextMessage; import com.raytheon.uf.viz.collaboration.comm.provider.Tools; import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId; /** - * TODO Add Description + * A session that shares editors. * *
  * 
@@ -55,12 +55,12 @@ public class SharedDisplaySession extends VenueSession implements
     private UserId dataProvider = null;
 
     public SharedDisplaySession(IContainer container, EventBus externalBus,
-            SessionManager manager) throws CollaborationException {
+            CollaborationConnection manager) throws CollaborationException {
         super(container, externalBus, manager);
     }
 
     public SharedDisplaySession(IContainer container, EventBus externalBus,
-            SessionManager manager, String sessionId)
+            CollaborationConnection manager, String sessionId)
             throws CollaborationException {
         super(container, externalBus, manager, sessionId);
     }
@@ -115,15 +115,15 @@ public class SharedDisplaySession extends VenueSession implements
     }
 
     /**
-     * @see com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession#hasRole(com.raytheon.uf.viz.collaboration.comm.identity.user.ParticipantRole)
+     * @see com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession#hasRole(com.raytheon.uf.viz.collaboration.comm.identity.user.SharedDisplayRole)
      */
     @Override
-    public boolean hasRole(ParticipantRole role) {
+    public boolean hasRole(SharedDisplayRole role) {
         boolean result = true;
-        if (role.equals(ParticipantRole.DATA_PROVIDER)
+        if (role.equals(SharedDisplayRole.DATA_PROVIDER)
                 && !this.getUserID().equals(this.getCurrentDataProvider())) {
             result = false;
-        } else if (role.equals(ParticipantRole.SESSION_LEADER)
+        } else if (role.equals(SharedDisplayRole.SESSION_LEADER)
                 && !this.getUserID().equals(this.getCurrentSessionLeader())) {
             result = false;
         }
diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/VenueSession.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/VenueSession.java
index 0ca568eb82..5ce9be4f17 100644
--- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/VenueSession.java
+++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/session/VenueSession.java
@@ -84,6 +84,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Feb 24, 2012            jkorman     Initial creation
+ * Apr 17, 2012            njensen      Major refactor
  * 
  * 
* @@ -123,7 +124,7 @@ public class VenueSession extends BaseSession implements IVenueSession { * @param eventBus */ protected VenueSession(IContainer container, EventBus externalBus, - SessionManager manager, String sessionId) + CollaborationConnection manager, String sessionId) throws CollaborationException { super(container, externalBus, manager, sessionId); } @@ -134,7 +135,7 @@ public class VenueSession extends BaseSession implements IVenueSession { * @param eventBus */ protected VenueSession(IContainer container, EventBus externalBus, - SessionManager manager) throws CollaborationException { + CollaborationConnection manager) throws CollaborationException { super(container, externalBus, manager); } @@ -441,7 +442,6 @@ public class VenueSession extends BaseSession implements IVenueSession { ID from = message.getFromID(); String name = Tools.parseName(from.getName()); - String host = Tools.parseHost(from.getName()); String account = getSessionManager().getAccount(); String aName = Tools.parseName(account); diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/user/UserId.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/user/UserId.java index cf69ddbb98..3c5bfa9a42 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/user/UserId.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/user/UserId.java @@ -33,6 +33,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Feb 24, 2012 jkorman Initial creation + * Apr 18, 2012 njensen Major refactor * * * @@ -171,11 +172,19 @@ public class UserId implements IQualifiedID { return sb.toString(); } - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + @Override + public String toString() { + return this.getFQName(); + } + @Override public int hashCode() { final int prime = 31; @@ -187,18 +196,13 @@ public class UserId implements IQualifiedID { return result; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; - if (getClass() != obj.getClass()) + if (!(obj instanceof UserId)) return false; UserId other = (UserId) obj; if (host == null) { @@ -219,17 +223,4 @@ public class UserId implements IQualifiedID { return true; } - public String getAlias() { - return alias; - } - - public void setAlias(String alias) { - this.alias = alias; - } - - @Override - public String toString() { - return this.getFQName(); - } - } diff --git a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/user/VenueId.java b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/user/VenueId.java index 037f19b702..cdfcff26b5 100644 --- a/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/user/VenueId.java +++ b/cave/com.raytheon.uf.viz.collaboration/src/com/raytheon/uf/viz/collaboration/comm/provider/user/VenueId.java @@ -25,31 +25,29 @@ import com.raytheon.uf.viz.collaboration.comm.identity.user.IVenueId; * TODO Add Description * *
- *
+ * 
  * SOFTWARE HISTORY
- *
+ * 
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Mar 29, 2012            jkorman     Initial creation
- *
+ * 
  * 
- * + * * @author jkorman - * @version 1.0 + * @version 1.0 */ public class VenueId implements IVenueId { private String host; - + private String resource; - + private String venueName; - + private String name; - - private String domain; - + /** * @see com.raytheon.uf.viz.collaboration.comm.identity.user.IQualifiedID#setHost(java.lang.String) */ @@ -115,12 +113,4 @@ public class VenueId implements IVenueId { return venueName; } - /** - * @see com.raytheon.uf.viz.collaboration.comm.identity.user.IVenueId#getDomain() - */ - @Override - public String getDomain() { - return null; - } - }