### Eclipse Workspace Patch 1.0 #P Spark Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/Workpane.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/Workpane.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/Workpane.java (working copy) @@ -11,6 +11,45 @@ package org.jivesoftware.fastpath.workspace; +import java.applet.Applet; +import java.applet.AudioClip; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.Frame; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +import javax.swing.BorderFactory; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTabbedPane; +import javax.swing.ScrollPaneConstants; +import javax.swing.SwingUtilities; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +import org.jivesoftware.MainWindow; +import org.jivesoftware.Spark; import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.resources.FastpathRes; @@ -32,15 +71,6 @@ import org.jivesoftware.fastpath.workspace.panes.UserInvitationPane; import org.jivesoftware.fastpath.workspace.search.ChatSearch; import org.jivesoftware.fastpath.workspace.util.RequestUtils; -import com.jivesoftware.smack.workgroup.MetaData; -import com.jivesoftware.smack.workgroup.agent.InvitationRequest; -import com.jivesoftware.smack.workgroup.agent.Offer; -import com.jivesoftware.smack.workgroup.agent.OfferListener; -import com.jivesoftware.smack.workgroup.agent.RevokedOffer; -import com.jivesoftware.smack.workgroup.agent.TransferRequest; -import com.jivesoftware.smack.workgroup.user.Workgroup; -import org.jivesoftware.MainWindow; -import org.jivesoftware.Spark; import org.jivesoftware.resource.SoundsRes; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; @@ -49,6 +79,13 @@ import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smackx.Form; import org.jivesoftware.smackx.muc.MultiUserChat; +import org.jivesoftware.smackx.workgroup.MetaData; +import org.jivesoftware.smackx.workgroup.agent.InvitationRequest; +import org.jivesoftware.smackx.workgroup.agent.Offer; +import org.jivesoftware.smackx.workgroup.agent.OfferListener; +import org.jivesoftware.smackx.workgroup.agent.RevokedOffer; +import org.jivesoftware.smackx.workgroup.agent.TransferRequest; +import org.jivesoftware.smackx.workgroup.user.Workgroup; import org.jivesoftware.spark.DataManager; import org.jivesoftware.spark.SparkManager; import org.jivesoftware.spark.UserManager; @@ -71,43 +108,6 @@ import org.jivesoftware.spark.util.log.Log; import org.jivesoftware.sparkimpl.plugin.alerts.SparkToaster; -import javax.swing.BorderFactory; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTabbedPane; -import javax.swing.ScrollPaneConstants; -import javax.swing.SwingUtilities; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import java.applet.Applet; -import java.applet.AudioClip; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.Frame; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; - public class Workpane { // Tracks all the offers coming into the client. private Map offerMap = new HashMap(); @@ -549,7 +549,7 @@ } private void handleOffer(final Offer offer) { - if (offer.getContent().isInvitation() || offer.getContent().isTransfer()) { + if (offer.getContent() instanceof InvitationRequest || offer.getContent() instanceof TransferRequest) { handleOfferInvite(offer); return; } @@ -624,10 +624,10 @@ return; } - UserInvitationPane pane = invitations.get(revokedOffer.getRequestID()); + UserInvitationPane pane = invitations.get(revokedOffer.getSessionID()); if (pane != null) { pane.dispose(); - invitations.remove(revokedOffer.getRequestID()); + invitations.remove(revokedOffer.getSessionID()); } } }); @@ -707,11 +707,11 @@ UserInvitationPane invitationPane = null; - if (offer.getContent().isInvitation()) { + if (offer.getContent() instanceof InvitationRequest) { InvitationRequest request = (InvitationRequest)offer.getContent(); invitationPane = new UserInvitationPane(offer, utils, request.getRoom(), request.getInviter(), request.getReason()); } - else if (offer.getContent().isTransfer()) { + else if (offer.getContent() instanceof TransferRequest) { TransferRequest request = (TransferRequest)offer.getContent(); invitationPane = new UserInvitationPane(offer, utils, request.getRoom(), request.getInviter(), request.getReason()); } Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/FormText.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/FormText.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/FormText.java (working copy) @@ -10,11 +10,11 @@ */ package org.jivesoftware.fastpath.internal; -import com.jivesoftware.smack.workgroup.settings.ChatSetting; - import java.text.SimpleDateFormat; import java.util.Date; +import org.jivesoftware.smackx.workgroup.settings.ChatSetting; + public class FormText { public static final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("MM/dd/yy h:mm"); Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/CoBrowser.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/CoBrowser.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/CoBrowser.java (working copy) @@ -10,26 +10,6 @@ */ package org.jivesoftware.fastpath.workspace.assistants; -import org.jivesoftware.fastpath.FastpathPlugin; -import org.jivesoftware.fastpath.FpRes; -import org.jivesoftware.fastpath.workspace.util.RequestUtils; -import org.jivesoftware.fastpath.workspace.panes.BackgroundPane; -import com.jivesoftware.smack.workgroup.util.ModelUtil; -import org.jivesoftware.spark.SparkManager; -import org.jivesoftware.spark.ChatManager; -import org.jivesoftware.spark.component.RolloverButton; -import org.jivesoftware.spark.component.browser.BrowserFactory; -import org.jivesoftware.spark.component.browser.BrowserListener; -import org.jivesoftware.spark.component.browser.BrowserViewer; -import org.jivesoftware.spark.ui.ChatRoom; -import org.jivesoftware.spark.ui.rooms.GroupChatRoom; -import org.jivesoftware.spark.util.GraphicUtils; -import org.jivesoftware.spark.util.log.Log; -import org.jivesoftware.fastpath.resources.FastpathRes; -import org.jivesoftware.smack.XMPPException; -import org.jivesoftware.smack.packet.Message; -import org.jivesoftware.smackx.MessageEventManager; - import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Font; @@ -51,6 +31,26 @@ import javax.swing.JTextField; import javax.swing.JToolBar; +import org.jivesoftware.fastpath.FastpathPlugin; +import org.jivesoftware.fastpath.FpRes; +import org.jivesoftware.fastpath.resources.FastpathRes; +import org.jivesoftware.fastpath.workspace.panes.BackgroundPane; +import org.jivesoftware.fastpath.workspace.util.RequestUtils; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.packet.Message; +import org.jivesoftware.smackx.MessageEventManager; +import org.jivesoftware.smackx.workgroup.util.ModelUtil; +import org.jivesoftware.spark.ChatManager; +import org.jivesoftware.spark.SparkManager; +import org.jivesoftware.spark.component.RolloverButton; +import org.jivesoftware.spark.component.browser.BrowserFactory; +import org.jivesoftware.spark.component.browser.BrowserListener; +import org.jivesoftware.spark.component.browser.BrowserViewer; +import org.jivesoftware.spark.ui.ChatRoom; +import org.jivesoftware.spark.ui.rooms.GroupChatRoom; +import org.jivesoftware.spark.util.GraphicUtils; +import org.jivesoftware.spark.util.log.Log; + /** * Creates a new CoBrowser component. The CoBrowser is ChatRoom specific and is used Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/macros/MacroPanel.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/macros/MacroPanel.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/macros/MacroPanel.java (working copy) @@ -30,7 +30,9 @@ * UI to create a single personal macro within the FastPath Client. */ public class MacroPanel extends JPanel { - private JLabel titleLabel; + + private static final long serialVersionUID = 1L; + private JLabel titleLabel; private JLabel typeLabel; private JLabel responseLabel; Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/Notes.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/Notes.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/Notes.java (working copy) @@ -11,12 +11,31 @@ package org.jivesoftware.fastpath.workspace.assistants; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextPane; +import javax.swing.JToolBar; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.resources.FastpathRes; import org.jivesoftware.fastpath.workspace.panes.BackgroundPane; -import com.jivesoftware.smack.workgroup.agent.AgentSession; import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smackx.workgroup.agent.AgentSession; import org.jivesoftware.spark.SparkManager; import org.jivesoftware.spark.component.RolloverButton; import org.jivesoftware.spark.ui.ChatRoom; @@ -26,25 +45,6 @@ import org.jivesoftware.spark.util.SwingWorker; import org.jivesoftware.spark.util.log.Log; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTextPane; -import javax.swing.JToolBar; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; - -import java.awt.BorderLayout; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; - public class Notes extends JPanel { private JFrame notesFrame; private JScrollPane scrollPane; Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatQueue.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatQueue.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatQueue.java (working copy) @@ -11,15 +11,31 @@ package org.jivesoftware.fastpath.workspace.panes; +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.Date; +import java.util.Iterator; +import java.util.Map; + +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JProgressBar; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.resources.FastpathRes; import org.jivesoftware.fastpath.workspace.assistants.RoomInformation; import org.jivesoftware.fastpath.workspace.util.RequestUtils; -import com.jivesoftware.smack.workgroup.agent.Offer; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.Form; import org.jivesoftware.smackx.FormField; +import org.jivesoftware.smackx.workgroup.agent.Offer; import org.jivesoftware.spark.component.LinkLabel; import org.jivesoftware.spark.component.RolloverButton; import org.jivesoftware.spark.component.WrappedLabel; @@ -28,24 +44,10 @@ import org.jivesoftware.spark.util.SwingWorker; import org.jivesoftware.spark.util.log.Log; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JProgressBar; - -import java.awt.Color; -import java.awt.Font; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.FlowLayout; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.Date; -import java.util.Iterator; -import java.util.Map; +public class ChatQueue extends JPanel { -public class ChatQueue extends JPanel { - private JLabel nameLabel = new JLabel(); + private static final long serialVersionUID = 1L; + private JLabel nameLabel = new JLabel(); private RolloverButton acceptButton; private RolloverButton declineButton; private LinkLabel viewLabel; Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/QueueActivity.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/QueueActivity.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/QueueActivity.java (working copy) @@ -11,29 +11,31 @@ package org.jivesoftware.fastpath.workspace.panes; -import org.jivesoftware.fastpath.FastpathPlugin; -import com.jivesoftware.smack.workgroup.agent.QueueUsersListener; -import com.jivesoftware.smack.workgroup.agent.WorkgroupQueue; +import java.awt.BorderLayout; +import java.awt.Color; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import javax.swing.BorderFactory; import javax.swing.DefaultListModel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.BorderFactory; -import java.awt.BorderLayout; -import java.awt.Color; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; +import org.jivesoftware.fastpath.FastpathPlugin; +import org.jivesoftware.smackx.workgroup.agent.QueueUsersListener; +import org.jivesoftware.smackx.workgroup.agent.WorkgroupQueue; /** * UI for displaying all queue information pertaining to a single workgroup. */ public final class QueueActivity extends JPanel implements QueueUsersListener { - private DefaultListModel model = new DefaultListModel(); + + private static final long serialVersionUID = 1L; + private DefaultListModel model = new DefaultListModel(); private JList list; private Map queues = new HashMap(); Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/AgentConversations.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/AgentConversations.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/AgentConversations.java (working copy) @@ -10,17 +10,42 @@ package org.jivesoftware.fastpath.workspace.panes; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.BorderFactory; +import javax.swing.DefaultListModel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import javax.swing.JScrollPane; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; -import com.jivesoftware.smack.workgroup.agent.AgentRoster; -import com.jivesoftware.smack.workgroup.agent.AgentRosterListener; -import com.jivesoftware.smack.workgroup.packet.AgentStatus; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smackx.Form; import org.jivesoftware.smackx.muc.Affiliate; import org.jivesoftware.smackx.muc.MultiUserChat; +import org.jivesoftware.smackx.workgroup.agent.AgentRoster; +import org.jivesoftware.smackx.workgroup.agent.AgentRosterListener; +import org.jivesoftware.smackx.workgroup.packet.AgentStatus; import org.jivesoftware.spark.SparkManager; import org.jivesoftware.spark.component.tabbedPane.SparkTab; import org.jivesoftware.spark.component.tabbedPane.SparkTabbedPaneListener; @@ -31,37 +56,13 @@ import org.jivesoftware.sparkimpl.settings.local.LocalPreferences; import org.jivesoftware.sparkimpl.settings.local.SettingsManager; -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.BorderFactory; -import javax.swing.DefaultListModel; -import javax.swing.JList; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.JScrollPane; -import javax.swing.event.ChangeEvent; -import javax.swing.event.ChangeListener; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.event.ActionEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - /** * UI to show all chats occuring. */ public final class AgentConversations extends JPanel implements ChangeListener { - private DefaultListModel model = new DefaultListModel(); + private static final long serialVersionUID = 1L; + private DefaultListModel model = new DefaultListModel(); private JList list; private Map sessionMap = new HashMap(); @@ -212,7 +213,10 @@ private void calculateNumberOfChats(AgentRoster agentRoster) { int counter = 0; - for (String agent : agentRoster.getAgents()) { + // TODO: CHECK FASTPATH + //for (String agent : agentRoster.getAgents()) { + for (Iterator it = agentRoster.getAgents().iterator(); it.hasNext();) { + String agent = (String)it.next(); Presence presence = agentRoster.getPresence(agent); if (presence.isAvailable()) { AgentStatus agentStatus = (AgentStatus)presence.getExtension("agent-status", "http://jabber.org/protocol/workgroup"); Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/QueueItem.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/QueueItem.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/QueueItem.java (working copy) @@ -35,7 +35,9 @@ public class QueueItem extends JPanel { - private JLabel queueNameLabel = new JLabel(); + + private static final long serialVersionUID = 1L; + private JLabel queueNameLabel = new JLabel(); private JLabel numberInQueueLabel = new JLabel(); private JLabel averageWaitTimeLabel = new JLabel(); private JLabel lastCustomerLabel = new JLabel(); Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/AgentConversation.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/AgentConversation.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/AgentConversation.java (working copy) @@ -28,7 +28,9 @@ import org.jivesoftware.spark.UserManager; public class AgentConversation extends JPanel { - private JLabel agentLabel = new JLabel(); + + private static final long serialVersionUID = 4723796422650155313L; + private JLabel agentLabel = new JLabel(); private JLabel visitorLabel = new JLabel(); private JLabel emailLabel = new JLabel(); private JLabel dateLabel = new JLabel(); Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/FastpathPlugin.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/FastpathPlugin.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/FastpathPlugin.java (working copy) @@ -11,29 +11,6 @@ package org.jivesoftware.fastpath; -import org.jivesoftware.fastpath.resources.FastpathRes; -import org.jivesoftware.fastpath.workspace.Workpane; -import org.jivesoftware.fastpath.workspace.panes.BackgroundPane; -import com.jivesoftware.smack.workgroup.agent.Agent; -import com.jivesoftware.smack.workgroup.agent.AgentSession; -import com.jivesoftware.smack.workgroup.ext.macros.Macros; -import com.jivesoftware.smack.workgroup.user.Workgroup; -import org.jivesoftware.smack.ConnectionListener; -import org.jivesoftware.smack.XMPPConnection; -import org.jivesoftware.smack.XMPPException; -import org.jivesoftware.smack.packet.Presence; -import org.jivesoftware.smack.util.StringUtils; -import org.jivesoftware.smackx.packet.DiscoverItems; -import org.jivesoftware.spark.PluginManager; -import org.jivesoftware.spark.SparkManager; -import org.jivesoftware.spark.Workspace; -import org.jivesoftware.spark.component.RolloverButton; -import org.jivesoftware.spark.plugin.Plugin; -import org.jivesoftware.spark.util.SwingTimerTask; -import org.jivesoftware.spark.util.SwingWorker; -import org.jivesoftware.spark.util.TaskEngine; -import org.jivesoftware.spark.util.log.Log; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; @@ -55,6 +32,29 @@ import javax.swing.JPanel; import javax.swing.SwingUtilities; +import org.jivesoftware.fastpath.resources.FastpathRes; +import org.jivesoftware.fastpath.workspace.Workpane; +import org.jivesoftware.fastpath.workspace.panes.BackgroundPane; +import org.jivesoftware.smack.ConnectionListener; +import org.jivesoftware.smack.XMPPConnection; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.packet.Presence; +import org.jivesoftware.smack.util.StringUtils; +import org.jivesoftware.smackx.packet.DiscoverItems; +import org.jivesoftware.smackx.workgroup.agent.Agent; +import org.jivesoftware.smackx.workgroup.agent.AgentSession; +import org.jivesoftware.smackx.workgroup.ext.macros.Macros; +import org.jivesoftware.smackx.workgroup.user.Workgroup; +import org.jivesoftware.spark.PluginManager; +import org.jivesoftware.spark.SparkManager; +import org.jivesoftware.spark.Workspace; +import org.jivesoftware.spark.component.RolloverButton; +import org.jivesoftware.spark.plugin.Plugin; +import org.jivesoftware.spark.util.SwingTimerTask; +import org.jivesoftware.spark.util.SwingWorker; +import org.jivesoftware.spark.util.TaskEngine; +import org.jivesoftware.spark.util.log.Log; + public class FastpathPlugin implements Plugin, ConnectionListener { private static Workgroup wgroup; private static AgentSession agentSession; @@ -78,9 +78,9 @@ try { DiscoverItems items = SparkManager.getSessionManager().getDiscoveredItems(); - Iterator iter = items.getItems(); + Iterator iter = items.getItems(); while (iter.hasNext()) { - DiscoverItems.Item item = (DiscoverItems.Item)iter.next(); + DiscoverItems.Item item = iter.next(); String entityID = item.getEntityID() != null ? item.getEntityID() : ""; if (entityID.startsWith("workgroup")) { // Log into workgroup Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/BackgroundPane.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/BackgroundPane.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/BackgroundPane.java (working copy) @@ -27,7 +27,9 @@ * to specify an image to use in the background of the panel. */ public class BackgroundPane extends JPanel { - private ImageIcon backgroundImage; + + private static final long serialVersionUID = 1L; + private ImageIcon backgroundImage; /** * Creates a background panel using the default Spark background image. Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatViewer.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatViewer.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatViewer.java (working copy) @@ -11,18 +11,37 @@ package org.jivesoftware.fastpath.workspace.panes; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextPane; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.resources.FastpathRes; -import com.jivesoftware.smack.workgroup.agent.AgentSession; -import com.jivesoftware.smack.workgroup.ext.notes.ChatNotes; -import com.jivesoftware.smack.workgroup.packet.Transcript; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Packet; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smackx.packet.DelayInformation; +import org.jivesoftware.smackx.workgroup.agent.AgentSession; +import org.jivesoftware.smackx.workgroup.ext.notes.ChatNotes; +import org.jivesoftware.smackx.workgroup.packet.Transcript; import org.jivesoftware.spark.ChatManager; import org.jivesoftware.spark.component.RolloverButton; import org.jivesoftware.spark.component.tabbedPane.SparkTabbedPane; @@ -30,31 +49,14 @@ import org.jivesoftware.spark.ui.TranscriptWindow; import org.jivesoftware.spark.util.GraphicUtils; -import javax.swing.BorderFactory; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JTextPane; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.Date; -import java.util.Iterator; -import java.util.List; - /** * Displays Fastpath transcripts. */ public class ChatViewer extends JPanel { - /** + private static final long serialVersionUID = 1L; + + /** * Display a Fastpath transcript. * * @param transcript the Transcript Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/search/ChatSearch.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/search/ChatSearch.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/search/ChatSearch.java (working copy) @@ -11,22 +11,6 @@ package org.jivesoftware.fastpath.workspace.search; -import org.jivesoftware.fastpath.FastpathPlugin; -import org.jivesoftware.fastpath.FpRes; -import org.jivesoftware.fastpath.resources.FastpathRes; -import org.jivesoftware.fastpath.workspace.panes.BackgroundPane; -import org.jivesoftware.fastpath.workspace.panes.ChatViewer; -import org.jivesoftware.fastpath.workspace.panes.HistoryItemRenderer; -import com.jivesoftware.smack.workgroup.agent.AgentSession; -import com.jivesoftware.smack.workgroup.packet.Transcript; -import org.jivesoftware.smack.XMPPException; -import org.jivesoftware.smackx.Form; -import org.jivesoftware.smackx.ReportedData; -import org.jivesoftware.spark.SparkManager; -import org.jivesoftware.spark.search.Searchable; -import org.jivesoftware.spark.util.GraphicUtils; -import org.jivesoftware.spark.util.log.Log; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -51,6 +35,22 @@ import javax.swing.JList; import javax.swing.JScrollPane; +import org.jivesoftware.fastpath.FastpathPlugin; +import org.jivesoftware.fastpath.FpRes; +import org.jivesoftware.fastpath.resources.FastpathRes; +import org.jivesoftware.fastpath.workspace.panes.BackgroundPane; +import org.jivesoftware.fastpath.workspace.panes.ChatViewer; +import org.jivesoftware.fastpath.workspace.panes.HistoryItemRenderer; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smackx.Form; +import org.jivesoftware.smackx.ReportedData; +import org.jivesoftware.smackx.workgroup.agent.AgentSession; +import org.jivesoftware.smackx.workgroup.packet.Transcript; +import org.jivesoftware.spark.SparkManager; +import org.jivesoftware.spark.search.Searchable; +import org.jivesoftware.spark.util.GraphicUtils; +import org.jivesoftware.spark.util.log.Log; + public class ChatSearch implements Searchable { public Icon getIcon() { Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/OnlineAgents.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/OnlineAgents.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/OnlineAgents.java (working copy) @@ -14,9 +14,9 @@ import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.resources.FastpathRes; -import com.jivesoftware.smack.workgroup.agent.AgentRoster; -import com.jivesoftware.smack.workgroup.agent.AgentRosterListener; -import com.jivesoftware.smack.workgroup.packet.AgentStatus; +import org.jivesoftware.smackx.workgroup.agent.AgentRoster; +import org.jivesoftware.smackx.workgroup.agent.AgentRosterListener; +import org.jivesoftware.smackx.workgroup.packet.AgentStatus; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.spark.ChatManager; @@ -56,7 +56,9 @@ * AgentsTable is responsible for managing all agents in the owning workgroup. */ public final class OnlineAgents extends JPanel { - private AgentRoster agentRoster; + + private static final long serialVersionUID = 1L; + private AgentRoster agentRoster; private ContactGroup contactGroup; private JPanel topToolbar = new JPanel(); @@ -156,7 +158,7 @@ nickname = agent; } - ContactItem item = new ContactItem(nickname, agent) { + ContactItem item = new ContactItem("",nickname, agent) { public String getToolTipText() { Presence agentPresence = agentRoster.getPresence(agent); return buildTooltip(agentPresence); @@ -289,7 +291,7 @@ Presence agentPresence = agentRoster.getPresence(agent); if (agentPresence.isAvailable()) { - ContactItem item = new ContactItem(nickname, agent) { + ContactItem item = new ContactItem("",nickname, agent) { public String getToolTipText() { Presence agentPresence = agentRoster.getPresence(agent); return buildTooltip(agentPresence); @@ -332,7 +334,7 @@ if (nickname == null) { nickname = agent; } - ContactItem contactItem = new ContactItem(nickname, StringUtils.parseBareAddress(presence.getFrom())); + ContactItem contactItem = new ContactItem("",nickname, StringUtils.parseBareAddress(presence.getFrom())); contactItem.setPresence(presence); contactGroup.addContactItem(contactItem); } Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/UserInvitationPane.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/UserInvitationPane.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/UserInvitationPane.java (working copy) @@ -10,17 +10,39 @@ package org.jivesoftware.fastpath.workspace.panes; +import java.awt.Color; +import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.TimerTask; + +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JProgressBar; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.resources.FastpathRes; import org.jivesoftware.fastpath.workspace.Workpane; import org.jivesoftware.fastpath.workspace.assistants.RoomInformation; import org.jivesoftware.fastpath.workspace.util.RequestUtils; -import com.jivesoftware.smack.workgroup.agent.Offer; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.Form; import org.jivesoftware.smackx.muc.Affiliate; import org.jivesoftware.smackx.muc.MultiUserChat; +import org.jivesoftware.smackx.workgroup.agent.Offer; +import org.jivesoftware.smackx.workgroup.agent.TransferRequest; import org.jivesoftware.spark.ChatManager; import org.jivesoftware.spark.ChatNotFoundException; import org.jivesoftware.spark.SparkManager; @@ -38,27 +60,6 @@ import org.jivesoftware.spark.util.log.Log; import org.jivesoftware.sparkimpl.plugin.alerts.SparkToaster; -import java.awt.Color; -import java.awt.Font; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.TimerTask; - -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JProgressBar; - /** * Handles invitations and transfers of Fastpath Requests. */ @@ -108,7 +109,7 @@ JLabel userImage = new JLabel(FastpathRes.getImageIcon(FastpathRes.FASTPATH_IMAGE_16x16)); userImage.setHorizontalAlignment(JLabel.LEFT); String title = FpRes.getString("title.fastpath.invitation"); - if (offer.getContent().isTransfer()) { + if (offer.getContent() instanceof TransferRequest) { title = FpRes.getString("title.fastpath.transfer"); } Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/invite/InvitationManager.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/invite/InvitationManager.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/invite/InvitationManager.java (working copy) @@ -11,20 +11,20 @@ package org.jivesoftware.fastpath.workspace.invite; +import java.util.ArrayList; +import java.util.List; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; -import com.jivesoftware.smack.workgroup.packet.RoomInvitation; -import com.jivesoftware.smack.workgroup.packet.RoomTransfer; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.util.StringUtils; +import org.jivesoftware.smackx.workgroup.packet.RoomInvitation; +import org.jivesoftware.smackx.workgroup.packet.RoomTransfer; import org.jivesoftware.spark.ChatManager; import org.jivesoftware.spark.SparkManager; import org.jivesoftware.spark.ui.ChatRoom; import org.jivesoftware.spark.util.log.Log; -import java.util.ArrayList; -import java.util.List; - public class InvitationManager { private static List inviteListeners = new ArrayList(); @@ -48,10 +48,12 @@ String msg = messageText != null ? messageText : FpRes.getString("message.please.join.me.in.conference"); try { if (!transfer) { - FastpathPlugin.getAgentSession().sendRoomInvitation(RoomInvitation.Type.user, jid, workgroup, sessionID, msg); + // TODO : CHECK FASHPATH + FastpathPlugin.getAgentSession().sendRoomInvitation(RoomInvitation.Type.user, jid, sessionID, msg); } else { - FastpathPlugin.getAgentSession().sendRoomTransfer(RoomTransfer.Type.user, jid, workgroup, sessionID, msg); + // TODO : CHECK FASHPATH + FastpathPlugin.getAgentSession().sendRoomTransfer(RoomTransfer.Type.user, jid, sessionID, msg); } } catch (XMPPException e) { @@ -84,10 +86,12 @@ String msg = messageText != null ? messageText : FpRes.getString("message.please.join.me.in.conference"); try { if (!transfer) { - FastpathPlugin.getAgentSession().sendRoomInvitation(RoomInvitation.Type.queue, jid, workgroup, sessionID, msg); + // TODO : CHECK FASHPATH + FastpathPlugin.getAgentSession().sendRoomInvitation(RoomInvitation.Type.queue, jid, sessionID, msg); } else { - FastpathPlugin.getAgentSession().sendRoomTransfer(RoomTransfer.Type.queue, jid, workgroup, sessionID, msg); + // TODO : CHECK FASHPATH + FastpathPlugin.getAgentSession().sendRoomTransfer(RoomTransfer.Type.queue, jid, sessionID, msg); } } catch (XMPPException e) { @@ -120,10 +124,11 @@ String msg = messageText != null ? messageText : FpRes.getString("message.please.join.me.in.conference"); try { if (!transfer) { - FastpathPlugin.getAgentSession().sendRoomInvitation(RoomInvitation.Type.workgroup, jid, workgroup, sessionID, msg); + // TODO : CHECK FASHPATH + FastpathPlugin.getAgentSession().sendRoomInvitation(RoomInvitation.Type.workgroup, jid, sessionID, msg); } else { - FastpathPlugin.getAgentSession().sendRoomTransfer(RoomTransfer.Type.workgroup, jid, workgroup, sessionID, msg); + FastpathPlugin.getAgentSession().sendRoomTransfer(RoomTransfer.Type.workgroup, jid, sessionID, msg); } } catch (XMPPException e) { Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/macros/MacrosEditor.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/macros/MacrosEditor.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/macros/MacrosEditor.java (working copy) @@ -10,19 +10,17 @@ */ package org.jivesoftware.fastpath.workspace.macros; -import org.jivesoftware.fastpath.FastpathPlugin; -import org.jivesoftware.fastpath.FpRes; -import org.jivesoftware.fastpath.workspace.Workpane; -import org.jivesoftware.fastpath.resources.FastpathRes; -import com.jivesoftware.smack.workgroup.ext.macros.Macro; -import com.jivesoftware.smack.workgroup.ext.macros.MacroGroup; -import org.jivesoftware.spark.component.MessageDialog; -import org.jivesoftware.spark.component.RolloverButton; -import org.jivesoftware.spark.component.Table; -import org.jivesoftware.spark.util.ModelUtil; -import org.jivesoftware.spark.util.ResourceUtils; -import org.jivesoftware.spark.util.log.Log; -import org.jivesoftware.smack.XMPPException; +import java.awt.Color; +import java.awt.Component; +import java.awt.FlowLayout; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; import javax.swing.JButton; import javax.swing.JDialog; @@ -32,23 +30,27 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.ListSelectionModel; -import javax.swing.table.TableCellRenderer; import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableCellRenderer; -import java.awt.Color; -import java.awt.FlowLayout; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.Component; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.Iterator; -import java.util.List; -import java.util.Properties; +import org.jivesoftware.fastpath.FastpathPlugin; +import org.jivesoftware.fastpath.FpRes; +import org.jivesoftware.fastpath.resources.FastpathRes; +import org.jivesoftware.fastpath.workspace.Workpane; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smackx.workgroup.ext.macros.Macro; +import org.jivesoftware.smackx.workgroup.ext.macros.MacroGroup; +import org.jivesoftware.spark.component.MessageDialog; +import org.jivesoftware.spark.component.RolloverButton; +import org.jivesoftware.spark.component.Table; +import org.jivesoftware.spark.util.ModelUtil; +import org.jivesoftware.spark.util.ResourceUtils; +import org.jivesoftware.spark.util.log.Log; public class MacrosEditor extends JPanel { - private JLabel initialResponseLabel = new JLabel(); + + private static final long serialVersionUID = 1L; + private JLabel initialResponseLabel = new JLabel(); private JTextArea initialResponseField = new JTextArea(); private RolloverButton newButton = new RolloverButton(FastpathRes.getImageIcon(FastpathRes.SMALL_ADD_IMAGE)); private RolloverButton deleteButton = new RolloverButton(FastpathRes.getImageIcon(FastpathRes.SMALL_DELETE)); @@ -138,7 +140,9 @@ */ private static final class MacroTable extends Table { - MacroTable() { + private static final long serialVersionUID = 4777649199509083939L; + + MacroTable() { super(new String[]{FpRes.getString("title.response.name"), FpRes.getString("title.response.text")}); getColumnModel().setColumnMargin(0); Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatHistory.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatHistory.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/ChatHistory.java (working copy) @@ -10,19 +10,6 @@ */ package org.jivesoftware.fastpath.workspace.panes; -import org.jivesoftware.fastpath.FastpathPlugin; -import org.jivesoftware.fastpath.FpRes; -import com.jivesoftware.smack.workgroup.agent.AgentSession; -import com.jivesoftware.smack.workgroup.ext.history.AgentChatHistory; -import com.jivesoftware.smack.workgroup.ext.history.AgentChatSession; -import com.jivesoftware.smack.workgroup.packet.Transcript; -import org.jivesoftware.spark.SparkManager; -import org.jivesoftware.spark.util.ModelUtil; -import org.jivesoftware.spark.util.log.Log; -import org.jivesoftware.fastpath.resources.FastpathRes; -import org.jivesoftware.smack.XMPPException; -import org.jivesoftware.smack.util.StringUtils; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -41,12 +28,27 @@ import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.JOptionPane; + +import org.jivesoftware.fastpath.FastpathPlugin; +import org.jivesoftware.fastpath.FpRes; +import org.jivesoftware.fastpath.resources.FastpathRes; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.util.StringUtils; +import org.jivesoftware.smackx.workgroup.agent.AgentSession; +import org.jivesoftware.smackx.workgroup.ext.history.AgentChatHistory; +import org.jivesoftware.smackx.workgroup.ext.history.AgentChatSession; +import org.jivesoftware.smackx.workgroup.packet.Transcript; +import org.jivesoftware.spark.SparkManager; +import org.jivesoftware.spark.util.ModelUtil; +import org.jivesoftware.spark.util.log.Log; public class ChatHistory extends JPanel { - private DefaultListModel model = new DefaultListModel(); + + private static final long serialVersionUID = 1L; + private DefaultListModel model = new DefaultListModel(); private AgentSession agentSession; private JList list; private JFrame mainFrame; Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/CurrentActivity.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/CurrentActivity.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/CurrentActivity.java (working copy) @@ -11,18 +11,45 @@ package org.jivesoftware.fastpath.workspace.panes; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.BorderFactory; +import javax.swing.DefaultListModel; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import javax.swing.JScrollPane; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.resources.FastpathRes; -import com.jivesoftware.smack.workgroup.agent.AgentRoster; -import com.jivesoftware.smack.workgroup.agent.AgentRosterListener; -import com.jivesoftware.smack.workgroup.packet.AgentStatus; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smackx.Form; import org.jivesoftware.smackx.muc.Affiliate; import org.jivesoftware.smackx.muc.MultiUserChat; +import org.jivesoftware.smackx.workgroup.agent.AgentRoster; +import org.jivesoftware.smackx.workgroup.agent.AgentRosterListener; +import org.jivesoftware.smackx.workgroup.packet.AgentStatus; import org.jivesoftware.spark.SparkManager; import org.jivesoftware.spark.UserManager; import org.jivesoftware.spark.ui.conferences.ConferenceUtils; @@ -32,39 +59,13 @@ import org.jivesoftware.sparkimpl.settings.local.LocalPreferences; import org.jivesoftware.sparkimpl.settings.local.SettingsManager; -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.BorderFactory; -import javax.swing.DefaultListModel; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.JScrollPane; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - /** * UI to show all chats occuring. */ public final class CurrentActivity extends JPanel { - private DefaultListModel model = new DefaultListModel(); + + private static final long serialVersionUID = 1L; + private DefaultListModel model = new DefaultListModel(); private JList list = new JList(model); private JFrame mainFrame; private JLabel activeConversations; Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/invite/WorkgroupInvitationDialog.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/invite/WorkgroupInvitationDialog.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/invite/WorkgroupInvitationDialog.java (working copy) @@ -11,26 +11,6 @@ package org.jivesoftware.fastpath.workspace.invite; -import org.jivesoftware.fastpath.FastpathPlugin; -import org.jivesoftware.fastpath.FpRes; -import org.jivesoftware.fastpath.resources.FastpathRes; -import com.jivesoftware.smack.workgroup.agent.Agent; -import com.jivesoftware.smack.workgroup.agent.AgentRoster; -import com.jivesoftware.smack.workgroup.agent.WorkgroupQueue; -import org.jivesoftware.smack.XMPPException; -import org.jivesoftware.smack.util.StringUtils; -import org.jivesoftware.spark.PresenceManager; -import org.jivesoftware.spark.SparkManager; -import org.jivesoftware.spark.UserManager; -import org.jivesoftware.spark.component.JiveTreeCellRenderer; -import org.jivesoftware.spark.component.JiveTreeNode; -import org.jivesoftware.spark.component.TitlePanel; -import org.jivesoftware.spark.component.Tree; -import org.jivesoftware.spark.ui.ChatRoom; -import org.jivesoftware.spark.util.ModelUtil; -import org.jivesoftware.spark.util.ResourceUtils; -import org.jivesoftware.spark.util.log.Log; - import java.awt.BorderLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; @@ -58,6 +38,26 @@ import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; +import org.jivesoftware.fastpath.FastpathPlugin; +import org.jivesoftware.fastpath.FpRes; +import org.jivesoftware.fastpath.resources.FastpathRes; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.util.StringUtils; +import org.jivesoftware.smackx.workgroup.agent.Agent; +import org.jivesoftware.smackx.workgroup.agent.AgentRoster; +import org.jivesoftware.smackx.workgroup.agent.WorkgroupQueue; +import org.jivesoftware.spark.PresenceManager; +import org.jivesoftware.spark.SparkManager; +import org.jivesoftware.spark.UserManager; +import org.jivesoftware.spark.component.JiveTreeCellRenderer; +import org.jivesoftware.spark.component.JiveTreeNode; +import org.jivesoftware.spark.component.TitlePanel; +import org.jivesoftware.spark.component.Tree; +import org.jivesoftware.spark.ui.ChatRoom; +import org.jivesoftware.spark.util.ModelUtil; +import org.jivesoftware.spark.util.ResourceUtils; +import org.jivesoftware.spark.util.log.Log; + /** * UI and Dialog to show all available agents that can be invited into a ChatRoom. Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/LiveTitlePane.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/LiveTitlePane.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/LiveTitlePane.java (working copy) @@ -25,7 +25,9 @@ public class LiveTitlePane extends BackgroundPane { - public LiveTitlePane(String title, Icon icon) { + private static final long serialVersionUID = 1L; + + public LiveTitlePane(String title, Icon icon) { setLayout(new GridBagLayout()); setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/InvitationPane.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/InvitationPane.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/panes/InvitationPane.java (working copy) @@ -11,13 +11,30 @@ package org.jivesoftware.fastpath.workspace.panes; +import java.awt.Color; +import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.swing.JLabel; +import javax.swing.JPanel; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.resources.FastpathRes; +import org.jivesoftware.fastpath.workspace.Workpane.RoomState; import org.jivesoftware.fastpath.workspace.assistants.RoomInformation; import org.jivesoftware.fastpath.workspace.util.RequestUtils; -import org.jivesoftware.fastpath.workspace.Workpane.RoomState; -import com.jivesoftware.smack.workgroup.MetaData; import org.jivesoftware.resource.SparkRes; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Message; @@ -25,6 +42,7 @@ import org.jivesoftware.smackx.Form; import org.jivesoftware.smackx.muc.Affiliate; import org.jivesoftware.smackx.muc.MultiUserChat; +import org.jivesoftware.smackx.workgroup.MetaData; import org.jivesoftware.spark.ChatManager; import org.jivesoftware.spark.ChatNotFoundException; import org.jivesoftware.spark.SparkManager; @@ -38,24 +56,6 @@ import org.jivesoftware.spark.util.SwingWorker; import org.jivesoftware.spark.util.log.Log; -import java.awt.Color; -import java.awt.Font; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.swing.JLabel; -import javax.swing.JPanel; - public class InvitationPane { private Map metadata = null; Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/UserHistoryItem.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/UserHistoryItem.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/UserHistoryItem.java (working copy) @@ -11,12 +11,6 @@ package org.jivesoftware.fastpath.workspace.assistants; -import org.jivesoftware.fastpath.FpRes; -import com.jivesoftware.smack.workgroup.packet.Transcripts; -import org.jivesoftware.spark.UserManager; -import org.jivesoftware.spark.component.WrappedLabel; -import org.jivesoftware.spark.util.ModelUtil; - import java.awt.Color; import java.awt.Dimension; import java.awt.Font; @@ -32,6 +26,12 @@ import javax.swing.JLabel; import javax.swing.JPanel; +import org.jivesoftware.fastpath.FpRes; +import org.jivesoftware.smackx.workgroup.packet.Transcripts; +import org.jivesoftware.spark.UserManager; +import org.jivesoftware.spark.component.WrappedLabel; +import org.jivesoftware.spark.util.ModelUtil; + public class UserHistoryItem extends JPanel { private WrappedLabel agentsLabel = new WrappedLabel(); private JLabel startTimeLabel = new JLabel(); Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/WorkgroupManager.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/WorkgroupManager.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/internal/WorkgroupManager.java (working copy) @@ -11,10 +11,29 @@ package org.jivesoftware.fastpath.internal; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; + import org.jivesoftware.fastpath.resources.FastpathRes; -import com.jivesoftware.smack.workgroup.settings.ChatSetting; -import com.jivesoftware.smack.workgroup.settings.ChatSettings; -import com.jivesoftware.smack.workgroup.user.Workgroup; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Message; @@ -24,6 +43,9 @@ import org.jivesoftware.smackx.Form; import org.jivesoftware.smackx.FormField; import org.jivesoftware.smackx.packet.VCard; +import org.jivesoftware.smackx.workgroup.settings.ChatSetting; +import org.jivesoftware.smackx.workgroup.settings.ChatSettings; +import org.jivesoftware.smackx.workgroup.user.Workgroup; import org.jivesoftware.spark.SparkManager; import org.jivesoftware.spark.component.tabbedPane.SparkTab; import org.jivesoftware.spark.ui.ContactGroup; @@ -38,28 +60,6 @@ import org.jivesoftware.spark.util.SwingWorker; import org.jivesoftware.spark.util.log.Log; -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JPanel; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - /** * Responsible for retrieving and writing out workgroup form information. Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/ChatMacroMenu.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/ChatMacroMenu.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/ChatMacroMenu.java (working copy) @@ -10,26 +10,26 @@ */ package org.jivesoftware.fastpath.workspace.assistants; +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Iterator; +import java.util.List; + +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.JPopupMenu; +import javax.swing.text.BadLocationException; + import org.jivesoftware.fastpath.FastpathPlugin; import org.jivesoftware.fastpath.FpRes; import org.jivesoftware.fastpath.workspace.macros.MacrosEditor; -import com.jivesoftware.smack.workgroup.ext.macros.Macro; -import com.jivesoftware.smack.workgroup.ext.macros.MacroGroup; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smackx.workgroup.ext.macros.Macro; +import org.jivesoftware.smackx.workgroup.ext.macros.MacroGroup; import org.jivesoftware.spark.ui.ChatRoom; import org.jivesoftware.spark.util.ResourceUtils; import org.jivesoftware.spark.util.log.Log; -import org.jivesoftware.smack.XMPPException; - -import javax.swing.JMenu; -import javax.swing.JMenuItem; -import javax.swing.JPopupMenu; -import javax.swing.text.BadLocationException; - -import java.awt.Component; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.Iterator; -import java.util.List; /* * $RCSfile$ Index: src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/UserHistory.java =================================================================== --- src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/UserHistory.java (revision 10959) +++ src/plugins/fastpath/src/java/org/jivesoftware/fastpath/workspace/assistants/UserHistory.java (working copy) @@ -10,17 +10,6 @@ */ package org.jivesoftware.fastpath.workspace.assistants; -import org.jivesoftware.fastpath.FastpathPlugin; -import org.jivesoftware.fastpath.FpRes; -import org.jivesoftware.fastpath.workspace.panes.ChatViewer; -import org.jivesoftware.fastpath.workspace.panes.HistoryItemRenderer; -import com.jivesoftware.smack.workgroup.packet.Transcript; -import com.jivesoftware.smack.workgroup.packet.Transcripts; -import org.jivesoftware.spark.SparkManager; -import org.jivesoftware.spark.util.SwingWorker; -import org.jivesoftware.spark.util.log.Log; -import org.jivesoftware.smack.XMPPException; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -38,6 +27,17 @@ import javax.swing.JList; import javax.swing.JPanel; +import org.jivesoftware.fastpath.FastpathPlugin; +import org.jivesoftware.fastpath.FpRes; +import org.jivesoftware.fastpath.workspace.panes.ChatViewer; +import org.jivesoftware.fastpath.workspace.panes.HistoryItemRenderer; +import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smackx.workgroup.packet.Transcript; +import org.jivesoftware.smackx.workgroup.packet.Transcripts; +import org.jivesoftware.spark.SparkManager; +import org.jivesoftware.spark.util.SwingWorker; +import org.jivesoftware.spark.util.log.Log; + public class UserHistory extends JPanel { private DefaultListModel model = new DefaultListModel(); private JFrame userFrame;