Commit 2c4f22a2 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Refactoring.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@810 b35dd754-fafc-0310-a699-88a17e54d16e
parent b456e649
......@@ -589,6 +589,8 @@ public class XMPPServer {
if (pluginManager != null) {
pluginManager.shutdown();
}
// Stop the Db connection manager.
DbConnectionManager.getConnectionProvider().destroy();
// TODO: hack to allow safe stopping
Log.info("Jive Messenger stopped");
}
......
......@@ -216,7 +216,7 @@ public class Group implements Cacheable {
throw new IllegalStateException();
}
iter.remove();
String user = (String) current;
String user = (String)current;
// Remove the group user from the backend store
provider.deleteMember(name, user);
// Update the group users' roster
......
......@@ -23,7 +23,9 @@ import ="org.jivesoftware.util.*,
org.dom4j.xpath.DefaultXPath,
org.dom4j.*,
org.jivesoftware.messenger.group.*,
java.net.URLEncoder"
java.net.URLEncoder,
org.jivesoftware.messenger.user.UserManager,
org.jivesoftware.messenger.user.UserNotFoundException"
errorPage="error.jsp"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager"/>
......@@ -57,15 +59,14 @@ errorPage="error.jsp"%>
}
if(users.length() > 0){
String hostName = webManager.getXMPPServer().getServerInfo().getName();
StringTokenizer tokenizer = new StringTokenizer(users, ",");
while (tokenizer.hasMoreTokens()) {
String tok = tokenizer.nextToken();
String address = tok;
if (address.indexOf("@") == -1) {
address = address + "@" + hostName;
String username = tokenizer.nextToken();
try {
UserManager.getInstance().getUser(username);
newGroup.getMembers().add(username);
}
newGroup.getMembers().add(address);
catch (UserNotFoundException unfe) { }
}
}
// Successful, so redirect
......@@ -166,19 +167,13 @@ errorPage="error.jsp"%>
</tr>
<tr>
<td nowrap width="1%">
Add User(s):
Initial Member(s):
</td>
<td nowrap class="c1" align="left">
<input type="text" size="40" name="users"/>
&nbsp;
</td>
</tr>
<td width="1%">
</td>
<td nowrap align="left" class="jive-description">
Comma delimited list. Example: "user1@site.com", "user2@site.com"
</td>
</tr>
</table>
<br>
<span class="jive-description"> * Required fields </span>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment