mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-2034: Should not log ordinary events on as warnings.
This commit is contained in:
@ -17,31 +17,26 @@
|
|||||||
|
|
||||||
package org.jivesoftware.spark.plugin.ofmeet;
|
package org.jivesoftware.spark.plugin.ofmeet;
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
import java.awt.event.*;
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.zip.*;
|
|
||||||
import java.io.*;
|
|
||||||
import java.net.*;
|
|
||||||
import java.lang.reflect.*;
|
|
||||||
|
|
||||||
|
|
||||||
import org.jivesoftware.Spark;
|
|
||||||
import org.jivesoftware.spark.*;
|
|
||||||
import org.jivesoftware.spark.component.*;
|
|
||||||
import org.jivesoftware.spark.component.browser.*;
|
|
||||||
import org.jivesoftware.spark.plugin.*;
|
|
||||||
import org.jivesoftware.spark.ui.rooms.*;
|
|
||||||
import org.jivesoftware.spark.ui.*;
|
|
||||||
import org.jivesoftware.spark.util.*;
|
|
||||||
import org.jivesoftware.spark.util.log.*;
|
|
||||||
|
|
||||||
import org.jivesoftware.smack.*;
|
|
||||||
import org.jivesoftware.smack.packet.Message;
|
|
||||||
|
|
||||||
import com.teamdev.jxbrowser.chromium.Browser;
|
import com.teamdev.jxbrowser.chromium.Browser;
|
||||||
import com.teamdev.jxbrowser.chromium.swing.BrowserView;
|
import com.teamdev.jxbrowser.chromium.swing.BrowserView;
|
||||||
|
import org.jivesoftware.smack.packet.Message;
|
||||||
|
import org.jivesoftware.spark.SparkManager;
|
||||||
|
import org.jivesoftware.spark.plugin.Plugin;
|
||||||
|
import org.jivesoftware.spark.ui.ChatRoom;
|
||||||
|
import org.jivesoftware.spark.ui.ChatRoomListener;
|
||||||
|
import org.jivesoftware.spark.ui.GlobalMessageListener;
|
||||||
|
import org.jivesoftware.spark.util.log.Log;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
||||||
public class SparkMeetPlugin implements Plugin, ChatRoomListener, GlobalMessageListener
|
public class SparkMeetPlugin implements Plugin, ChatRoomListener, GlobalMessageListener
|
||||||
@ -79,7 +74,7 @@ public class SparkMeetPlugin implements Plugin, ChatRoomListener, GlobalMessageL
|
|||||||
|
|
||||||
if (pluginsettings.exists())
|
if (pluginsettings.exists())
|
||||||
{
|
{
|
||||||
Log.warning("ofmeet-info: Properties-file does exist= " + pluginsettings.getPath());
|
Log.debug("ofmeet-info: Properties-file does exist= " + pluginsettings.getPath());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
props.load(new FileInputStream(pluginsettings));
|
props.load(new FileInputStream(pluginsettings));
|
||||||
@ -87,37 +82,37 @@ public class SparkMeetPlugin implements Plugin, ChatRoomListener, GlobalMessageL
|
|||||||
if (props.getProperty("port") != null)
|
if (props.getProperty("port") != null)
|
||||||
{
|
{
|
||||||
port = props.getProperty("port");
|
port = props.getProperty("port");
|
||||||
Log.warning("ofmeet-info: ofmeet-port from properties-file is= " + port);
|
Log.debug("ofmeet-info: ofmeet-port from properties-file is= " + port);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.getProperty("protocol") != null)
|
if (props.getProperty("protocol") != null)
|
||||||
{
|
{
|
||||||
protocol = props.getProperty("protocol");
|
protocol = props.getProperty("protocol");
|
||||||
Log.warning("ofmeet-info: ofmeet-protocol from properties-file is= " + protocol);
|
Log.debug("ofmeet-info: ofmeet-protocol from properties-file is= " + protocol);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.getProperty("server") != null)
|
if (props.getProperty("server") != null)
|
||||||
{
|
{
|
||||||
server = props.getProperty("server");
|
server = props.getProperty("server");
|
||||||
Log.warning("ofmeet-info: ofmeet-server from properties-file is= " + server);
|
Log.debug("ofmeet-info: ofmeet-server from properties-file is= " + server);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.getProperty("path") != null)
|
if (props.getProperty("path") != null)
|
||||||
{
|
{
|
||||||
path = props.getProperty("path");
|
path = props.getProperty("path");
|
||||||
Log.warning("ofmeet-info: ofmeet-path from properties-file is= " + path);
|
Log.debug("ofmeet-info: ofmeet-path from properties-file is= " + path);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.getProperty("width") != null)
|
if (props.getProperty("width") != null)
|
||||||
{
|
{
|
||||||
width = Integer.parseInt(props.getProperty("width"));
|
width = Integer.parseInt(props.getProperty("width"));
|
||||||
Log.warning("ofmeet-info: ofmeet-width from properties-file is= " + width);
|
Log.debug("ofmeet-info: ofmeet-width from properties-file is= " + width);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.getProperty("height") != null)
|
if (props.getProperty("height") != null)
|
||||||
{
|
{
|
||||||
height = Integer.parseInt(props.getProperty("height"));
|
height = Integer.parseInt(props.getProperty("height"));
|
||||||
Log.warning("ofmeet-info: ofmeet-height from properties-file is= " + height);
|
Log.debug("ofmeet-info: ofmeet-height from properties-file is= " + height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -175,7 +170,7 @@ public class SparkMeetPlugin implements Plugin, ChatRoomListener, GlobalMessageL
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.warning("shutdown");
|
Log.debug("shutdown");
|
||||||
|
|
||||||
chatManager.removeChatRoomListener(this);
|
chatManager.removeChatRoomListener(this);
|
||||||
chatManager.removeGlobalMessageListener(this);
|
chatManager.removeGlobalMessageListener(this);
|
||||||
@ -310,7 +305,7 @@ public class SparkMeetPlugin implements Plugin, ChatRoomListener, GlobalMessageL
|
|||||||
{
|
{
|
||||||
String roomId = chatroom.getRoomname();
|
String roomId = chatroom.getRoomname();
|
||||||
|
|
||||||
Log.warning("chatRoomClosed: " + roomId);
|
Log.debug("chatRoomClosed: " + roomId);
|
||||||
|
|
||||||
if (decorators.containsKey(roomId))
|
if (decorators.containsKey(roomId))
|
||||||
{
|
{
|
||||||
@ -330,28 +325,28 @@ public class SparkMeetPlugin implements Plugin, ChatRoomListener, GlobalMessageL
|
|||||||
{
|
{
|
||||||
String roomId = chatroom.getRoomname();
|
String roomId = chatroom.getRoomname();
|
||||||
|
|
||||||
Log.warning("chatRoomActivated: " + roomId);
|
Log.debug("chatRoomActivated: " + roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void userHasJoined(ChatRoom room, String s)
|
public void userHasJoined(ChatRoom room, String s)
|
||||||
{
|
{
|
||||||
String roomId = room.getRoomname();
|
String roomId = room.getRoomname();
|
||||||
|
|
||||||
Log.warning("userHasJoined: " + roomId + " " + s);
|
Log.debug("userHasJoined: " + roomId + " " + s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void userHasLeft(ChatRoom room, String s)
|
public void userHasLeft(ChatRoom room, String s)
|
||||||
{
|
{
|
||||||
String roomId = room.getRoomname();
|
String roomId = room.getRoomname();
|
||||||
|
|
||||||
Log.warning("userHasLeft: " + roomId + " " + s);
|
Log.debug("userHasLeft: " + roomId + " " + s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void chatRoomOpened(final ChatRoom room)
|
public void chatRoomOpened(final ChatRoom room)
|
||||||
{
|
{
|
||||||
String roomId = room.getRoomname();
|
String roomId = room.getRoomname();
|
||||||
|
|
||||||
Log.warning("chatRoomOpened: " + roomId);
|
Log.debug("chatRoomOpened: " + roomId);
|
||||||
|
|
||||||
if (roomId.indexOf('/') == -1 && decorators.containsKey(roomId) == false)
|
if (roomId.indexOf('/') == -1 && decorators.containsKey(roomId) == false)
|
||||||
{
|
{
|
||||||
@ -362,9 +357,6 @@ public class SparkMeetPlugin implements Plugin, ChatRoomListener, GlobalMessageL
|
|||||||
/**
|
/**
|
||||||
* Display an alert that allows the user to accept or reject a meet
|
* Display an alert that allows the user to accept or reject a meet
|
||||||
* invitation.
|
* invitation.
|
||||||
*
|
|
||||||
* @param invitation
|
|
||||||
* the meet invitation.
|
|
||||||
*/
|
*/
|
||||||
private void showInvitationAlert(final String meetUrl, final ChatRoom room, final String roomId)
|
private void showInvitationAlert(final String meetUrl, final ChatRoom room, final String roomId)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user