Removed now useless calls to .toString() on arguments of ArgN.get(...).
| | |
| | | private static LocalizableMessage getMessage(ErrorType error, Throwable x) |
| | | { |
| | | LocalizableMessage msg; |
| | | if (x != null) |
| | | if (x instanceof OpenDsException) |
| | | { |
| | | if (x instanceof OpenDsException) |
| | | { |
| | | msg = INFO_ADS_CONTEXT_EXCEPTION_WITH_DETAILS_MSG.get(error.toString(), |
| | | ((OpenDsException)x).getMessageObject()); |
| | | } |
| | | else |
| | | { |
| | | msg = INFO_ADS_CONTEXT_EXCEPTION_WITH_DETAILS_MSG.get(error.toString(), |
| | | x.toString()); |
| | | } |
| | | msg = INFO_ADS_CONTEXT_EXCEPTION_WITH_DETAILS_MSG.get(error, |
| | | ((OpenDsException)x).getMessageObject()); |
| | | } else if (x != null) |
| | | { |
| | | msg = INFO_ADS_CONTEXT_EXCEPTION_WITH_DETAILS_MSG.get(error, x); |
| | | } |
| | | else |
| | | { |
| | | msg = INFO_ADS_CONTEXT_EXCEPTION_MSG.get(error.toString()); |
| | | msg = INFO_ADS_CONTEXT_EXCEPTION_MSG.get(error); |
| | | } |
| | | return msg; |
| | | } |
| | |
| | | // Add the total: always at the end |
| | | |
| | | String[] line = new String[attributes.size() + 1]; |
| | | line[0] = "<html><b>"+INFO_CTRL_PANEL_TOTAL_LABEL.get().toString()+ |
| | | "</b>"; |
| | | line[0] = "<html><b>" + INFO_CTRL_PANEL_TOTAL_LABEL.get() + "</b>"; |
| | | for (int i=1; i<line.length; i++) |
| | | { |
| | | boolean valueSet = false; |
| | |
| | | } |
| | | if (sb.length() == 0) |
| | | { |
| | | sb.append(INFO_NOT_APPLICABLE_LABEL.get().toString()); |
| | | sb.append(INFO_NOT_APPLICABLE_LABEL.get()); |
| | | } |
| | | return sb.toString(); |
| | | } |
| | |
| | | if (addTotalRow()) |
| | | { |
| | | String[] line = new String[columnNames.length]; |
| | | line[0] = "<html><b>"+INFO_CTRL_PANEL_TOTAL_LABEL.get().toString()+ |
| | | "</b>"; |
| | | line[0] = "<html><b>" + INFO_CTRL_PANEL_TOTAL_LABEL.get() + "</b>"; |
| | | for (int i=1; i<line.length; i++) |
| | | { |
| | | boolean valueSet = false; |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.datamodel; |
| | |
| | | } |
| | | if (sb.length() == 0) |
| | | { |
| | | sb.append(INFO_NOT_APPLICABLE_LABEL.get().toString()); |
| | | sb.append(INFO_NOT_APPLICABLE_LABEL.get()); |
| | | } |
| | | return sb.toString(); |
| | | } |
| | |
| | | printEquivalentCommandToModify(groupDn, modifications, false); |
| | | getProgressDialog().appendProgressHtml( |
| | | Utilities.getProgressWithPoints( |
| | | INFO_CTRL_PANEL_ADDING_TO_GROUP.get(groupDn.toString()), |
| | | INFO_CTRL_PANEL_ADDING_TO_GROUP.get(groupDn), |
| | | ColorAndFontConstants.progressFont)); |
| | | } |
| | | }); |
| | |
| | | args.add(dn.toString()); |
| | | printEquivalentCommandLine(getCommandLinePath("ldapdelete"), |
| | | args, |
| | | INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_DELETE_ENTRY.get(dn.toString())); |
| | | INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_DELETE_ENTRY.get(dn)); |
| | | } |
| | | } |
| | |
| | | catch (NamingException ne) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(ne.toString()), ne); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(ne), ne); |
| | | } |
| | | } |
| | | else |
| | |
| | | catch (NamingException ne) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(ne.toString()), ne); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(ne), ne); |
| | | } |
| | | } |
| | | else |
| | |
| | | catch (IOException e) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(e.toString()), e); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(e), e); |
| | | } |
| | | finally |
| | | { |
| | |
| | | printEquivalentRenameCommand(oldDN, newEntry.getName(), useAdminCtx); |
| | | getProgressDialog().appendProgressHtml( |
| | | Utilities.getProgressWithPoints( |
| | | INFO_CTRL_PANEL_RENAMING_ENTRY.get(oldDN.toString(), |
| | | newEntry.getName().toString()), |
| | | INFO_CTRL_PANEL_RENAMING_ENTRY.get(oldDN, newEntry.getName()), |
| | | ColorAndFontConstants.progressFont)); |
| | | } |
| | | }); |
| | |
| | | printEquivalentCommandToModify(dn, originalMods, useAdminCtx); |
| | | getProgressDialog().appendProgressHtml( |
| | | Utilities.getProgressWithPoints( |
| | | INFO_CTRL_PANEL_MODIFYING_ENTRY.get(dn.toString()), |
| | | INFO_CTRL_PANEL_MODIFYING_ENTRY.get(dn), |
| | | ColorAndFontConstants.progressFont)); |
| | | } |
| | | }); |
| | |
| | | */ |
| | | public LocalizableMessage getTaskDescription() |
| | | { |
| | | return INFO_CTRL_PANEL_NEW_ENTRY_TASK_DESCRIPTION.get(dn.toString()); |
| | | return INFO_CTRL_PANEL_NEW_ENTRY_TASK_DESCRIPTION.get(dn); |
| | | } |
| | | |
| | | /** |
| | |
| | | printEquivalentCommand(); |
| | | getProgressDialog().appendProgressHtml( |
| | | Utilities.getProgressWithPoints( |
| | | INFO_CTRL_PANEL_CREATING_ENTRY.get(dn.toString()), |
| | | INFO_CTRL_PANEL_CREATING_ENTRY.get(dn), |
| | | ColorAndFontConstants.progressFont)); |
| | | } |
| | | }); |
| | |
| | | catch (NamingException ne) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(ne.toString()), ne); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(ne), ne); |
| | | } |
| | | notifyConfigurationElementCreated(attribute); |
| | | SwingUtilities.invokeLater(new Runnable() |
| | |
| | | catch (NamingException ne) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(ne.toString()), ne); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(ne), ne); |
| | | } |
| | | notifyConfigurationElementCreated(objectClass); |
| | | SwingUtilities.invokeLater(new Runnable() |
| | |
| | | catch (Throwable t) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(t.toString()), t); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(t), t); |
| | | } |
| | | finally |
| | | { |
| | |
| | | catch (Throwable t) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(t.toString()), t); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_SCHEMA.get(t), t); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | | errors.add(INFO_CTRL_PANEL_INVALID_DN_DETAILS.get(s, t.toString())); |
| | | errors.add(INFO_CTRL_PANEL_INVALID_DN_DETAILS.get(s, t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (t != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_UNEXPECTED_DETAILS.get(t.toString())); |
| | | errors.add(ERR_CTRL_PANEL_UNEXPECTED_DETAILS.get(t)); |
| | | } |
| | | displayMainPanel(); |
| | | setEnabledCancel(true); |
| | |
| | | { |
| | | if (t != null) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_UNEXPECTED_DETAILS.get(t.toString())); |
| | | errors.add(ERR_CTRL_PANEL_UNEXPECTED_DETAILS.get(t)); |
| | | } |
| | | displayMainPanel(); |
| | | setEnabledCancel(true); |
| | |
| | | { |
| | | if (useFile.isSelected()) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_ERROR_READING_FILE.get(t.toString())); |
| | | errors.add(ERR_CTRL_PANEL_ERROR_READING_FILE.get(t)); |
| | | } |
| | | else |
| | | { |
| | | errors.add( |
| | | ERR_CTRL_PANEL_ERROR_DECODING_BASE_64.get(t.toString())); |
| | | errors.add(ERR_CTRL_PANEL_ERROR_DECODING_BASE_64.get(t)); |
| | | } |
| | | displayErrorDialog(errors); |
| | | } |
| | |
| | | { |
| | | if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_INVALID_ATTRIBUTE_NAME.get(err.toString())); |
| | | errors.add(ERR_CTRL_PANEL_INVALID_ATTRIBUTE_NAME.get(err)); |
| | | setPrimaryInvalid(lName); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | |
| | | { |
| | | if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err.toString())); |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err)); |
| | | setPrimaryInvalid(lOID); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | |
| | | { |
| | | if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_INVALID_OBJECTCLASS_NAME.get(err.toString())); |
| | | errors.add(ERR_CTRL_PANEL_INVALID_OBJECTCLASS_NAME.get(err)); |
| | | setPrimaryInvalid(lName); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | |
| | | { |
| | | if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err.toString())); |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err)); |
| | | setPrimaryInvalid(lOID); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe.toString())); |
| | | errors.add(ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe)); |
| | | } |
| | | catch (LDIFException le) |
| | | { |
| | |
| | | if (arg != null) |
| | | { |
| | | details.append("<br><br>"+ |
| | | ERR_CTRL_PANEL_RESOLVING_REFERRAL_DETAILS.get(arg.toString(), |
| | | msg)); |
| | | ERR_CTRL_PANEL_RESOLVING_REFERRAL_DETAILS.get(arg, msg)); |
| | | } |
| | | else |
| | | { |
| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | } catch (Throwable t) |
| | | { |
| | | throw new WebBrowserException(url, |
| | | ERR_CTRL_PANEL_UNEXPECTED_DETAILS.get(t.toString()), t); |
| | | ERR_CTRL_PANEL_UNEXPECTED_DETAILS.get(t), t); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | String cmd = getCommandLineToInitializeAll(); |
| | | |
| | | getProgressDialog().appendProgressHtml(Utilities.applyFont( |
| | | INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_INITIALIZE_ALL.get().toString()+ |
| | | INFO_CTRL_PANEL_EQUIVALENT_CMD_TO_INITIALIZE_ALL.get()+ |
| | | "<br><b>"+cmd+"</b><br><br>", |
| | | ColorAndFontConstants.progressFont)); |
| | | |
| | | for (DN baseDN : replicatedBaseDNs) |
| | | { |
| | | LocalizableMessage msg = INFO_PROGRESS_INITIALIZING_SUFFIX.get(baseDN.toString(), |
| | | LocalizableMessage msg = INFO_PROGRESS_INITIALIZING_SUFFIX.get(baseDN, |
| | | ConnectionUtils.getHostPort(getInfo().getDirContext())); |
| | | getProgressDialog().appendProgressHtml(Utilities.applyFont( |
| | | msg.toString()+"<br>", ColorAndFontConstants.progressFont)); |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe.toString()), |
| | | ioe); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | useOpenDSJavaHome = Utilities.createRadioButton(LocalizableMessage.EMPTY); |
| | | useOpenDSJavaHome.setOpaque(false); |
| | | useOpenDSJavaHome.getAccessibleContext().setAccessibleName( |
| | | INFO_CTRL_PANEL_USE_OPENDS_JAVA_HOME.get().toString()+" "+ |
| | | INFO_CTRL_PANEL_USE_OPENDS_JAVA_HOME.get()+" "+ |
| | | INFO_CTRL_PANEL_USE_OPENDS_JAVA_HOME_HELP.get()); |
| | | lJavaHome.setLabelFor(useOpenDSJavaHome); |
| | | gbc.gridx = 0; |
| | |
| | | useSpecifiedJavaHome = Utilities.createRadioButton(LocalizableMessage.EMPTY); |
| | | useSpecifiedJavaHome.setOpaque(false); |
| | | useSpecifiedJavaHome.getAccessibleContext().setAccessibleName( |
| | | INFO_CTRL_PANEL_USE_SPECIFIED_OPENDS_JAVA_HOME.get().toString() + |
| | | INFO_CTRL_PANEL_USE_SPECIFIED_OPENDS_JAVA_HOME.get() + |
| | | " "+INFO_CTRL_PANEL_USE_SPECIFIED_OPENDS_JAVA_HOME_HELP.get()); |
| | | useOpenDSJavaHomeLabel.setLabelFor(useSpecifiedJavaHome); |
| | | LabelWithHelpIcon useSpecifiedJavaHomeLabel = new LabelWithHelpIcon( |
| | |
| | | INFO_CTRL_PANEL_JAVA_ARGUMENTS_LABEL.get()); |
| | | useSpecifiedJavaArgs = Utilities.createRadioButton(LocalizableMessage.EMPTY); |
| | | useSpecifiedJavaArgs.getAccessibleContext().setAccessibleName( |
| | | INFO_CTRL_PANEL_USE_OPENDS_JAVA_ARGS.get().toString() + |
| | | INFO_CTRL_PANEL_USE_OPENDS_JAVA_ARGS.get() + |
| | | " "+INFO_CTRL_PANEL_USE_OPENDS_JAVA_ARGS_HELP.get()); |
| | | useSpecifiedJavaArgs.setOpaque(false); |
| | | useOpenDSJavaArgs = Utilities.createRadioButton(LocalizableMessage.EMPTY); |
| | |
| | | p.add(useSpecifiedJavaArgs, gbc); |
| | | useOpenDSJavaArgsLabel.setLabelFor(useSpecifiedJavaArgs); |
| | | useSpecifiedJavaArgs.getAccessibleContext().setAccessibleName( |
| | | INFO_CTRL_PANEL_USE_SPECIFIED_OPENDS_JAVA_ARGS.get().toString() + |
| | | INFO_CTRL_PANEL_USE_SPECIFIED_OPENDS_JAVA_ARGS.get() + |
| | | " "+INFO_CTRL_PANEL_USE_SPECIFIED_OPENDS_JAVA_ARGS_HELP.get()); |
| | | |
| | | gbc.gridx ++; |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe.toString()), ioe); |
| | | ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | gbc.insets.left = 10; |
| | | gbc.insets.right = 0; |
| | | detailsSubpanel.add(Utilities.createPrimaryLabel( |
| | | INFO_CTRL_PANEL_OPERATION_NAME_AS_LABEL.get(label.toString())), |
| | | INFO_CTRL_PANEL_OPERATION_NAME_AS_LABEL.get(label)), |
| | | gbc); |
| | | |
| | | gbc.gridx = 1; |
| | |
| | | } |
| | | else if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_INVALID_ATTRIBUTE_NAME.get(err.toString())); |
| | | errors.add(ERR_CTRL_PANEL_INVALID_ATTRIBUTE_NAME.get(err)); |
| | | setPrimaryInvalid(lName); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | |
| | | { |
| | | if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err.toString())); |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err)); |
| | | setPrimaryInvalid(lOID); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe.toString()), |
| | | ioe); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe.toString()), |
| | | ioe); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | catch (Throwable t) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(t.toString()), t); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(t), t); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | catch (IOException ioe) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe.toString())); |
| | | errors.add(ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe)); |
| | | } |
| | | catch (LDIFException le) |
| | | { |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe.toString()), |
| | | ioe); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | catch (Throwable t) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(t.toString()), t); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(t), t); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | else if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_INVALID_OBJECTCLASS_NAME.get(err.toString())); |
| | | errors.add(ERR_CTRL_PANEL_INVALID_OBJECTCLASS_NAME.get(err)); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | |
| | | { |
| | | if (!StaticUtils.isValidSchemaElement(n, 0, n.length(), err)) |
| | | { |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err.toString())); |
| | | errors.add(ERR_CTRL_PANEL_OID_NOT_VALID.get(err)); |
| | | err = new LocalizableMessageBuilder(); |
| | | } |
| | | else |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe.toString()), |
| | | ioe); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe.toString()), |
| | | ioe); |
| | | ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | { |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(errorDetail); |
| | | mb.append( |
| | | " "+INFO_CTRL_PANEL_DETAILS_THROWABLE.get(t.toString())); |
| | | mb.append(INFO_CTRL_PANEL_DETAILS_THROWABLE.get(t)); |
| | | summaryMsg = Utilities.getFormattedError(errorSummary, |
| | | ColorAndFontConstants.errorTitleFont, |
| | | mb.toMessage(), ColorAndFontConstants.defaultFont); |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe.toString()), |
| | | ioe); |
| | | ERR_CTRL_PANEL_ERROR_CHECKING_ENTRY.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | throw new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe.toString()), |
| | | ioe); |
| | | ERR_CTRL_PANEL_ERROR_UPDATING_CONFIGURATION.get(ioe), ioe); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | catch (final Throwable t) |
| | | { |
| | | OnlineUpdateException oupe = new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(t.toString()), t); |
| | | ex.add(oupe); |
| | | ex.add(new OnlineUpdateException(ERR_READING_CONFIG_LDAP.get(t), t)); |
| | | } |
| | | for (OpenDsException oe : ex) |
| | | { |
| | |
| | | catch (Throwable t) |
| | | { |
| | | logger.warn(LocalizableMessage.raw("Error reading monitoring: "+t, t)); |
| | | OnlineUpdateException oupe = new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(t.toString()), t); |
| | | ex.add(oupe); |
| | | ex.add(new OnlineUpdateException(ERR_READING_CONFIG_LDAP.get(t), t)); |
| | | } |
| | | try |
| | | { |
| | |
| | | catch (Throwable t) |
| | | { |
| | | logger.warn(LocalizableMessage.raw("Error reading task information: "+t, t)); |
| | | OnlineUpdateException oupe = new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(t.toString()), t); |
| | | ex.add(oupe); |
| | | ex.add(new OnlineUpdateException(ERR_READING_CONFIG_LDAP.get(t), t)); |
| | | } |
| | | taskEntries = Collections.unmodifiableSet(ts); |
| | | for (ConnectionHandlerDescriptor ch : getConnectionHandlers()) |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | throw new OnlineUpdateException( |
| | | ERR_READING_SCHEMA_LDAP.get(ne.toString()), ne); |
| | | throw new OnlineUpdateException(ERR_READING_SCHEMA_LDAP.get(ne), ne); |
| | | } |
| | | schema = loader.getSchema(); |
| | | } |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | OnlineUpdateException oue = new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(ne.getMessage().toString()), ne); |
| | | ex.add(oue); |
| | | ex.add(new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(ne.getMessage()), ne)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (NamingException ne) |
| | | { |
| | | OnlineUpdateException oue = new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(ne.getMessage().toString()), ne); |
| | | ex.add(oue); |
| | | ex.add(new OnlineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(ne.getMessage()), ne)); |
| | | } |
| | | } |
| | | |
| | |
| | | catch (final Throwable t) |
| | | { |
| | | logger.warn(LocalizableMessage.raw("Error reading configuration: "+t, t)); |
| | | OfflineUpdateException oue = new OfflineUpdateException( |
| | | ERR_READING_CONFIG_LDAP.get(t.getMessage().toString()), t); |
| | | ex.add(oue); |
| | | ex.add(new OfflineUpdateException(ERR_READING_CONFIG_LDAP.get(t.getMessage()), t)); |
| | | } |
| | | |
| | | if (ex.size() > 0) |
| | |
| | | catch (Throwable t) |
| | | { |
| | | environmentSettingException = new OfflineUpdateException( |
| | | ERR_CTRL_PANEL_SETTING_ENVIRONMENT.get(t.getMessage().toString()), t); |
| | | ERR_CTRL_PANEL_SETTING_ENVIRONMENT.get(t.getMessage()), t); |
| | | } |
| | | logger.debug(LocalizableMessage.raw("Environment initialized.")); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_FILE_NO_PARENT.get(entryDN.toString(), |
| | | reader.getLastEntryLineNumber(), |
| | | f.getAbsolutePath(), parentDN.toString()); |
| | | LocalizableMessage message = ERR_CONFIG_FILE_NO_PARENT.get(entryDN, |
| | | reader.getLastEntryLineNumber(), f.getAbsolutePath(), parentDN); |
| | | throw new InitializationException(message); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | // Just tell that the file/directory does not exist. |
| | | notifyListeners(getFormattedWarning( |
| | | INFO_PROGRESS_DELETING_FILE_DOES_NOT_EXIST.get(cfile.toString()))); |
| | | INFO_PROGRESS_DELETING_FILE_DOES_NOT_EXIST.get(cfile))); |
| | | } |
| | | } |
| | | |
| | |
| | | // We did not get the required information. |
| | | throw new ApplicationException( |
| | | ReturnCode.START_ERROR, |
| | | INFO_ERROR_CREATING_BUILD_INFO_MSG.get(sb.toString()), |
| | | INFO_ERROR_CREATING_BUILD_INFO_MSG.get(sb), |
| | | null); |
| | | } |
| | | } |
| | |
| | | String cmd = Utils.isWindows() ? |
| | | Installation.WINDOWS_SETUP_FILE_NAME : |
| | | Installation.UNIX_SETUP_FILE_NAME; |
| | | installationMsg = |
| | | INFO_INSTALLSTATUS_INSTALLED_CLI.get(cmd, buf.toString()); |
| | | installationMsg = INFO_INSTALLSTATUS_INSTALLED_CLI.get(cmd, buf); |
| | | } |
| | | else |
| | | { |
| | |
| | | buf.append("</li>"); |
| | | } |
| | | buf.append("</ul>"); |
| | | installationMsg = INFO_INSTALLSTATUS_INSTALLED.get( buf.toString() ); |
| | | installationMsg = INFO_INSTALLSTATUS_INSTALLED.get(buf); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | sb.append(arg); |
| | | } |
| | | lines.add(INFO_ADDITIONAL_ARGUMENTS.get(sb.toString())); |
| | | lines.add(INFO_ADDITIONAL_ARGUMENTS.get(sb)); |
| | | } |
| | | if (lines.isEmpty()) |
| | | { |
| | |
| | | { |
| | | throw new ApplicationException( |
| | | ReturnCode.CONFIGURATION_ERROR, |
| | | ((isRemoteServer) |
| | | ? INFO_REMOTE_ADS_EXCEPTION.get( |
| | | getHostDisplay(auth), ace.getMessageObject()) |
| | | : INFO_ADS_EXCEPTION.get(ace.toString())), ace); |
| | | (isRemoteServer |
| | | ? INFO_REMOTE_ADS_EXCEPTION.get(getHostDisplay(auth), ace.getMessageObject()) |
| | | : INFO_ADS_EXCEPTION.get(ace)), ace); |
| | | } |
| | | finally |
| | | { |
| | |
| | | { |
| | | checkOptions(sb.toString(), errorMsgs, |
| | | ls.toArray(new JLabel[ls.size()]), |
| | | ERR_GENERIC_JAVA_ARGUMENT.get(sb.toString())); |
| | | ERR_GENERIC_JAVA_ARGUMENT.get(sb)); |
| | | } |
| | | } |
| | | |
| | |
| | | if (sb.length() > 0) |
| | | { |
| | | checkOptions(sb.toString(), errorMsgs, lOtherArguments, |
| | | ERR_GENERIC_JAVA_ARGUMENT.get(sb.toString())); |
| | | ERR_GENERIC_JAVA_ARGUMENT.get(sb)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | buf.append(suffix.getDN()); |
| | | } |
| | | msg = INFO_REVIEW_REPLICATE_SUFFIX.get(buf.toString()); |
| | | msg = INFO_REVIEW_REPLICATE_SUFFIX.get(buf); |
| | | } |
| | | return msg.toString(); |
| | | } |
| | |
| | | } |
| | | buf.append(jars[i]); |
| | | } |
| | | ex = |
| | | new ApplicationException( |
| | | ex = new ApplicationException( |
| | | ReturnCode.DOWNLOAD_ERROR, |
| | | getThrowableMsg( |
| | | INFO_DOWNLOADING_ERROR.get(buf.toString()), ioe), ioe); |
| | | getThrowableMsg(INFO_DOWNLOADING_ERROR.get(buf), ioe), ioe); |
| | | } catch (Throwable t) |
| | | { |
| | | // This is a bug |
| | | ex = |
| | | new ApplicationException(ReturnCode.BUG, |
| | | ex = new ApplicationException(ReturnCode.BUG, |
| | | getThrowableMsg(INFO_BUG_MSG.get(), t), t); |
| | | } |
| | | } |
| | |
| | | ex = |
| | | new ApplicationException( |
| | | ReturnCode.DOWNLOAD_ERROR, |
| | | INFO_DOWNLOADING_ERROR.get(url.toString()), null); |
| | | INFO_DOWNLOADING_ERROR.get(url), null); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | final LocalizableMessage message = ERR_PWPSTATE_CANNOT_DECODE_GENERALIZED_TIME |
| | | .get(v.getValue().toString(), attributeType.getNameOrOID(), entry |
| | | .getName().toString(), String.valueOf(e)); |
| | | .get(v.getValue(), attributeType.getNameOrOID(), entry.getName(), e); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message, e); |
| | | } |
| | |
| | | case DAYOFWEEK: |
| | | if ((op != EnumBindRuleType.EQUAL_BINDRULE_TYPE) |
| | | && (op != EnumBindRuleType.NOT_EQUAL_BINDRULE_TYPE)) { |
| | | LocalizableMessage message = |
| | | WARN_ACI_SYNTAX_INVALID_BIND_RULE_KEYWORD_OPERATOR_COMBO |
| | | .get(keyword.toString(), op.toString()); |
| | | throw new AciException(message); |
| | | throw new AciException( |
| | | WARN_ACI_SYNTAX_INVALID_BIND_RULE_KEYWORD_OPERATOR_COMBO.get(keyword, op)); |
| | | } |
| | | } |
| | | } |
| | |
| | | default: { |
| | | AttributeType attrType=filter.getAttributeType(); |
| | | if(!attrType.equals(type)) { |
| | | LocalizableMessage message = |
| | | WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_FILTER_LISTS_ATTR_FILTER. |
| | | get(filter.toString()); |
| | | throw new AciException(message); |
| | | throw new AciException( |
| | | WARN_ACI_SYNTAX_INVALID_TARGATTRFILTERS_FILTER_LISTS_ATTR_FILTER.get(filter)); |
| | | } |
| | | } |
| | | } |
| | |
| | | DN entryDN = entry.getName(); |
| | | if (entryMap.containsKey(entryDN)) |
| | | { |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_ADD_ALREADY_EXISTS.get(entryDN.toString()); |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_ADD_ALREADY_EXISTS.get(entryDN); |
| | | throw new DirectoryException(ResultCode.ENTRY_ALREADY_EXISTS, m); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | LocalizableMessage m = |
| | | ERR_LDIF_BACKEND_ADD_MISSING_PARENT.get(entryDN.toString()); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, m, matchedDN, |
| | | null); |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_ADD_MISSING_PARENT.get(entryDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, m, matchedDN, null); |
| | | } |
| | | } |
| | | } |
| | |
| | | parentDN = parentDN.getParentDNInSuffix(); |
| | | } |
| | | |
| | | LocalizableMessage m = |
| | | ERR_LDIF_BACKEND_DELETE_NO_SUCH_ENTRY.get(entryDN.toString()); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, m, matchedDN, |
| | | null); |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_DELETE_NO_SUCH_ENTRY.get(entryDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, m, matchedDN, null); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | if (! subtreeDelete) |
| | | { |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_DELETE_NONLEAF.get(entryDN.toString()); |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_DELETE_NONLEAF.get(entryDN); |
| | | throw new DirectoryException(ResultCode.NOT_ALLOWED_ON_NONLEAF, m); |
| | | } |
| | | |
| | |
| | | parentDN = parentDN.getParentDNInSuffix(); |
| | | } |
| | | |
| | | LocalizableMessage m = |
| | | ERR_LDIF_BACKEND_MODIFY_NO_SUCH_ENTRY.get(entryDN.toString()); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, m, matchedDN, |
| | | null); |
| | | LocalizableMessage m = ERR_LDIF_BACKEND_MODIFY_NO_SUCH_ENTRY.get(entryDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, m, matchedDN, null); |
| | | } |
| | | |
| | | entryMap.put(entryDN, newEntry.duplicate(false)); |
| | |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS. |
| | | get(v.getValue().toString(), de.getMessageObject()); |
| | | get(v.getValue(), de.getMessageObject()); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message, de); |
| | | } |
| | |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS. |
| | | get(v.getValue().toString(), de.getMessageObject()); |
| | | get(v.getValue(), de.getMessageObject()); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message, de); |
| | | } |
| | |
| | | EntryID baseID = dn2id.get(null, aBaseDN, LockMode.DEFAULT); |
| | | if (baseID == null) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_JEB_SEARCH_NO_SUCH_OBJECT.get(aBaseDN.toString()); |
| | | LocalizableMessage message = ERR_JEB_SEARCH_NO_SUCH_OBJECT.get(aBaseDN); |
| | | DN matchedDN = getMatchedDN(aBaseDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, |
| | | message, matchedDN, null); |
| | |
| | | // Check whether the entry already exists. |
| | | if (dn2id.get(txn, entry.getName(), LockMode.DEFAULT) != null) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_JEB_ADD_ENTRY_ALREADY_EXISTS.get(entry.getName().toString()); |
| | | throw new DirectoryException(ResultCode.ENTRY_ALREADY_EXISTS, |
| | | message); |
| | | ERR_JEB_ADD_ENTRY_ALREADY_EXISTS.get(entry.getName())); |
| | | } |
| | | |
| | | // Check that the parent entry exists. |
| | |
| | | if (!dn2id.insert(txn, entry.getName(), entryID)) |
| | | { |
| | | // Do not ever expect to come through here. |
| | | LocalizableMessage message = |
| | | ERR_JEB_ADD_ENTRY_ALREADY_EXISTS.get(entry.getName().toString()); |
| | | throw new DirectoryException(ResultCode.ENTRY_ALREADY_EXISTS, |
| | | message); |
| | | ERR_JEB_ADD_ENTRY_ALREADY_EXISTS.get(entry.getName())); |
| | | } |
| | | |
| | | // Update the referral database for referral entries. |
| | | if (!dn2uri.addEntry(txn, entry)) |
| | | { |
| | | // Do not ever expect to come through here. |
| | | LocalizableMessage message = |
| | | ERR_JEB_ADD_ENTRY_ALREADY_EXISTS.get(entry.getName().toString()); |
| | | throw new DirectoryException(ResultCode.ENTRY_ALREADY_EXISTS, |
| | | message); |
| | | ERR_JEB_ADD_ENTRY_ALREADY_EXISTS.get(entry.getName())); |
| | | } |
| | | |
| | | // Insert into id2entry. |
| | | if (!id2entry.insert(txn, entryID, entry)) |
| | | { |
| | | // Do not ever expect to come through here. |
| | | LocalizableMessage message = |
| | | ERR_JEB_ADD_ENTRY_ALREADY_EXISTS.get(entry.getName().toString()); |
| | | throw new DirectoryException(ResultCode.ENTRY_ALREADY_EXISTS, |
| | | message); |
| | | ERR_JEB_ADD_ENTRY_ALREADY_EXISTS.get(entry.getName())); |
| | | } |
| | | |
| | | // Insert into the indexes, in index configuration order. |
| | |
| | | { |
| | | // The subtree delete control was not specified and |
| | | // the target entry is not a leaf. |
| | | LocalizableMessage message = |
| | | ERR_JEB_DELETE_NOT_ALLOWED_ON_NONLEAF.get(entryDN.toString()); |
| | | throw new DirectoryException(ResultCode.NOT_ALLOWED_ON_NONLEAF, |
| | | message); |
| | | ERR_JEB_DELETE_NOT_ALLOWED_ON_NONLEAF.get(entryDN)); |
| | | } |
| | | |
| | | // This is a subtree delete so create a index buffer |
| | |
| | | if (status != OperationStatus.SUCCESS) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_JEB_DELETE_NO_SUCH_OBJECT.get(leafDNKey.toString()); |
| | | ERR_JEB_DELETE_NO_SUCH_OBJECT.get(leafDNKey); |
| | | DN matchedDN = getMatchedDN(baseDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, |
| | | message, matchedDN, null); |
| | |
| | | if (dn2id.delete(txn, leafDNKey) != OperationStatus.SUCCESS) |
| | | { |
| | | // Do not expect to ever come through here. |
| | | LocalizableMessage message = ERR_JEB_DELETE_NO_SUCH_OBJECT.get(leafDNKey.toString()); |
| | | LocalizableMessage message = ERR_JEB_DELETE_NO_SUCH_OBJECT.get(leafDNKey); |
| | | DN matchedDN = getMatchedDN(baseDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, |
| | | message, matchedDN, null); |
| | |
| | | Entry entry = id2entry.get(txn, leafID, LockMode.RMW); |
| | | if (entry == null) |
| | | { |
| | | LocalizableMessage msg = ERR_JEB_MISSING_ID2ENTRY_RECORD.get(leafID.toString()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | msg); |
| | | ERR_JEB_MISSING_ID2ENTRY_RECORD.get(leafID)); |
| | | } |
| | | |
| | | if (!manageDsaIT) |
| | |
| | | // Remove from id2entry. |
| | | if (!id2entry.remove(txn, leafID)) |
| | | { |
| | | LocalizableMessage msg = ERR_JEB_MISSING_ID2ENTRY_RECORD.get(leafID.toString()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | msg); |
| | | ERR_JEB_MISSING_ID2ENTRY_RECORD.get(leafID)); |
| | | } |
| | | |
| | | // Remove from the indexes, in index config order. |
| | |
| | | if (entry == null) |
| | | { |
| | | // The entryID does not exist. |
| | | LocalizableMessage msg = ERR_JEB_MISSING_ID2ENTRY_RECORD.get(entryID.toString()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | msg); |
| | | ERR_JEB_MISSING_ID2ENTRY_RECORD.get(entryID)); |
| | | } |
| | | |
| | | // Put the entry in the cache making sure not to overwrite |
| | |
| | | { |
| | | // The entry does not exist. |
| | | LocalizableMessage message = |
| | | ERR_JEB_MODIFY_NO_SUCH_OBJECT.get(newEntry.getName().toString()); |
| | | ERR_JEB_MODIFY_NO_SUCH_OBJECT.get(newEntry.getName()); |
| | | DN matchedDN = getMatchedDN(baseDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, |
| | | message, matchedDN, null); |
| | |
| | | dn2uri.targetEntryReferrals(currentDN, null); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_JEB_MODIFYDN_NO_SUCH_OBJECT.get(currentDN.toString()); |
| | | ERR_JEB_MODIFYDN_NO_SUCH_OBJECT.get(currentDN); |
| | | DN matchedDN = getMatchedDN(baseDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, |
| | | message, matchedDN, null); |
| | |
| | | Entry oldApexEntry = id2entry.get(txn, oldApexID, LockMode.DEFAULT); |
| | | if (oldApexEntry == null) |
| | | { |
| | | LocalizableMessage msg = ERR_JEB_MISSING_ID2ENTRY_RECORD.get(oldApexID.toString()); |
| | | throw new DirectoryException( |
| | | DirectoryServer.getServerErrorResultCode(), msg); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | ERR_JEB_MISSING_ID2ENTRY_RECORD.get(oldApexID)); |
| | | } |
| | | |
| | | if (!isManageDsaITOperation(modifyDNOperation)) |
| | |
| | | // Check for referral entries above the base entry. |
| | | dn2uri.targetEntryReferrals(baseDN, searchScope); |
| | | |
| | | LocalizableMessage message = ERR_JEB_SEARCH_NO_SUCH_OBJECT.get(baseDN.toString()); |
| | | LocalizableMessage message = ERR_JEB_SEARCH_NO_SUCH_OBJECT.get(baseDN); |
| | | DN matchedDN = getMatchedDN(baseDN); |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, |
| | | message, matchedDN, null); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LocalizableMessage message = ERR_JEB_ENTRY_DATABASE_CORRUPT.get(id.toString()); |
| | | throw new DirectoryException( |
| | | DirectoryServer.getServerErrorResultCode(), message); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | ERR_JEB_ENTRY_DATABASE_CORRUPT.get(id)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_BACKEND_MODE_INVALID.get(config.dn().toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_CONFIG_BACKEND_MODE_INVALID.get(config.dn())); |
| | | } |
| | | |
| | | //Make sure the mode will allow the server itself access to |
| | |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_BACKEND_MODE_INVALID.get(cfg.dn().toString()); |
| | | unacceptableReasons.add(message); |
| | | unacceptableReasons.add(ERR_CONFIG_BACKEND_MODE_INVALID.get(cfg.dn())); |
| | | acceptable = false; |
| | | } |
| | | |
| | |
| | | { |
| | | if (!suffix.isParentProcessed(parentDN, tmpEnv, clearedBackend)) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_JEB_IMPORT_PARENT_NOT_FOUND.get(parentDN.toString()); |
| | | reader.rejectEntry(entry, message); |
| | | reader.rejectEntry(entry, ERR_JEB_IMPORT_PARENT_NOT_FOUND.get(parentDN)); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | default: |
| | | if (!rebuildConfig.isClearDegradedState()) |
| | | { |
| | | message = NOTE_JEB_REBUILD_START.get(sb.toString(), totalEntries); |
| | | message = NOTE_JEB_REBUILD_START.get(sb, totalEntries); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | if (! tempValues.remove(value)) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_CONFIG_ATTR_NO_SUCH_VALUE.get(name, value.getValue().toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException( |
| | | ERR_CONFIG_ATTR_NO_SUCH_VALUE.get(name, value.getValue())); |
| | | } |
| | | } |
| | | |
| | |
| | | catch(Exception e) |
| | | { |
| | | // TODO: Need a better message. |
| | | LocalizableMessage message = |
| | | ERR_MVFILTER_INVALID_ELEMENT_TYPE.get(e.toString()); |
| | | throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, message); |
| | | throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, |
| | | ERR_MVFILTER_INVALID_ELEMENT_TYPE.get(e)); |
| | | } |
| | | |
| | | switch (type) |
| | |
| | | } catch (Exception e) { |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_CONFIG_AUTHZ_UNABLE_TO_INSTANTIATE_HANDLER. |
| | | get(handlerClassName, String.valueOf(config.dn().toString()), |
| | | stackTraceToSingleLineString(e)); |
| | | get(handlerClassName, config.dn(), stackTraceToSingleLineString(e)); |
| | | throw new InitializationException(message, e); |
| | | } |
| | | return newHandler; |
| | |
| | | DN user = clientConnection.getAuthenticationInfo() |
| | | .getAuthorizationDN(); |
| | | LocalizableMessage message = ERR_ENQUEUE_MUST_CHANGE_PASSWORD |
| | | .get(user != null ? user.toString() : "anonymous"); |
| | | .get(user != null ? user : "anonymous"); |
| | | throw new DirectoryException( |
| | | ResultCode.CONSTRAINT_VIOLATION, message); |
| | | |
| | |
| | | user = clientConnection.getAuthenticationInfo() |
| | | .getAuthorizationDN(); |
| | | message = ERR_ENQUEUE_MUST_CHANGE_PASSWORD |
| | | .get(user != null ? user.toString() : "anonymous"); |
| | | .get(user != null ? user : "anonymous"); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | |
| | | } |
| | | |
| | | LocalizableMessage message = ERR_PWPSTATE_CANNOT_DECODE_GENERALIZED_TIME. |
| | | get(v.getValue().toString(), attributeType.getNameOrOID(), |
| | | userDNString, String.valueOf(e)); |
| | | get(v.getValue(), attributeType.getNameOrOID(), userDNString, e); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message, e); |
| | | } |
| | |
| | | // These are acceptable |
| | | break; |
| | | default: |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_NETWORKGROUP_INVALID_PLUGIN_TYPE.get(t.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_PLUGIN_NETWORKGROUP_INVALID_PLUGIN_TYPE.get(t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | unacceptableReasons |
| | | .add(ERR_CONFIG_NETWORKGROUPREQUESTFILTERINGPOLICY_INVALID_ATTRIBUTE |
| | | .get(allowedAttr, configuration.dn().toString())); |
| | | .get(allowedAttr, configuration.dn())); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | { |
| | | unacceptableReasons |
| | | .add(ERR_CONFIG_NETWORKGROUPREQUESTFILTERINGPOLICY_INVALID_SUBTREE |
| | | .get(allowedSubtree.toString(), configuration.dn() |
| | | .toString())); |
| | | .get(allowedSubtree, configuration.dn())); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | } |
| | | //The certificate can never be null. The LocalizableMessage digest code that will |
| | | //use it later throws a NPE if the certificate is null. |
| | | if(certificate == null) { |
| | | LocalizableMessage msg = |
| | | ERR_CRYPTOMGR_FAILED_INSTANCE_CERTIFICATE_NULL.get(entryDN.toString()); |
| | | throw new CryptoManagerException(msg); |
| | | if (certificate == null) { |
| | | throw new CryptoManagerException( |
| | | ERR_CRYPTOMGR_FAILED_INSTANCE_CERTIFICATE_NULL.get(entryDN)); |
| | | } |
| | | return(certificate); |
| | | return certificate; |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | close(reader); |
| | | |
| | | LocalizableMessage message = ERR_CONFIG_FILE_NO_PARENT.get(entryDN.toString(), |
| | | reader.getLastEntryLineNumber(), |
| | | f.getAbsolutePath(), parentDN.toString()); |
| | | throw new InitializationException(message); |
| | | throw new InitializationException(ERR_CONFIG_FILE_NO_PARENT.get( |
| | | entryDN, reader.getLastEntryLineNumber(), f.getAbsolutePath(), parentDN)); |
| | | } |
| | | |
| | | |
| | |
| | | buffer.append(iterator.next()); |
| | | } |
| | | } |
| | | LocalizableMessage message = ERR_FIFOCACHE_CANNOT_INITIALIZE.get(buffer.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_FIFOCACHE_CANNOT_INITIALIZE.get(buffer)); |
| | | } |
| | | } |
| | | |
| | |
| | | sb.append(ServerConstants.EOL); |
| | | } |
| | | |
| | | // See if there is anything on idMap that isnt reflected on |
| | | // See if there is anything on idMap that is not reflected on |
| | | // dnMap in case maps went out of sync. |
| | | for (Backend backend : idMapCopy.keySet()) { |
| | | for (Long id : idMapCopy.get(backend).keySet()) { |
| | | if ((idMapCopy.get(backend).get(id) == null) || |
| | | !dnMapCopy.containsKey( |
| | | idMapCopy.get(backend).get(id).getDN())) { |
| | | sb.append((idMapCopy.get(backend).get(id) != null ? |
| | | idMapCopy.get(backend).get(id).getDN().toString() : null)); |
| | | final CacheEntry cacheEntry = idMapCopy.get(backend).get(id); |
| | | if (cacheEntry == null || !dnMapCopy.containsKey(cacheEntry.getDN())) { |
| | | sb.append(cacheEntry != null ? cacheEntry.getDN() : null); |
| | | sb.append(":"); |
| | | sb.append(id.toString()); |
| | | sb.append(id); |
| | | sb.append(":"); |
| | | sb.append(backend.getBackendID()); |
| | | sb.append(ServerConstants.EOL); |
| | |
| | | buffer.append(iterator.next()); |
| | | } |
| | | } |
| | | LocalizableMessage message = ERR_FSCACHE_CANNOT_INITIALIZE.get(buffer.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_FSCACHE_CANNOT_INITIALIZE.get(buffer)); |
| | | } |
| | | |
| | | // Set the cache type. |
| | |
| | | |
| | | // Check dnMap first. |
| | | for (String dn : dnMapCopy.keySet()) { |
| | | sb.append(dn.toString()); |
| | | sb.append(dn); |
| | | sb.append(":"); |
| | | sb.append((dnMapCopy.get(dn) != null ? |
| | | dnMapCopy.get(dn).toString() : null)); |
| | | sb.append(dnMapCopy.get(dn) != null ? dnMapCopy.get(dn) : null); |
| | | sb.append(":"); |
| | | String backendID = null; |
| | | Iterator<String> backendIterator = backendMapCopy.keySet().iterator(); |
| | |
| | | principal.append("@").append(realm); |
| | | } |
| | | w.write(principal.toString()); |
| | | LocalizableMessage msg = INFO_GSSAPI_PRINCIPAL_NAME.get(principal.toString()); |
| | | logger.error(msg); |
| | | logger.error(INFO_GSSAPI_PRINCIPAL_NAME.get(principal)); |
| | | w.write("\" isInitiator=false;"); |
| | | w.newLine(); |
| | | w.write("};"); |
| | |
| | | // date than idMap. Dont bother with copies either since this |
| | | // is SoftReference based implementation. |
| | | for(SoftReference<CacheEntry> ce : dnMap.values()) { |
| | | sb.append(ce.get().getDN().toString()); |
| | | sb.append(ce.get().getDN()); |
| | | sb.append(":"); |
| | | sb.append(Long.toString(ce.get().getEntryID())); |
| | | sb.append(ce.get().getEntryID()); |
| | | sb.append(":"); |
| | | sb.append(ce.get().getBackend().getBackendID()); |
| | | sb.append(ServerConstants.EOL); |
| | |
| | | logger.traceException(de); |
| | | |
| | | LocalizableMessage message = ERR_VIRTUAL_STATIC_GROUP_CANNOT_DECODE_TARGET. |
| | | get(v.getValue().toString(), |
| | | String.valueOf(groupEntry.getName()), |
| | | de.getMessageObject()); |
| | | get(v.getValue(), groupEntry.getName(), de.getMessageObject()); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message, de); |
| | | } |
| | |
| | | // The class is valid as far as we can tell. |
| | | return publisher.isConfigurationAcceptable(config, unacceptableReasons); |
| | | } catch (Exception e) { |
| | | LocalizableMessage message = |
| | | invalidLoggerClassErrorMessage.get(className, config.dn().toString(), |
| | | String.valueOf(e)); |
| | | unacceptableReasons.add(message); |
| | | unacceptableReasons.add(invalidLoggerClassErrorMessage.get(className, config.dn(), e)); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LocalizableMessage message = |
| | | invalidLoggerClassErrorMessage.get(className, config.dn().toString(), |
| | | String.valueOf(e)); |
| | | throw new ConfigException(message, e); |
| | | throw new ConfigException( |
| | | invalidLoggerClassErrorMessage.get(className, config.dn(), e), e); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | logger.traceException(e); |
| | | LocalizableMessage message = |
| | | ERR_LOGGER_ERROR_OBTAINING_FREE_SPACE.get(files[0].toString(), |
| | | ERR_LOGGER_ERROR_OBTAINING_FREE_SPACE.get(files[0], |
| | | stackTraceToSingleLineString(e)); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message, e); |
| | |
| | | */ |
| | | public void handleOpenError(File file, Throwable ex) |
| | | { |
| | | LocalizableMessage msg = ERR_LOGGER_ERROR_OPENING_FILE.get(file.toString(), |
| | | publisherConfigDN.toString(), |
| | | stackTraceToSingleLineString(ex)); |
| | | System.err.println(msg); |
| | | System.err.println(ERR_LOGGER_ERROR_OPENING_FILE.get( |
| | | file, publisherConfigDN, stackTraceToSingleLineString(ex))); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | if (fields.size() == unsupportedFields.size()) |
| | | { // all fields are unsupported |
| | | return ERR_CONFIG_LOGGING_EMPTY_LOG_FORMAT.get(cfg.dn().toString()); |
| | | return ERR_CONFIG_LOGGING_EMPTY_LOG_FORMAT.get(cfg.dn()); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | break; |
| | | |
| | | default: |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_CHANGE_NUMBER_INVALID_PLUGIN_TYPE.get(t.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_PLUGIN_CHANGE_NUMBER_INVALID_PLUGIN_TYPE.get(t)); |
| | | } |
| | | } |
| | | if (types.size() != 4) { |
| | | StringBuilder expected = new StringBuilder(); |
| | | expected.append(PluginType.POST_OPERATION_ADD.toString()); |
| | | expected.append(PluginType.POST_OPERATION_ADD); |
| | | expected.append(", "); |
| | | expected.append(PluginType.POST_OPERATION_DELETE.toString()); |
| | | expected.append(PluginType.POST_OPERATION_DELETE); |
| | | expected.append(", "); |
| | | expected.append(PluginType.POST_OPERATION_MODIFY.toString()); |
| | | expected.append(PluginType.POST_OPERATION_MODIFY); |
| | | expected.append(", "); |
| | | expected.append(PluginType.POST_OPERATION_MODIFY_DN.toString()); |
| | | expected.append(PluginType.POST_OPERATION_MODIFY_DN); |
| | | |
| | | StringBuilder found = new StringBuilder(); |
| | | boolean first = true; |
| | |
| | | } else { |
| | | found.append(", "); |
| | | } |
| | | found.append(t.toString()); |
| | | found.append(t); |
| | | } |
| | | |
| | | LocalizableMessage message = ERR_PLUGIN_CHANGE_NUMBER_INVALID_PLUGIN_TYPE_LIST.get( |
| | | found.toString(), expected.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_PLUGIN_CHANGE_NUMBER_INVALID_PLUGIN_TYPE_LIST.get( |
| | | found, expected)); |
| | | } |
| | | } |
| | | |
| | |
| | | // These are acceptable. |
| | | break; |
| | | |
| | | |
| | | default: |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_ENTRYUUID_INVALID_PLUGIN_TYPE.get(t.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_PLUGIN_ENTRYUUID_INVALID_PLUGIN_TYPE.get(t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | // These are acceptable. |
| | | break; |
| | | |
| | | |
| | | default: |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_LASTMOD_INVALID_PLUGIN_TYPE.get(t.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_PLUGIN_LASTMOD_INVALID_PLUGIN_TYPE.get(t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | // This is the only acceptable type. |
| | | break; |
| | | |
| | | |
| | | default: |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_PWPIMPORT_INVALID_PLUGIN_TYPE.get(t.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_PLUGIN_PWPIMPORT_INVALID_PLUGIN_TYPE.get(t)); |
| | | } |
| | | } |
| | | |
| | |
| | | // These are acceptable. |
| | | break; |
| | | |
| | | |
| | | default: |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_7BIT_INVALID_PLUGIN_TYPE.get(t.toString()); |
| | | throw new ConfigException(message); |
| | | throw new ConfigException(ERR_PLUGIN_7BIT_INVALID_PLUGIN_TYPE.get(t)); |
| | | } |
| | | } |
| | | } |
| | |
| | | break; |
| | | |
| | | default: |
| | | LocalizableMessage message = |
| | | ERR_PLUGIN_UNIQUEATTR_INVALID_PLUGIN_TYPE.get(t.toString()); |
| | | throw new ConfigException(message); |
| | | |
| | | throw new ConfigException(ERR_PLUGIN_UNIQUEATTR_INVALID_PLUGIN_TYPE.get(t)); |
| | | } |
| | | } |
| | | |
| | |
| | | DN matchedDN = operation.getMatchedDN(); |
| | | if (matchedDN != null) |
| | | { |
| | | m = INFO_LDIF_CONNHANDLER_MATCHED_DN.get(matchedDN.toString()); |
| | | m = INFO_LDIF_CONNHANDLER_MATCHED_DN.get(matchedDN); |
| | | writer.writeComment(m, 78); |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | |
| | | String str; |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(IOException ioe) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ASN1_READ_ERROR.get(ioe.toString()); |
| | | throw new ASN1Exception(message, ioe); |
| | | throw new ASN1Exception(ERR_ASN1_READ_ERROR.get(ioe), ioe); |
| | | } |
| | | } |
| | | |
| | |
| | | return PluginResult.ImportLDIF.stopEntryProcessing(null); |
| | | } |
| | | |
| | | LocalizableMessage message = NOTE_ERR_LDIF_IMPORT_FRACTIONAL_BAD_DATA_SET |
| | | .get(replicatedDomainBaseDn.toString()); |
| | | return PluginResult.ImportLDIF.stopEntryProcessing(message); |
| | | return PluginResult.ImportLDIF.stopEntryProcessing( |
| | | NOTE_ERR_LDIF_IMPORT_FRACTIONAL_BAD_DATA_SET.get(replicatedDomainBaseDn)); |
| | | } |
| | | |
| | | // Local domain is fractional but remote domain has no config : |
| | |
| | | return PluginResult.ImportLDIF.stopEntryProcessing(null); |
| | | } |
| | | |
| | | LocalizableMessage message = NOTE_ERR_LDIF_IMPORT_FRACTIONAL_DATA_SET_IS_FRACTIONAL |
| | | .get(replicatedDomainBaseDn.toString()); |
| | | return PluginResult.ImportLDIF.stopEntryProcessing(message); |
| | | return PluginResult.ImportLDIF.stopEntryProcessing( |
| | | NOTE_ERR_LDIF_IMPORT_FRACTIONAL_DATA_SET_IS_FRACTIONAL.get(replicatedDomainBaseDn)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.meta.ReplicationDomainCfgDefn.*; |
| | | import org.opends.server.admin.std.meta.ReplicationDomainCfgDefn.IsolationPolicy; |
| | | import org.opends.server.admin.std.server.ExternalChangelogDomainCfg; |
| | | import org.opends.server.admin.std.server.ReplicationDomainCfg; |
| | | import org.opends.server.api.AlertGenerator; |
| | |
| | | import org.opends.server.backends.task.Task; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.*; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1Exception; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.protocols.internal.InternalSearchListener; |
| | |
| | | import org.opends.server.tasks.PurgeConflictsHistoricalTask; |
| | | import org.opends.server.tasks.TaskUtils; |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.operation.*; |
| | | import org.opends.server.util.LDIFReader; |
| | | import org.opends.server.util.TimeThread; |
| | | import org.opends.server.workflowelement.externalchangelog.ECLWorkflowElement; |
| | | import org.opends.server.workflowelement.localbackend.*; |
| | | import org.opends.server.workflowelement.localbackend.LocalBackendModifyOperation; |
| | | |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | |
| | | // Continue with the next change but the servers could now become |
| | | // inconsistent. |
| | | // Let the repair tool know about this. |
| | | LocalizableMessage message = ERR_LOOP_REPLAYING_OPERATION.get(op.toString(), |
| | | op.getErrorMessage().toString()); |
| | | final LocalizableMessage message = ERR_LOOP_REPLAYING_OPERATION.get( |
| | | op, op.getErrorMessage()); |
| | | logger.error(message); |
| | | numUnresolvedNamingConflicts.incrementAndGet(); |
| | | replayErrorMsg = message.toString(); |
| | |
| | | private void renameConflictEntry(Operation conflictOp, DN dn, |
| | | String entryUUID) |
| | | { |
| | | LocalizableMessage alertMessage = NOTE_UNRESOLVED_CONFLICT.get(dn.toString()); |
| | | LocalizableMessage alertMessage = NOTE_UNRESOLVED_CONFLICT.get(dn); |
| | | DirectoryServer.sendAlertNotification(this, |
| | | ALERT_TYPE_REPLICATION_UNRESOLVED_CONFLICT, alertMessage); |
| | | |
| | |
| | | |
| | | // Generate an alert to let the administration know that some |
| | | // conflict could not be solved. |
| | | LocalizableMessage alertMessage = NOTE_UNRESOLVED_CONFLICT.get(conflictDN.toString()); |
| | | LocalizableMessage alertMessage = NOTE_UNRESOLVED_CONFLICT.get(conflictDN); |
| | | DirectoryServer.sendAlertNotification(this, |
| | | ALERT_TYPE_REPLICATION_UNRESOLVED_CONFLICT, alertMessage); |
| | | } |
| | |
| | | // Check that the base DN is configured as a base-dn of the directory server |
| | | if (DirectoryServer.getBackend(dn) == null) |
| | | { |
| | | unacceptableReasons.add(ERR_UNKNOWN_DN.get(dn.toString())); |
| | | unacceptableReasons.add(ERR_UNKNOWN_DN.get(dn)); |
| | | return false; |
| | | } |
| | | |
| | |
| | | StatusMachineEvent event = StatusMachineEvent.statusToEvent(reqStatus); |
| | | if (event == StatusMachineEvent.INVALID_EVENT) |
| | | { |
| | | LocalizableMessage msg = ERR_RS_INVALID_NEW_STATUS.get(reqStatus.toString(), |
| | | getBaseDNString(), Integer.toString(serverId)); |
| | | logger.error(msg); |
| | | logger.error(ERR_RS_INVALID_NEW_STATUS.get(reqStatus, getBaseDN(), serverId)); |
| | | return ServerStatus.INVALID_STATUS; |
| | | } |
| | | |
| | |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.meta.VirtualAttributeCfgDefn.*; |
| | | import org.opends.server.admin.std.server.ReplicationServerCfg; |
| | |
| | | catch (Exception e) |
| | | { |
| | | LocalizableMessage message = |
| | | NOTE_ERR_UNABLE_TO_ENABLE_ECL_VIRTUAL_ATTR.get(attrName, e.toString()); |
| | | NOTE_ERR_UNABLE_TO_ENABLE_ECL_VIRTUAL_ATTR.get(attrName, e); |
| | | throw new DirectoryException(ResultCode.OPERATIONS_ERROR, message, e); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(e.getLocalizedMessage()); |
| | | LocalizableMessage msg = ERR_CHECK_CREATE_REPL_BACKEND_FAILED.get(mb.toString()); |
| | | throw new ConfigException(msg, e); |
| | | throw new ConfigException(ERR_CHECK_CREATE_REPL_BACKEND_FAILED.get(e.getLocalizedMessage()), e); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(e.getLocalizedMessage()); |
| | | LocalizableMessage msg = ERR_DELETE_REPL_BACKEND_FAILED.get(mb.toString()); |
| | | logger.error(msg); |
| | | logger.error(ERR_DELETE_REPL_BACKEND_FAILED.get(e.getLocalizedMessage())); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | // looks like two connected LDAP servers have the same serverId |
| | | logger.error(ERR_DUPLICATE_SERVER_ID, localReplicationServer.getMonitorInstanceName(), |
| | | connectedDSs.get(dsHandler.getServerId()).toString(), |
| | | dsHandler.toString(), dsHandler.getServerId()); |
| | | connectedDSs.get(dsHandler.getServerId()), dsHandler, dsHandler.getServerId()); |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | * An error happened trying to send an error msg to this server. |
| | | * Log an error and close the connection to this server. |
| | | */ |
| | | LocalizableMessageBuilder mb2 = new LocalizableMessageBuilder(); |
| | | mb2.append(ERR_CHANGELOG_ERROR_SENDING_ERROR.get(this.toString())); |
| | | mb2.append(" "); |
| | | mb2.append(stackTraceToSingleLineString(ignored)); |
| | | logger.error(mb2.toMessage()); |
| | | logger.error(ERR_CHANGELOG_ERROR_SENDING_ERROR.get(this), ignored); |
| | | stopServer(msgEmitter, false); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (ChangelogException e) |
| | | { |
| | | LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(ERR_ERROR_CLEARING_DB.get(baseDN.toString(), e.getMessage() |
| | | + " " + stackTraceToSingleLineString(e))); |
| | | logger.error(mb.toMessage()); |
| | | logger.error(ERR_ERROR_CLEARING_DB.get(baseDN, e.getMessage()), e); |
| | | } |
| | | } |
| | | |
| | |
| | | * The remote server has sent an unknown message, close the |
| | | * connection. |
| | | */ |
| | | errMessage = NOTE_READER_NULL_MSG.get(handler.toString()); |
| | | errMessage = NOTE_READER_NULL_MSG.get(handler); |
| | | logger.error(errMessage); |
| | | return; |
| | | } |
| | |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.opends.server.admin.std.server.ReplicationServerCfg; |
| | | import org.opends.server.config.ConfigException; |
| | |
| | | final LocalizableMessageBuilder mb = new LocalizableMessageBuilder(); |
| | | mb.append(e.getLocalizedMessage()); |
| | | mb.append(" "); |
| | | mb.append(String.valueOf(dbDirectory)); |
| | | LocalizableMessage msg = ERR_FILE_CHECK_CREATE_FAILED.get(mb.toString()); |
| | | throw new ConfigException(msg, e); |
| | | mb.append(dbDirectory); |
| | | throw new ConfigException(ERR_FILE_CHECK_CREATE_FAILED.get(mb), e); |
| | | } |
| | | } |
| | | |
| | |
| | | //hyphen is allowed but not as the first byte. |
| | | if (index==0) |
| | | { |
| | | LocalizableMessage msg = ERR_ATTR_SYNTAX_ATTR_ILLEGAL_INITIAL_DASH. |
| | | get(value.toString()); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | msg); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | ERR_ATTR_SYNTAX_ATTR_ILLEGAL_INITIAL_DASH.get(value)); |
| | | } |
| | | break; |
| | | case '_': |
| | |
| | | // name exceptions option is enabled. |
| | | if (index==0) |
| | | { |
| | | LocalizableMessage msg = |
| | | ERR_ATTR_SYNTAX_ATTR_ILLEGAL_INITIAL_UNDERSCORE. |
| | | get(value.toString(), |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | msg); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | ERR_ATTR_SYNTAX_ATTR_ILLEGAL_INITIAL_UNDERSCORE.get( |
| | | value, ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS)); |
| | | } |
| | | else if (!allowExceptions) |
| | | { |
| | | LocalizableMessage msg = ERR_ATTR_SYNTAX_ATTR_ILLEGAL_UNDERSCORE_CHAR. |
| | | get(value.toString(), |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | msg); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | ERR_ATTR_SYNTAX_ATTR_ILLEGAL_UNDERSCORE_CHAR.get( |
| | | value, ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS)); |
| | | } |
| | | break; |
| | | |
| | |
| | | //can not be a digit. |
| | | if(index ==0 && isDigit(ch) && !allowExceptions) |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_ATTR_ILLEGAL_INITIAL_DIGIT. |
| | | get(value.toString(), ch, |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | ERR_ATTR_SYNTAX_ATTR_ILLEGAL_INITIAL_DIGIT.get( |
| | | value, ch, ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS)); |
| | | } |
| | | else if(!((ch>='0' && ch<='9') || (ch>='A' && ch<='Z') || |
| | | (ch>='a' && ch<='z'))) |
| | |
| | | int length = valueString.length(); |
| | | if (length < 3) |
| | | { |
| | | invalidReason.append( |
| | | WARN_ATTR_SYNTAX_BIT_STRING_TOO_SHORT.get(value.toString())); |
| | | invalidReason.append(WARN_ATTR_SYNTAX_BIT_STRING_TOO_SHORT.get(value)); |
| | | return false; |
| | | } |
| | | |
| | |
| | | (valueString.charAt(length-2) != '\'') || |
| | | (valueString.charAt(length-1) != 'B')) |
| | | { |
| | | invalidReason.append( |
| | | WARN_ATTR_SYNTAX_BIT_STRING_NOT_QUOTED.get(value.toString())); |
| | | invalidReason.append(WARN_ATTR_SYNTAX_BIT_STRING_NOT_QUOTED.get(value)); |
| | | return false; |
| | | } |
| | | |
| | |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | |
| | | |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_ILLEGAL_BOOLEAN.get(normalizedValue.toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message); |
| | | WARN_ATTR_SYNTAX_ILLEGAL_BOOLEAN.get(normalizedValue)); |
| | | } |
| | | } |
| | | }; |
| | |
| | | if (stringValue.charAt(0) < 'A' || stringValue.charAt(0) > 'Z' || |
| | | stringValue.charAt(1) < 'A' || stringValue.charAt(1) > 'Z') |
| | | { |
| | | invalidReason.append(ERR_ATTR_SYNTAX_COUNTRY_NO_VALID_ISO_CODE |
| | | .get(value.toString())); |
| | | invalidReason.append(ERR_ATTR_SYNTAX_COUNTRY_NO_VALID_ISO_CODE.get(value)); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DCR_UNKNOWN_AUXILIARY_CLASS. |
| | | get(valueStr, woidBuffer.toString()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | ERR_ATTR_SYNTAX_DCR_UNKNOWN_AUXILIARY_CLASS.get( |
| | | valueStr, woidBuffer)); |
| | | } |
| | | } |
| | | else if (oc.getObjectClassType() != ObjectClassType.AUXILIARY) |
| | |
| | | // This isn't good because it isn't an auxiliary class. |
| | | LocalizableMessage message = |
| | | ERR_ATTR_SYNTAX_DCR_AUXILIARY_CLASS_NOT_AUXILIARY. |
| | | get(valueStr, woidBuffer.toString(), |
| | | oc.getObjectClassType().toString()); |
| | | get(valueStr, woidBuffer, oc.getObjectClassType()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | |
| | | { |
| | | // This isn't good because it isn't an auxiliary class. |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DCR_AUXILIARY_CLASS_NOT_AUXILIARY. |
| | | get(valueStr, woidBuffer.toString(), |
| | | oc.getObjectClassType().toString()); |
| | | get(valueStr, woidBuffer, oc.getObjectClassType()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DCR_UNKNOWN_PROHIBITED_ATTR. |
| | | get(valueStr, woidBuffer.toString()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | ERR_ATTR_SYNTAX_DCR_UNKNOWN_PROHIBITED_ATTR.get( |
| | | valueStr, woidBuffer)); |
| | | } |
| | | } |
| | | |
| | |
| | | String token = tokenizer.nextToken(); |
| | | if (! allowedValues.contains(token)) |
| | | { |
| | | invalidReason.append(ERR_ATTR_SYNTAX_DELIVERY_METHOD_INVALID_ELEMENT |
| | | .get(value.toString(), token)); |
| | | invalidReason.append(ERR_ATTR_SYNTAX_DELIVERY_METHOD_INVALID_ELEMENT.get(value, token)); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | catch (Exception e) |
| | | { |
| | | logger.traceException(e); |
| | | |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_DN_INVALID.get(value.toString(), |
| | | String.valueOf(e))); |
| | | |
| | | invalidReason.append(ERR_ATTR_SYNTAX_DN_INVALID.get(value, e)); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | * Portions Copyright 2012-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.schema; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | |
| | | |
| | | |
| | | import org.opends.server.admin.std.server.AttributeSyntaxCfg; |
| | | import org.opends.server.api.ApproximateMatchingRule; |
| | | import org.opends.server.api.AttributeSyntax; |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | |
| | | |
| | | import org.opends.server.types.*; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | |
| | | } |
| | | catch (NumberFormatException e) |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_ILLEGAL_INTEGER.get(nvalue.toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message); |
| | | WARN_ATTR_SYNTAX_ILLEGAL_INTEGER.get(nvalue)); |
| | | } |
| | | } |
| | | }; |
| | |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ATTR_SYNTAX_NAME_FORM_UNKNOWN_REQUIRED_ATTR. |
| | | get(oid, woidBuffer.toString()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | ERR_ATTR_SYNTAX_NAME_FORM_UNKNOWN_REQUIRED_ATTR.get(oid, woidBuffer)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_NAME_FORM_UNKNOWN_REQUIRED_ATTR. |
| | | get(oid, woidBuffer.toString()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | ERR_ATTR_SYNTAX_NAME_FORM_UNKNOWN_REQUIRED_ATTR.get(oid, woidBuffer)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ATTR_SYNTAX_NAME_FORM_UNKNOWN_OPTIONAL_ATTR. |
| | | get(oid, woidBuffer.toString()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | ERR_ATTR_SYNTAX_NAME_FORM_UNKNOWN_OPTIONAL_ATTR.get(oid, woidBuffer)); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_NAME_FORM_UNKNOWN_OPTIONAL_ATTR. |
| | | get(oid, woidBuffer.toString()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | ERR_ATTR_SYNTAX_NAME_FORM_UNKNOWN_OPTIONAL_ATTR.get(oid, woidBuffer)); |
| | | } |
| | | } |
| | | |
| | |
| | | //hyphen is allowed but not as the first byte. |
| | | if (index==0) |
| | | { |
| | | LocalizableMessage msg = ERR_OC_SYNTAX_ATTR_ILLEGAL_INITIAL_DASH. |
| | | get(value.toString()); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | msg); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | ERR_OC_SYNTAX_ATTR_ILLEGAL_INITIAL_DASH.get(value)); |
| | | } |
| | | break; |
| | | case '_': |
| | |
| | | // name exceptions option is enabled. |
| | | if (index==0) |
| | | { |
| | | LocalizableMessage msg = |
| | | ERR_OC_SYNTAX_ATTR_ILLEGAL_INITIAL_UNDERSCORE. |
| | | get(value.toString(), |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | msg); |
| | | LocalizableMessage msg = ERR_OC_SYNTAX_ATTR_ILLEGAL_INITIAL_UNDERSCORE |
| | | .get(value, ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, msg); |
| | | } |
| | | else if (!allowExceptions) |
| | | { |
| | | LocalizableMessage msg = ERR_OC_SYNTAX_ATTR_ILLEGAL_UNDERSCORE_CHAR. |
| | | get(value.toString(), |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | get(value, ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | msg); |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, msg); |
| | | } |
| | | break; |
| | | |
| | |
| | | if(index ==0 && isDigit(ch) && !allowExceptions) |
| | | { |
| | | LocalizableMessage message = ERR_OC_SYNTAX_ATTR_ILLEGAL_INITIAL_DIGIT. |
| | | get(value.toString(), ch, |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | get(value, ch, ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message); |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | } |
| | | else if(!((ch>='0' && ch<='9') || (ch>='A' && ch<='Z') || |
| | | (ch>='a' && ch<='z'))) |
| | |
| | | // requires an attribute type that we don't know anything about. |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_UNKNOWN_REQUIRED_ATTR. |
| | | get(oid, woidBuffer.toString()); |
| | | get(oid, woidBuffer); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | |
| | | // an attribute type that we don't know anything about. |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_UNKNOWN_REQUIRED_ATTR. |
| | | get(oid, woidBuffer.toString()); |
| | | get(oid, woidBuffer); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | |
| | | // an attribute type that we don't know anything about. |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_UNKNOWN_OPTIONAL_ATTR. |
| | | get(oid, woidBuffer.toString()); |
| | | get(oid, woidBuffer); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | |
| | | // attribute type that we don't know anything about. |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_UNKNOWN_OPTIONAL_ATTR. |
| | | get(oid, woidBuffer.toString()); |
| | | get(oid, woidBuffer); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_INVALID_SUPERIOR_TYPE. |
| | | get(oid, objectClassType.toString(), superiorType.toString(), |
| | | superiorClass.getNameOrOID()); |
| | | get(oid, objectClassType, superiorType, superiorClass.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | } |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_INVALID_SUPERIOR_TYPE. |
| | | get(oid, objectClassType.toString(), superiorType.toString(), |
| | | get(oid, objectClassType, superiorType, |
| | | superiorClass.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_INVALID_SUPERIOR_TYPE. |
| | | get(oid, objectClassType.toString(), superiorType.toString(), |
| | | get(oid, objectClassType, superiorType, |
| | | superiorClass.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | |
| | | if(containsTimeUnit) |
| | | { |
| | | //We already have time unit found by now. |
| | | message = WARN_ATTR_CONFLICTING_ASSERTION_FORMAT. |
| | | get(value.toString()); |
| | | message = WARN_ATTR_CONFLICTING_ASSERTION_FORMAT.get(value); |
| | | } |
| | | else |
| | | { |
| | |
| | | week = number; |
| | | break; |
| | | default: |
| | | message = |
| | | WARN_ATTR_INVALID_RELATIVE_TIME_ASSERTION_FORMAT. |
| | | get(value.toString(),(char)value.byteAt(index)); |
| | | message = WARN_ATTR_INVALID_RELATIVE_TIME_ASSERTION_FORMAT. |
| | | get(value,(char)value.byteAt(index)); |
| | | } |
| | | } |
| | | if(message !=null) |
| | |
| | | case 'M': |
| | | if(number == 0) |
| | | { |
| | | message = |
| | | WARN_ATTR_INVALID_MONTH_ASSERTION_FORMAT. |
| | | get(value.toString(),number); |
| | | message = WARN_ATTR_INVALID_MONTH_ASSERTION_FORMAT.get(value, number); |
| | | } |
| | | else if(month > 0) |
| | | { |
| | | message = |
| | | WARN_ATTR_DUPLICATE_MONTH_ASSERTION_FORMAT.get( |
| | | value.toString(),month); |
| | | message = WARN_ATTR_DUPLICATE_MONTH_ASSERTION_FORMAT.get(value, month); |
| | | } |
| | | else |
| | | { |
| | |
| | | case 'Y': |
| | | if(number == 0) |
| | | { |
| | | message = |
| | | WARN_ATTR_INVALID_YEAR_ASSERTION_FORMAT. |
| | | get(value.toString(),number); |
| | | message = WARN_ATTR_INVALID_YEAR_ASSERTION_FORMAT.get(value, number); |
| | | } |
| | | else if(year >0) |
| | | { |
| | | message = WARN_ATTR_DUPLICATE_YEAR_ASSERTION_FORMAT. |
| | | get(value.toString(),year); |
| | | message = WARN_ATTR_DUPLICATE_YEAR_ASSERTION_FORMAT.get(value, year); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | break; |
| | | default: |
| | | message = |
| | | WARN_ATTR_INVALID_PARTIAL_TIME_ASSERTION_FORMAT. |
| | | get(value.toString(),(char)value.byteAt(index)); |
| | | message = WARN_ATTR_INVALID_PARTIAL_TIME_ASSERTION_FORMAT. |
| | | get(value,(char)value.byteAt(index)); |
| | | } |
| | | if(message !=null) |
| | | { |
| | |
| | | if(year < 0) |
| | | { |
| | | //A future date is allowed. |
| | | LocalizableMessage message = |
| | | WARN_ATTR_INVALID_YEAR_ASSERTION_FORMAT. |
| | | get(value.toString(),year); |
| | | LocalizableMessage message = WARN_ATTR_INVALID_YEAR_ASSERTION_FORMAT.get(value, year); |
| | | logger.warn(message); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | } |
| | | |
| | | switch(month) |
| | |
| | | month = Calendar.DECEMBER; |
| | | break; |
| | | default: |
| | | LocalizableMessage message = |
| | | WARN_ATTR_INVALID_MONTH_ASSERTION_FORMAT. |
| | | get(value.toString(),month); |
| | | LocalizableMessage message = WARN_ATTR_INVALID_MONTH_ASSERTION_FORMAT.get(value, month); |
| | | logger.warn(message); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | } |
| | | |
| | | boolean invalidDate = false; |
| | |
| | | } |
| | | if(invalidDate) |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_INVALID_DATE_ASSERTION_FORMAT.get(value.toString(), date); |
| | | LocalizableMessage message = WARN_ATTR_INVALID_DATE_ASSERTION_FORMAT.get(value, date); |
| | | logger.warn(message); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | } |
| | | |
| | | if(!(hour >=-1 && hour <=23)) |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_INVALID_HOUR_ASSERTION_FORMAT. |
| | | get(value.toString(),date); |
| | | LocalizableMessage message = WARN_ATTR_INVALID_HOUR_ASSERTION_FORMAT.get(value, date); |
| | | logger.warn(message); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | } |
| | | |
| | | if(!(minute >=-1 && minute <=59)) |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_INVALID_MINUTE_ASSERTION_FORMAT. |
| | | get(value.toString(),date); |
| | | logger.warn(message); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | LocalizableMessage message = WARN_ATTR_INVALID_MINUTE_ASSERTION_FORMAT.get(value, date); |
| | | logger.warn(message); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | } |
| | | |
| | | if(!(second >=-1 && second <=60)) //Consider leap seconds. |
| | | { |
| | | LocalizableMessage message = |
| | | WARN_ATTR_INVALID_SECOND_ASSERTION_FORMAT. |
| | | get(value.toString(),date); |
| | | logger.warn(message); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | LocalizableMessage message = WARN_ATTR_INVALID_SECOND_ASSERTION_FORMAT.get(value, date); |
| | | logger.warn(message); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, message); |
| | | } |
| | | |
| | | /** |
| | |
| | | catch (Exception e) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_TASK_DISCONNECT_INVALID_CONN_ID.get(v.getValue().toString()); |
| | | ERR_TASK_DISCONNECT_INVALID_CONN_ID.get(v.getValue()); |
| | | throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX, |
| | | message, e); |
| | | } |
| | |
| | | OperatingSystem operatingSystem = DirectoryServer.getOperatingSystem(); |
| | | if (! OperatingSystem.isUNIXBased(operatingSystem)) |
| | | { |
| | | err.println(ERR_CREATERC_ONLY_RUNS_ON_UNIX.get().toString()); |
| | | err.println(ERR_CREATERC_ONLY_RUNS_ON_UNIX.get()); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | err.println(ERR_ERROR_PARSING_ARGS.get(ae.getMessage()).toString()); |
| | | err.println(ERR_ERROR_PARSING_ARGS.get(ae.getMessage())); |
| | | return 1; |
| | | } |
| | | |
| | |
| | | } |
| | | encodedPW = storageScheme.encodePasswordWithScheme(clearPW); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_ENCPW_ENCODED_PASSWORD.get(encodedPW.toString()); |
| | | out.println(message); |
| | | out.println(ERR_ENCPW_ENCODED_PASSWORD.get(encodedPW)); |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | |
| | | if (matchedDN != null) |
| | | { |
| | | |
| | | message = ERR_LDAPPWMOD_FAILURE_MATCHED_DN.get(matchedDN.toString()); |
| | | message = ERR_LDAPPWMOD_FAILURE_MATCHED_DN.get(matchedDN); |
| | | err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | } |
| | | |
| | |
| | | |
| | | if (matchedDN != null) |
| | | { |
| | | err.println(ERR_TOOL_MATCHED_DN.get(matchedDN.toString())); |
| | | err.println(ERR_TOOL_MATCHED_DN.get(matchedDN)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | println(); |
| | | // We assume that the app we are running is this one. |
| | | println(INFO_DSCFG_NON_INTERACTIVE.get(commandBuilder.toString())); |
| | | println(INFO_DSCFG_NON_INTERACTIVE.get(commandBuilder)); |
| | | } |
| | | if (equivalentCommandFileArgument.isPresent()) |
| | | { |
| | |
| | | reader.close(); |
| | | |
| | | } catch (IOException ex) { |
| | | println(ERR_DSCFG_ERROR_READING_BATCH_FILE.get(ex.toString())); |
| | | println(ERR_DSCFG_ERROR_READING_BATCH_FILE.get(ex)); |
| | | } |
| | | } |
| | | |
| | |
| | | adminProperties.put(ADSContext.AdministratorProperty.PASSWORD, |
| | | uData.getAdminPwd()); |
| | | adminProperties.put(ADSContext.AdministratorProperty.DESCRIPTION, |
| | | INFO_GLOBAL_ADMINISTRATOR_DESCRIPTION.get().toString()); |
| | | INFO_GLOBAL_ADMINISTRATOR_DESCRIPTION.get()); |
| | | return adminProperties; |
| | | } |
| | | |
| | |
| | | { |
| | | println(); |
| | | // We assume that the app we are running is this one. |
| | | println( |
| | | INFO_REPLICATION_NON_INTERACTIVE.get(commandBuilder.toString())); |
| | | println(INFO_REPLICATION_NON_INTERACTIVE.get(commandBuilder)); |
| | | } |
| | | if (argParser.equivalentCommandFileArgument.isPresent()) |
| | | { |
| | |
| | | sb.append(entry.getId()); |
| | | } |
| | | app.printlnProgress(); |
| | | app.printProgress(INFO_AVAILABLE_DEFINED_TASKS.get(sb.toString())); |
| | | app.printProgress(INFO_AVAILABLE_DEFINED_TASKS.get(sb)); |
| | | app.printlnProgress(); |
| | | app.printlnProgress(); |
| | | |
| | |
| | | |
| | | context.notify(INFO_UPGRADE_TITLE.get(), TITLE_CALLBACK); |
| | | context.notify( |
| | | INFO_UPGRADE_SUMMARY.get(context.getFromVersion().toString(), context |
| | | .getToVersion().toString()), NOTICE_CALLBACK); |
| | | INFO_UPGRADE_SUMMARY.get(context.getFromVersion(), context.getToVersion()), |
| | | NOTICE_CALLBACK); |
| | | context.notify(INFO_UPGRADE_GENERAL_SEE_FOR_DETAILS.get(UpgradeUtils |
| | | .getInstallationPath() |
| | | + File.separator + UpgradeLog.UPGRADELOGNAME), NOTICE_CALLBACK); |
| | |
| | | * upgrade so that upgrade is idempotent. |
| | | */ |
| | | final LocalizableMessage message = |
| | | ERR_UPGRADE_VERSION_UP_TO_DATE.get(context.getToVersion().toString()); |
| | | ERR_UPGRADE_VERSION_UP_TO_DATE.get(context.getToVersion()); |
| | | context.notify(message, NOTICE_CALLBACK); |
| | | throw new ClientException(EXIT_CODE_SUCCESS, message); |
| | | } |
| | |
| | | if (cc.getOptionType() == ConfirmationCallback.YES_NO_OPTION) |
| | | { |
| | | choices.addAll(yesNoDefaultResponses); |
| | | prompt.append(INFO_PROMPT_YES_COMPLETE_ANSWER.get().toString()) |
| | | prompt.append(INFO_PROMPT_YES_COMPLETE_ANSWER.get()) |
| | | .append("/") |
| | | .append(INFO_PROMPT_NO_COMPLETE_ANSWER.get().toString()); |
| | | .append(INFO_PROMPT_NO_COMPLETE_ANSWER.get()); |
| | | } |
| | | else if (cc.getOptionType() |
| | | == ConfirmationCallback.YES_NO_CANCEL_OPTION) |
| | |
| | | .arrayToList(new String[] { INFO_TASKINFO_CMD_CANCEL_CHAR.get() |
| | | .toString() })); |
| | | |
| | | prompt.append(" ").append("(").append( |
| | | INFO_PROMPT_YES_COMPLETE_ANSWER.get().toString()).append("/") |
| | | .append(INFO_PROMPT_NO_COMPLETE_ANSWER.get().toString()) |
| | | .append("/").append( |
| | | INFO_TASKINFO_CMD_CANCEL_CHAR.get().toString()); |
| | | prompt.append(" ") |
| | | .append("(").append(INFO_PROMPT_YES_COMPLETE_ANSWER.get()) |
| | | .append("/").append(INFO_PROMPT_NO_COMPLETE_ANSWER.get()) |
| | | .append("/").append(INFO_TASKINFO_CMD_CANCEL_CHAR.get()); |
| | | } |
| | | prompt.append(")"); |
| | | |
| | |
| | | break; |
| | | } |
| | | |
| | | if ((value.toLowerCase().equals( |
| | | INFO_PROMPT_YES_FIRST_LETTER_ANSWER.get().toString()) || value |
| | | .toLowerCase().equals( |
| | | INFO_PROMPT_YES_COMPLETE_ANSWER.get().toString())) |
| | | String valueLC = value.toLowerCase(); |
| | | if ((valueLC.equals(INFO_PROMPT_YES_FIRST_LETTER_ANSWER.get()) |
| | | || valueLC.equals(INFO_PROMPT_YES_COMPLETE_ANSWER.get())) |
| | | && choices.contains(value)) |
| | | { |
| | | cc.setSelectedIndex(ConfirmationCallback.YES); |
| | | break; |
| | | } |
| | | else if ((value.toLowerCase().equals( |
| | | INFO_PROMPT_NO_FIRST_LETTER_ANSWER.get().toString()) || value |
| | | .toLowerCase().equals( |
| | | INFO_PROMPT_NO_COMPLETE_ANSWER.get().toString())) |
| | | else if ((valueLC.equals(INFO_PROMPT_NO_FIRST_LETTER_ANSWER.get()) |
| | | || valueLC.equals(INFO_PROMPT_NO_COMPLETE_ANSWER.get())) |
| | | && choices.contains(value)) |
| | | { |
| | | cc.setSelectedIndex(ConfirmationCallback.NO); |
| | | break; |
| | | } |
| | | else if ((value.toLowerCase().equals(INFO_TASKINFO_CMD_CANCEL_CHAR |
| | | .get().toString())) |
| | | else if (valueLC.equals(INFO_TASKINFO_CMD_CANCEL_CHAR.get()) |
| | | && choices.contains(value)) |
| | | { |
| | | cc.setSelectedIndex(ConfirmationCallback.CANCEL); |
| | |
| | | // then that's an error. |
| | | if (b != '=') |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_NO_EQUAL. |
| | | get(dnString.toString(), attributeName.toString(), |
| | | (char) b); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | ERR_ATTR_SYNTAX_DN_NO_EQUAL.get(dnString, attributeName, (char) b)); |
| | | } |
| | | |
| | | |
| | |
| | | // This means that we hit the end of the value before |
| | | // finding a '='. This is illegal because there is no |
| | | // attribute-value separator. |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_END_WITH_ATTR_NAME. |
| | | get(dnString.toString(), attributeName.toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | ERR_ATTR_SYNTAX_DN_END_WITH_ATTR_NAME.get(dnString, attributeName)); |
| | | } |
| | | |
| | | |
| | |
| | | // then that's an error. |
| | | if (b != '=') |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_NO_EQUAL. |
| | | get(dnString.toString(), attributeName.toString(), |
| | | (char) b); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | ERR_ATTR_SYNTAX_DN_NO_EQUAL.get(dnString, attributeName, (char) b)); |
| | | } |
| | | |
| | | |
| | |
| | | // This means that we hit the end of the value before |
| | | // finding a '='. This is illegal because there is no |
| | | // attribute-value separator. |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_END_WITH_ATTR_NAME. |
| | | get(dnString, attributeName.toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | ERR_ATTR_SYNTAX_DN_END_WITH_ATTR_NAME.get(dnString, attributeName)); |
| | | } |
| | | else |
| | | { |
| | |
| | | // character in the attribute name. |
| | | if (dnBytes.position() == nameStartPos + 1) |
| | | { |
| | | msg = ERR_ATTR_SYNTAX_DN_ATTR_ILLEGAL_INITIAL_DASH. |
| | | get(dnBytes.toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | msg); |
| | | msg = ERR_ATTR_SYNTAX_DN_ATTR_ILLEGAL_INITIAL_DASH.get(dnBytes); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, msg); |
| | | } |
| | | break; |
| | | |
| | |
| | | if (dnBytes.position() == nameStartPos + 1) |
| | | { |
| | | msg = ERR_ATTR_SYNTAX_DN_ATTR_ILLEGAL_INITIAL_UNDERSCORE. |
| | | get(dnBytes.toString(), |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | msg); |
| | | get(dnBytes, ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, msg); |
| | | } |
| | | else if (!allowExceptions) |
| | | { |
| | | msg = ERR_ATTR_SYNTAX_DN_ATTR_ILLEGAL_UNDERSCORE_CHAR. |
| | | get(dnBytes.toString(), |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | msg); |
| | | get(dnBytes, ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, msg); |
| | | } |
| | | break; |
| | | |
| | |
| | | // least one character. |
| | | if (nameBytes == null || nameBytes.length() == 0) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_ATTR_SYNTAX_DN_ATTR_NO_NAME.get(dnBytes.toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_ATTR_NO_NAME.get(dnBytes); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, message); |
| | | } |
| | | else if (checkForOID) |
| | | { |
| | |
| | | else if (isDigit((char)nameBytes.byteAt(0)) && (!allowExceptions)) |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_ATTR_ILLEGAL_INITIAL_DIGIT. |
| | | get(dnBytes.toString(), ((char)nameBytes.byteAt(0)), |
| | | get(dnBytes, ((char)nameBytes.byteAt(0)), |
| | | ATTR_ALLOW_ATTRIBUTE_NAME_EXCEPTIONS); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, message); |
| | | } |
| | | |
| | | |
| | | return nameBytes; |
| | | } |
| | | |
| | |
| | | else |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_INVALID_HEX_DIGIT. |
| | | get(dnBytes.toString(), (char) b); |
| | | throw new DirectoryException( |
| | | ResultCode.INVALID_DN_SYNTAX, message); |
| | | get(dnBytes, (char) b); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, message); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_HEX_VALUE_TOO_SHORT. |
| | | get(dnBytes.toString()); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_HEX_VALUE_TOO_SHORT.get(dnBytes); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, message); |
| | | } |
| | | } |
| | | else if ((b == ' ') || (b == ',') || (b == ';') || (b == '+')) |
| | |
| | | { |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = |
| | | ERR_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE. |
| | | get(dnBytes.toString(), String.valueOf(e)); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, |
| | | message); |
| | | LocalizableMessage message = ERR_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE.get(dnBytes, e); |
| | | throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX, message); |
| | | } |
| | | } |
| | | |
| | |
| | | catch (Exception e) |
| | | { |
| | | // The file could not be created with the correct permissions. |
| | | LocalizableMessage message = |
| | | WARN_EXPORT_LDIF_SET_PERMISSION_FAILED.get(f.toString(), |
| | | stackTraceToSingleLineString(e)); |
| | | LocalizableMessage message = WARN_EXPORT_LDIF_SET_PERMISSION_FAILED |
| | | .get(f, stackTraceToSingleLineString(e)); |
| | | throw new IOException(message.toString()); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | System.err.println( |
| | | ERR_ERROR_PARSING_ARGS.get(ae.getMessage()).toString()); |
| | | System.err.println(ERR_ERROR_PARSING_ARGS.get(ae.getMessage())); |
| | | System.exit(1); |
| | | } |
| | | |
| | |
| | | catch (Throwable t) |
| | | { |
| | | // Bug |
| | | System.err.println(ERR_UNEXPECTED.get(t.toString()).toString()); |
| | | System.err.println(ERR_UNEXPECTED.get(t)); |
| | | System.exit(1); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch(UnsupportedEncodingException ex) |
| | | { |
| | | System.err.println(ERR_UNEXPECTED.get(ex.toString()).toString()); |
| | | System.err.println(ERR_UNEXPECTED.get(ex)); |
| | | System.exit(1); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | System.err.println( |
| | | ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage()).toString()); |
| | | System.err.println(ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage())); |
| | | System.exit(1); |
| | | } |
| | | |
| | |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | System.err.println( |
| | | ERR_ERROR_PARSING_ARGS.get(ae.getMessage()).toString()); |
| | | System.err.println(ERR_ERROR_PARSING_ARGS.get(ae.getMessage())); |
| | | System.exit(1); |
| | | } |
| | | |
| | |
| | | if (colonPos <= 0) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_LDIF_NO_ATTR_NAME.get(lastEntryLineNumber, line.toString()); |
| | | ERR_LDIF_NO_ATTR_NAME.get(lastEntryLineNumber, line); |
| | | |
| | | logToRejectWriter(lines, message); |
| | | throw new LDIFException(message, lastEntryLineNumber, true); |
| | |
| | | else if (! attrName.equals("dn")) |
| | | { |
| | | LocalizableMessage message = |
| | | ERR_LDIF_NO_DN.get(lastEntryLineNumber, line.toString()); |
| | | ERR_LDIF_NO_DN.get(lastEntryLineNumber, line); |
| | | |
| | | logToRejectWriter(lines, message); |
| | | throw new LDIFException(message, lastEntryLineNumber, true); |
| | |
| | | { |
| | | logger.traceException(e); |
| | | LocalizableMessage message = |
| | | ERR_LDIF_INVALID_DN.get(lineNumber, line.toString(), e.getMessage()); |
| | | ERR_LDIF_INVALID_DN.get(lineNumber, line, e.getMessage()); |
| | | throw new LDIFException(message, lineNumber, true); |
| | | } |
| | | |
| | |
| | | NOTE_JAVA_HOME.get(System.getProperty("java.home"))); |
| | | System.out.println( |
| | | NOTE_JAVA_CLASSPATH.get(System.getProperty("java.class.path"))); |
| | | System.out.println( |
| | | NOTE_JE_VERSION.get(JEVersion.CURRENT_VERSION.toString())); |
| | | System.out.println(NOTE_JE_VERSION.get(JEVersion.CURRENT_VERSION)); |
| | | System.out.println( |
| | | NOTE_CURRENT_DIRECTORY.get(System.getProperty("user.dir"))); |
| | | String installDir = toCanonicalPath(DirectoryServer.getServerRoot()); |
| | |
| | | LocalizableMessageBuilder invalidReason = new LocalizableMessageBuilder(); |
| | | if (! a.valueIsAcceptable(argValue, invalidReason)) |
| | | { |
| | | LocalizableMessage message = ERR_SUBCMDPARSER_VALUE_UNACCEPTABLE_FOR_LONG_ID. |
| | | get(argValue, argName, invalidReason.toString()); |
| | | throw new ArgumentException(message); |
| | | throw new ArgumentException(ERR_SUBCMDPARSER_VALUE_UNACCEPTABLE_FOR_LONG_ID |
| | | .get(argValue, argName, invalidReason)); |
| | | } |
| | | |
| | | // If the argument already has a value, then make sure it is |
| | |
| | | throws CLIException |
| | | { |
| | | String answer = null; |
| | | final LocalizableMessage messageToDisplay = |
| | | INFO_PROMPT_SINGLE_DEFAULT.get(prompt.toString(), defaultValue); |
| | | if (msgStyle == Style.TITLE) |
| | | { |
| | | println(); |
| | | } |
| | | print(messageToDisplay); |
| | | print(INFO_PROMPT_SINGLE_DEFAULT.get(prompt, defaultValue)); |
| | | out.print(" "); |
| | | |
| | | try |
| | |
| | | { |
| | | if (defaultValue != null) |
| | | { |
| | | prompt = |
| | | INFO_PROMPT_SINGLE_DEFAULT.get(prompt.toString(), defaultValue); |
| | | prompt = INFO_PROMPT_SINGLE_DEFAULT.get(prompt, defaultValue); |
| | | } |
| | | String response = readLineOfInput(prompt); |
| | | |
| | |
| | | |
| | | if (defaultValue != -1) |
| | | { |
| | | prompt = |
| | | INFO_PROMPT_SINGLE_DEFAULT.get(prompt.toString(), String |
| | | .valueOf(defaultValue)); |
| | | prompt = INFO_PROMPT_SINGLE_DEFAULT.get(prompt, defaultValue); |
| | | } |
| | | |
| | | return readValidatedInput(prompt, callback, CONFIRMATION_MAX_TRIES); |
| | |
| | | |
| | | if (defaultValue != -1) |
| | | { |
| | | prompt = |
| | | INFO_PROMPT_SINGLE_DEFAULT.get(prompt.toString(), String |
| | | .valueOf(defaultValue)); |
| | | prompt = INFO_PROMPT_SINGLE_DEFAULT.get(prompt, defaultValue); |
| | | } |
| | | |
| | | return readValidatedInput(prompt, callback, CONFIRMATION_MAX_TRIES); |
| | |
| | | for (int i = 0; i < chain.length; i++) |
| | | { |
| | | app.println(); |
| | | app.println(INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE |
| | | .get(chain[i].toString())); |
| | | app.println(INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE.get(chain[i])); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | |
| | | if (this.snmpAdaptor == null) { |
| | | throw new Exception( |
| | | ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get().toString()); |
| | | ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get()); |
| | | } |
| | | |
| | | // Create the Usm MIB to allow user management |
| | |
| | | this.snmpAdaptor.registerUsmMib(server, this.UsmObjName); |
| | | } catch (Exception ex) { |
| | | throw new Exception( |
| | | ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get().toString()); |
| | | ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get()); |
| | | } |
| | | } |
| | | |
| | |
| | | // Check if the snmpAdaptor is online |
| | | if (this.snmpAdaptor.getState() != CommunicatorServer.ONLINE) { |
| | | throw new Exception( |
| | | ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get().toString()); |
| | | ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get()); |
| | | } |
| | | |
| | | // Check the trap destinations before trying to sent traps |
| | |
| | | |
| | | } catch (Exception ex) { |
| | | throw new Exception( |
| | | ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get().toString()); |
| | | ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get()); |
| | | } |
| | | } |
| | | |
| | |
| | | Backend b = DirectoryServer.getBackend(DN.valueOf("o=test")); |
| | | |
| | | assertFalse(cache.containsEntry(testEntriesList.get(0).getName()), |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | | cache.putEntry(testEntriesList.get(0), b, 1); |
| | | |
| | | assertTrue(cache.containsEntry(testEntriesList.get(0).getName()), |
| | | "Expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | Backend b = DirectoryServer.getBackend(DN.valueOf("o=test")); |
| | | |
| | | assertNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | | cache.putEntry(testEntriesList.get(0), b, 1); |
| | | |
| | | assertNotNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | Backend b = DirectoryServer.getBackend(DN.valueOf("o=test")); |
| | | |
| | | assertNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | | cache.putEntry(testEntriesList.get(0), b, 1); |
| | | |
| | | assertNotNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | Backend b = DirectoryServer.getBackend(DN.valueOf("o=test")); |
| | | |
| | | assertEquals(cache.getEntryID(testEntriesList.get(0).getName()), -1, |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | | cache.putEntry(testEntriesList.get(0), b, 1); |
| | | |
| | | assertEquals(cache.getEntryID(testEntriesList.get(0).getName()), 1, |
| | | "Expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | cache.putEntry(testEntriesList.get(0), b, 1); |
| | | |
| | | assertNotNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | Backend b = DirectoryServer.getBackend(DN.valueOf("o=test")); |
| | | |
| | | assertTrue(cache.putEntryIfAbsent(testEntriesList.get(0), b, 1), |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | | assertFalse(cache.putEntryIfAbsent(testEntriesList.get(0), b, 1), |
| | | "Expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | | assertNotNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | cache.removeEntry(testEntriesList.get(0).getName()); |
| | | |
| | | assertNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | cache.clear(); |
| | | |
| | | assertNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | ServerConstants.EOL + cache.toVerboseString()); |
| | | |
| | | assertNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | cache.clearSubtree(DN.valueOf("o=test")); |
| | | |
| | | assertNull(cache.getEntry(testEntriesList.get(0).getName()), |
| | | "Not expected to find " + testEntriesList.get(0).getName().toString() + |
| | | "Not expected to find " + testEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | assertNotNull(super.cache.getEntry( |
| | | testSoftRefEntriesList.get(0).getName()), |
| | | "Expected to find " + |
| | | testSoftRefEntriesList.get(0).getName().toString() + |
| | | testSoftRefEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + |
| | | ServerConstants.EOL + cache.toVerboseString()); |
| | | assertNotNull(super.cache.getEntry( |
| | | testFIFOEntriesList.get(0).getName()), |
| | | "Expected to find " + |
| | | testFIFOEntriesList.get(0).getName().toString() + |
| | | testFIFOEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + |
| | | ServerConstants.EOL + cache.toVerboseString()); |
| | | assertNotNull(super.cache.getEntry( |
| | | testFSEntriesList.get(0).getName()), |
| | | "Expected to find " + |
| | | testFSEntriesList.get(0).getName().toString() + |
| | | testFSEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + |
| | | ServerConstants.EOL + cache.toVerboseString()); |
| | | } |
| | |
| | | assertNotNull(softRefCache.getEntry( |
| | | testSoftRefEntriesList.get(0).getName()), |
| | | "Expected to find " + |
| | | testSoftRefEntriesList.get(0).getName().toString() + |
| | | testSoftRefEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + |
| | | ServerConstants.EOL + cache.toVerboseString()); |
| | | assertNotNull(fifoCache.getEntry( |
| | | testFIFOEntriesList.get(0).getName()), |
| | | "Expected to find " + |
| | | testFIFOEntriesList.get(0).getName().toString() + |
| | | testFIFOEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + |
| | | ServerConstants.EOL + cache.toVerboseString()); |
| | | assertNotNull(fsCache.getEntry( |
| | | testFSEntriesList.get(0).getName()), |
| | | "Expected to find " + |
| | | testFSEntriesList.get(0).getName().toString() + |
| | | testFSEntriesList.get(0).getName() + |
| | | " in the cache. Cache contents:" + |
| | | ServerConstants.EOL + cache.toVerboseString()); |
| | | } |
| | |
| | | for(int i = 0; i < super.NUMTESTENTRIES; i++ ) { |
| | | assertFalse(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), "Not expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | for(int i = 0; i < (super.NUMTESTENTRIES - super.MAXENTRIES); i++ ) { |
| | | assertFalse(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), "Not expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | { |
| | | assertTrue(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), "Expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | for(int i = 0; i < (super.NUMTESTENTRIES - super.MAXENTRIES); i++ ) { |
| | | assertFalse(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), "Not expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | { |
| | | assertTrue(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), "Expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | assertTrue(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), |
| | | "Expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | assertTrue(super.cache.containsEntry( |
| | | super.testEntriesList.get(super.NUMTESTENTRIES - 1).getName()), |
| | | "Expected to find " + |
| | | super.testEntriesList.get(super.NUMTESTENTRIES - 1).getName().toString() + |
| | | super.testEntriesList.get(super.NUMTESTENTRIES - 1).getName() + |
| | | " in the cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | |
| | |
| | | assertFalse(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), |
| | | "Not expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | assertTrue(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), |
| | | "Expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | assertFalse(super.cache.containsEntry( |
| | | super.testEntriesList.get(i).getName()), |
| | | "Not expected to find " + |
| | | super.testEntriesList.get(i).getName().toString() + " in the " + |
| | | super.testEntriesList.get(i).getName() + " in the " + |
| | | "cache. Cache contents:" + ServerConstants.EOL + |
| | | cache.toVerboseString()); |
| | | } |
| | |
| | | for(int i = 0; i < NUMTESTENTRIES; i++ ) { |
| | | assertNotNull(DirectoryServer.getEntryCache().getEntry( |
| | | testEntriesList.get(i).getName()), "Expected to find " + |
| | | testEntriesList.get(i).getName().toString() + |
| | | testEntriesList.get(i).getName() + |
| | | " in the cache. Cache contents:" + |
| | | ServerConstants.EOL + toVerboseString()); |
| | | } |
| | |
| | | |
| | | addTask(taskInit, ResultCode.SUCCESS, null); |
| | | waitTaskState(taskInit, TaskState.STOPPED_BY_ERROR, 20000, |
| | | ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.get(baseDN.toString(), "20")); |
| | | ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.get(baseDN, "20")); |
| | | |
| | | // Test 2 |
| | | taskInit = TestCaseUtils.makeEntry( |
| | |
| | | |
| | | addTask(taskInit, ResultCode.SUCCESS, null); |
| | | waitTaskState(taskInit, TaskState.STOPPED_BY_ERROR, 20000, |
| | | ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.get(baseDN.toString(), "0")); |
| | | ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.get(baseDN, "0")); |
| | | |
| | | if (replDomain != null) |
| | | { |
| | |
| | | { |
| | | assertTrue(eattr.getName().equalsIgnoreCase(genAttrList.get(i).toAttribute().getName())); |
| | | assertTrue(eattr.toString().equalsIgnoreCase(genAttrList.get(i).toAttribute().toString()), |
| | | "Comparing: " + eattr.toString() + " and " + genAttrList.get(i).toAttribute().toString()); |
| | | "Comparing: " + eattr + " and " + genAttrList.get(i).toAttribute()); |
| | | i++; |
| | | } |
| | | } |
| | |
| | | { |
| | | assertTrue(attr.getName().equalsIgnoreCase(genAttrList.get(i).toAttribute().getName())); |
| | | assertTrue(attr.toString().equalsIgnoreCase(genAttrList.get(i).toAttribute().toString()), |
| | | "Comparing: " + attr.toString() + " and " + genAttrList.get(i).toAttribute().toString()); |
| | | "Comparing: " + attr + " and " + genAttrList.get(i).toAttribute()); |
| | | i++; |
| | | } |
| | | } |
| | |
| | | { |
| | | assertTrue(attr.getName().equalsIgnoreCase(genAttrList.get(i).toAttribute().getName())); |
| | | assertTrue(attr.toString().equalsIgnoreCase(genAttrList.get(i).toAttribute().toString()), |
| | | "Comparing: " + attr.toString() + " and " + genAttrList.get(i).toAttribute().toString()); |
| | | "Comparing: " + attr + " and " + genAttrList.get(i).toAttribute()); |
| | | i++; |
| | | } |
| | | } |
| | |
| | | { |
| | | assertTrue(attr.getName().equalsIgnoreCase(genAttrList.get(i).toAttribute().getName())); |
| | | assertTrue(attr.toString().equalsIgnoreCase(genAttrList.get(i).toAttribute().toString()), |
| | | "Comparing: " + attr.toString() + " and " + genAttrList.get(i).toAttribute().toString()); |
| | | "Comparing: " + attr + " and " + genAttrList.get(i).toAttribute()); |
| | | i++; |
| | | } |
| | | } |