| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.task.OnlineUpdateException; |
| | | import org.opends.guitools.controlpanel.util.BackgroundTask; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.UserData; |
| | | import org.opends.quicksetup.UserDataCertificateException; |
| | |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.OpenDsException; |
| | | import org.opends.server.util.DynamicConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | /** |
| | | * The panel that appears when the user is asked to provide authentication. |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return INFO_CTRL_PANEL_LOCAL_OR_REMOTE_PANEL_TITLE.get(); |
| | | } |
| | |
| | | setPrimaryValid(portLabel); |
| | | setPrimaryValid(dnLabel); |
| | | setPrimaryValid(pwdLabel); |
| | | final LinkedHashSet<Message> errors = new LinkedHashSet<Message>(); |
| | | final LinkedHashSet<LocalizableMessage> errors = new LinkedHashSet<LocalizableMessage>(); |
| | | |
| | | boolean dnInvalid = false; |
| | | boolean pwdInvalid = false; |
| | |
| | | } |
| | | else |
| | | { |
| | | Message msg = Utils.getThrowableMsg( |
| | | LocalizableMessage msg = Utils.getThrowableMsg( |
| | | INFO_ERROR_CONNECTING_TO_LOCAL.get(), throwable); |
| | | errors.add(msg); |
| | | } |
| | |
| | | else |
| | | { |
| | | ArrayList<String> stringErrors = new ArrayList<String>(); |
| | | for (Message err : errors) |
| | | for (LocalizableMessage err : errors) |
| | | { |
| | | stringErrors.add(err.toString()); |
| | | } |
| | |
| | | |
| | | private void checkVersion(InitialLdapContext ctx) throws OpenDsException |
| | | { |
| | | Message msg = null; |
| | | LocalizableMessage msg = null; |
| | | try |
| | | { |
| | | /* |
| | |
| | | OpenDsException oe = (OpenDsException)t; |
| | | if (oe.getMessageObject() != null) |
| | | { |
| | | if (oe.getMessageObject().getDescriptor().equals |
| | | (ERR_INCOMPATIBLE_VERSION_IN_REMOTE_SERVER) || |
| | | oe.getMessageObject().getDescriptor().equals |
| | | (ERR_VERSION_IN_REMOTE_SERVER_NOT_FOUND) || |
| | | oe.getMessageObject().getDescriptor().equals |
| | | (ERR_NOT_SAME_PRODUCT_IN_REMOTE_SERVER_NOT_FOUND)) |
| | | LocalizableMessage msg = oe.getMessageObject(); |
| | | if (StaticUtils.hasDescriptor(msg, ERR_INCOMPATIBLE_VERSION_IN_REMOTE_SERVER) || |
| | | StaticUtils.hasDescriptor(msg, ERR_VERSION_IN_REMOTE_SERVER_NOT_FOUND) || |
| | | StaticUtils.hasDescriptor(msg, ERR_NOT_SAME_PRODUCT_IN_REMOTE_SERVER_NOT_FOUND)) |
| | | { |
| | | isVersionException = true; |
| | | } |