<%@ page import="org.jivesoftware.util.JiveGlobals" %> <%@ page import="org.jivesoftware.openfire.ldap.LdapManager" %> <%@ page import="org.jivesoftware.openfire.clearspace.ClearspaceManager" %> <%-- - $RCSfile$ - $Revision: $ - $Date: $ - - Copyright (C) 2005-2008 Jive Software. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --%> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <% // Get parameters if (request.getParameter("ldapedit") != null) { // Redirect to first step. response.sendRedirect("ldap-server.jsp"); return; } else if (request.getParameter("clearspaceedit") != null) { // Redirect to clearspace setup. response.sendRedirect("clearspace-integration.jsp"); return; } %> <fmt:message key="profile-settings.title"/> <% boolean isLDAP = "org.jivesoftware.openfire.ldap.LdapAuthProvider".equals( JiveGlobals.getProperty("provider.auth.className")); boolean isCLEARSPACE = "org.jivesoftware.openfire.clearspace.ClearspaceAuthProvider".equals( JiveGlobals.getProperty("provider.auth.className")); %>

<% if (isLDAP) { %> <% StringBuilder sb = new StringBuilder(); for (String host : LdapManager.getInstance().getHosts()) { sb.append(host).append(", "); } String hosts = sb.toString(); if (hosts.trim().length() > 0) { hosts = hosts.substring(0, hosts.length()-2); } int port = LdapManager.getInstance().getPort(); String baseDN = LdapManager.getInstance().getBaseDN(); String adminDN = LdapManager.getInstance().getAdminDN(); %> <% } %> <% if (isCLEARSPACE) { %> <% String uri = ClearspaceManager.getInstance().getConnectionURI(); %> <% } %>
<%= ((isLDAP || isCLEARSPACE) ? "" : "checked") %>> -
<%= (isLDAP ? "checked" : "") %>> -
 
: <%= hosts %>
: <%= port %>
: <%= baseDN %>
: <%= adminDN %>
">
<%= (isCLEARSPACE ? "checked" : "") %>> -
 
: <%= uri %>
">