columnIterator;
+ private Column currentColumn;
+
+ private MultiColumnPrinter(final Builder builder) {
+ this.stream = builder.stream;
+ this.columns = Collections.unmodifiableList(builder.columns);
+ this.format = builder.format;
+ this.columnSeparator = builder.columnSeparator;
+ this.titleAlignment = builder.titleAlignment;
+ this.lineLength = computeLineLength();
+ resetIterator();
+ computePrintableColumns();
+ }
+
+ /** Prints a dashed line. */
+ public void printDashedLine() {
+ startNewLineIfNeeded();
+ for (int i = 0; i < lineLength; i++) {
+ stream.print('-');
+ }
+ stream.println();
}
/**
- * Adds to the row of strings to be used as the title for the table. Also
- * allows for certain title strings to span multiple columns The span
- * parameter is an array of integers which indicate how many columns the
- * corresponding title string will occupy. For a row that is 4 columns
- * wide, it is possible to have some title strings in a row to 'span'
- * multiple columns:
- *
- *
- *
- * ------------------------------------
- * Name Contact
- * First Last Email Phone
- * ------------------------------------
- * Bob Jones bob@foo.com 123-4567
- * John Doe john@foo.com 456-7890
- *
- *
- * In the example above, the title row has a string 'Name' that spans 2
- * columns. The string 'Contact' also spans 2 columns. The above is done
- * by passing in to addTitle() an array that contains:
+ * Formats and prints the provided text data.
+ * Merge the provided text over the provided number of column.
+ *
+ * Separator columns between merged columns will not be printed.
*
- *
- * span[0] = 2; // spans 2 columns
- * span[1] = 0; // spans 0 columns, ignore
- * span[2] = 2; // spans 2 columns
- * span[3] = 0; // spans 0 columns, ignore
- *
- *
- * A span value of 1 is the default. The method addTitle(String[] row)
- * basically does:
- *
- *
- * int[] span = new int[row.length];
- * for (int i = 0; i < row.length; i++) {
- * span[i] = 1;
- * }
- * addTitle(row, span);
- *
- *
- * @param row
- * Array of strings to print in one row of title.
- * @param span
- * Array of integers that reflect the number of columns the
- * corresponding title string will occupy.
+ * @param data
+ * The section title to print.
+ * @param rowSpan
+ * Specifies the number of rows a cell should span.
*/
- public void addTitle(final String[] row, final int[] span) {
- // Need to create a new instance of it, otherwise the new values
- // will always overwrite the old values.
- titleTable.add(Arrays.copyOf(row, row.length));
- titleSpanTable.add(span);
+ public void printTitleSection(final String data, final int rowSpan) {
+ consumeSeparatorColumn();
+ int lengthToPad = 0;
+ int nbColumnMerged = 0;
+
+ while (columnIterator.hasNext() && nbColumnMerged < rowSpan) {
+ lengthToPad += currentColumn.width + columnSeparator.length();
+ if (!isSeparatorColumn(currentColumn)) {
+ nbColumnMerged++;
+ }
+ currentColumn = columnIterator.next();
+ }
+ stream.print(align(data, titleAlignment, lengthToPad));
+ consumeSeparatorColumn();
+ if (!columnIterator.hasNext()) {
+ nextLine();
+ }
+ }
+
+ /** Prints a line with all column title and separator. */
+ public void printTitleLine() {
+ startNewLineIfNeeded();
+ passFirstSeparatorColumn();
+ for (final Column column : this.printableColumns) {
+ printCell(column.title, Alignment.RIGHT);
+ }
}
/**
- * Clears title strings.
+ * Prints the provided {@link Double} value on the current column.
+ *
+ * If this {@link MultiColumnPrinter} is configured to apply formatting,
+ * the provided value will be truncated according to the decimal
+ * precision set in the corresponding {@link Column}.
+ *
+ * See {@link MultiColumnPrinter#column(String, String, int, int)} for more details.
+ *
+ * @param value
+ * The double value to print.
*/
- public void clearTitle() {
- titleTable.clear();
- titleSpanTable.clear();
+ public void printData(final Double value) {
+ passFirstSeparatorColumn();
+ printData(value.isNaN() ? "-"
+ : String.format(Locale.ENGLISH, "%." + currentColumn.doublePrecision + "f", value));
}
/**
- * Adds one row of text to output.
+ * Prints the provided text data on the current column.
*
- * @param row
- * Array of strings to print in one row.
+ * @param data
+ * The text data to print.
*/
- public void printRow(final String... row) {
- for (int i = 0; i < numCol; i++) {
- if (titleAlign == RIGHT) {
- final int spaceBefore = curLength[i] - row[i].length();
- printSpaces(spaceBefore);
- app.getOutputStream().print(row[i]);
- if (i < numCol - 1) {
- printSpaces(gap);
- }
- } else if (align == CENTER) {
- int space1, space2;
- space1 = (curLength[i] - row[i].length()) / 2;
- space2 = curLength[i] - row[i].length() - space1;
-
- printSpaces(space1);
- app.getOutputStream().print(row[i]);
- printSpaces(space2);
- if (i < numCol - 1) {
- printSpaces(gap);
- }
- } else {
- app.getOutputStream().print(row[i]);
- if (i < numCol - 1) {
- printSpaces(curLength[i] - row[i].length() + gap);
- }
- }
- }
- app.getOutputStream().println("");
+ public void printData(final String data) {
+ passFirstSeparatorColumn();
+ printCell(data, Alignment.RIGHT);
}
/**
- * Prints the table title.
+ * Returns the data {@link Column} list of this {@link MultiColumnPrinter}.
+ *
+ * Separator columns are filtered out.
+ *
+ * @return The {@link Column} list of this {@link MultiColumnPrinter}.
*/
- public void printTitle() {
- // Get the longest string for each column and store in curLength[]
-
- // Scan through title rows
- Iterator spanEnum = titleSpanTable.iterator();
- for (String[] row : titleTable) {
- final int[] curSpan = spanEnum.next();
-
- for (int i = 0; i < numCol; i++) {
- // None of the fields should be null, but if it
- // happens to be so, replace it with "-".
- if (row[i] == null) {
- row[i] = "-";
- }
-
- int len = row[i].length();
-
- /*
- * If a title string spans multiple columns, then the space it
- * occupies in each column is at most len/span (since we have
- * gap to take into account as well).
- */
- final int span = curSpan[i];
- int rem = 0;
- if (span > 1) {
- rem = len % span;
- len = len / span;
- }
-
- if (curLength[i] < len) {
- curLength[i] = len;
-
- if ((span > 1) && ((i + span) <= numCol)) {
- for (int j = i + 1; j < (i + span); ++j) {
- curLength[j] = len;
- }
-
- /*
- * Add remainder to last column in span to avoid
- * round-off errors.
- */
- curLength[(i + span) - 1] += rem;
- }
- }
- }
+ public List getColumns() {
+ return printableColumns;
+ }
+
+ private void printCell(final String data, final Alignment alignment) {
+ String toPrint = format ? align(data, alignment, currentColumn.width) : data;
+ if (columnIterator.hasNext()) {
+ toPrint += columnSeparator;
}
+ stream.print(toPrint);
+ nextLineOnEOLOrNextColumn();
+ }
- printBorder();
-
- spanEnum = titleSpanTable.iterator();
- for (String[] row : titleTable) {
- final int[] curSpan = spanEnum.next();
-
- for (int i = 0; i < numCol; i++) {
- int availableSpace = 0;
- final int span = curSpan[i];
-
- if (span == 0) {
- continue;
- }
-
- availableSpace = curLength[i];
-
- if ((span > 1) && ((i + span) <= numCol)) {
- for (int j = i + 1; j < (i + span); ++j) {
- availableSpace += gap;
- availableSpace += curLength[j];
- }
- }
-
- if (titleAlign == RIGHT) {
- final int spaceBefore = availableSpace - row[i].length();
- printSpaces(spaceBefore);
- app.getOutputStream().print(row[i]);
- if (i < numCol - 1) {
- printSpaces(gap);
- }
- } else if (titleAlign == CENTER) {
- int spaceBefore, spaceAfter;
- spaceBefore = (availableSpace - row[i].length()) / 2;
- spaceAfter = availableSpace - row[i].length() - spaceBefore;
-
- printSpaces(spaceBefore);
- app.getOutputStream().print(row[i]);
- printSpaces(spaceAfter);
- if (i < numCol - 1) {
- printSpaces(gap);
- }
- } else {
- app.getOutputStream().print(row[i]);
- if (i < numCol - 1) {
- printSpaces(availableSpace - row[i].length() + gap);
- }
- }
+ /** Provided the provided string data according to the provided width and the provided alignment. */
+ private String align(final String data, final Alignment alignment, final int width) {
+ final String rawData = data.trim();
+ final int padding = width - rawData.length();
- }
- app.getOutputStream().println("");
+ if (padding <= 0) {
+ return rawData;
+ }
+
+ switch (alignment) {
+ case RIGHT:
+ return pad(padding, rawData, 0);
+ case LEFT:
+ return pad(0, rawData, padding);
+ case CENTER:
+ final int paddingBefore = padding / 2;
+ return pad(paddingBefore, rawData, padding - paddingBefore);
+ default:
+ return "";
}
- printBorder();
}
- /**
- * Set alignment for title strings.
- *
- * @param titleAlign
- * The alignment which should be one of {@code LEFT},
- * {@code RIGHT}, or {@code CENTER}.
- */
- public void setTitleAlign(final int titleAlign) {
- this.titleAlign = titleAlign;
+ private String pad(final int leftPad, final String s, final int rightPad) {
+ return new StringBuilder().append(repeat(' ', leftPad))
+ .append(s)
+ .append(repeat(' ', rightPad))
+ .toString();
}
- private void printBorder() {
- if (border == null) {
- return;
+ private void passFirstSeparatorColumn() {
+ if (cursorOnLineStart()) {
+ consumeSeparatorColumn();
}
+ }
- // For the value in each column
- for (int i = 0; i < numCol; i++) {
- for (int j = 0; j < curLength[i]; j++) {
- app.getOutputStream().print(border);
- }
+ private void consumeSeparatorColumn() {
+ if (isSeparatorColumn(currentColumn)) {
+ stream.print('|' + columnSeparator);
+ nextLineOnEOLOrNextColumn();
+ }
+ }
+
+ private void startNewLineIfNeeded() {
+ if (!cursorOnLineStart()) {
+ nextLine();
}
+ }
+
+ private void nextLineOnEOLOrNextColumn() {
+ if (columnIterator.hasNext()) {
+ currentColumn = columnIterator.next();
+ consumeSeparatorColumn();
+ } else {
+ nextLine();
+ }
+ }
+
+ private void nextLine() {
+ stream.println();
+ resetIterator();
+ }
+
+ private void resetIterator() {
+ columnIterator = columns.iterator();
+ currentColumn = columnIterator.next();
+ }
+
+ private boolean cursorOnLineStart() {
+ return currentColumn == columns.get(0);
+ }
+
+ private boolean isSeparatorColumn(final Column column) {
+ return column.id.startsWith(SEPARATOR_ID);
+ }
+
+ private void computePrintableColumns() {
+ printableColumns = new ArrayList<>(columns);
+ final Iterator it = printableColumns.iterator();
- // For the gap between each column
- for (int i = 0; i < numCol - 1; i++) {
- for (int j = 0; j < gap; j++) {
- app.getOutputStream().print(border);
+ while (it.hasNext()) {
+ if (isSeparatorColumn(it.next())) {
+ it.remove();
}
}
- app.getOutputStream().println("");
}
- private void printSpaces(final int count) {
- for (int i = 0; i < count; ++i) {
- app.getOutputStream().print(" ");
+ private int computeLineLength() {
+ int lineLength = 0;
+ final int separatorLength = this.columnSeparator.length();
+ for (final Column column : this.columns) {
+ lineLength += column.width + separatorLength;
}
+ return lineLength - separatorLength;
}
}
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/PromptingTrustManager.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/PromptingTrustManager.java
index a7d4a7319..217e8496f 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/PromptingTrustManager.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/PromptingTrustManager.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008-2010 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
+ * Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
@@ -54,9 +44,7 @@
* like to trust a server certificate.
*/
public final class PromptingTrustManager implements X509TrustManager {
- /**
- * Enumeration description server certificate trust option.
- */
+ /** Enumeration description server certificate trust option. */
private static enum TrustOption {
UNTRUSTED(1, INFO_LDAP_CONN_PROMPT_SECURITY_TRUST_OPTION_NO.get()),
SESSION(2, INFO_LDAP_CONN_PROMPT_SECURITY_TRUST_OPTION_SESSION.get()),
@@ -64,7 +52,6 @@ private static enum TrustOption {
CERTIFICATE_DETAILS(4, INFO_LDAP_CONN_PROMPT_SECURITY_CERTIFICATE_DETAILS.get());
private Integer choice;
-
private LocalizableMessage msg;
/**
@@ -152,11 +139,8 @@ public PromptingTrustManager(final ConsoleApplication app, final String accepted
if (!onDiskTrustStorePath.exists()) {
onDiskTrustStore.load(null, null);
} else {
- final FileInputStream fos = new FileInputStream(onDiskTrustStorePath);
- try {
+ try (final FileInputStream fos = new FileInputStream(onDiskTrustStorePath)) {
onDiskTrustStore.load(fos, DEFAULT_PASSWORD);
- } finally {
- fos.close();
}
}
final TrustManagerFactory tmf =
@@ -212,7 +196,7 @@ public PromptingTrustManager(final ConsoleApplication app, final X509TrustManage
this(app, DEFAULT_PATH, sourceTrustManager);
}
- /** {@inheritDoc} */
+ @Override
public void checkClientTrusted(final X509Certificate[] x509Certificates, final String s)
throws CertificateException {
try {
@@ -234,7 +218,7 @@ public void checkClientTrusted(final X509Certificate[] x509Certificates, final S
}
}
- /** {@inheritDoc} */
+ @Override
public void checkServerTrusted(final X509Certificate[] x509Certificates, final String s)
throws CertificateException {
try {
@@ -256,7 +240,7 @@ public void checkServerTrusted(final X509Certificate[] x509Certificates, final S
}
}
- /** {@inheritDoc} */
+ @Override
public X509Certificate[] getAcceptedIssuers() {
if (nestedTrustManager != null) {
return nestedTrustManager.getAcceptedIssuers();
@@ -295,9 +279,9 @@ private void acceptCertificate(final X509Certificate[] chain, final boolean perm
if (!truststoreFile.exists()) {
createFile(truststoreFile);
}
- final FileOutputStream fos = new FileOutputStream(truststoreFile);
- onDiskTrustStore.store(fos, DEFAULT_PASSWORD);
- fos.close();
+ try (final FileOutputStream fos = new FileOutputStream(truststoreFile)) {
+ onDiskTrustStore.store(fos, DEFAULT_PASSWORD);
+ }
} catch (final Exception e) {
LOG.warn(LocalizableMessage.raw("Error saving store to disk: " + e));
}
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ReturnCode.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ReturnCode.java
index 5dc1a8d0d..b654eee1d 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ReturnCode.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ReturnCode.java
@@ -1,26 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2014-2015 ForgeRock AS.
+ * Copyright 2014-2015 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/StringArgument.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/StringArgument.java
index 7c5fb6d0c..0919be448 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/StringArgument.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/StringArgument.java
@@ -1,135 +1,60 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- * Portions copyright 2014 ForgeRock AS
+ * Copyright 2006-2008 Sun Microsystems, Inc.
+ * Portions copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
-import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.i18n.LocalizableMessageBuilder;
-/**
- * This class defines an argument type that will accept any string value.
- */
+/** This class defines an argument type that will accept any string value. */
public final class StringArgument extends Argument {
/**
- * Creates a new string argument with the provided information.
+ * Returns a builder which can be used for incrementally constructing a new
+ * {@link StringArgument}.
*
* @param name
- * The generic name that should be used to refer to this
- * argument.
- * @param shortIdentifier
- * The single-character identifier for this argument, or
- * null
if there is none.
- * @param longIdentifier
- * The long identifier for this argument, or null
if
- * there is none.
- * @param isRequired
- * Indicates whether this argument must be specified on the
- * command line.
- * @param isMultiValued
- * Indicates whether this argument may be specified more than
- * once to provide multiple values.
- * @param needsValue
- * Indicates whether this argument requires a value.
- * @param valuePlaceholder
- * The placeholder for the argument value that will be displayed
- * in usage information, or null
if this argument
- * does not require a value.
- * @param defaultValue
- * The default value that should be used for this argument if
- * none is provided in a properties file or on the command line.
- * This may be null
if there is no generic default.
- * @param propertyName
- * The name of the property in a property file that may be used
- * to override the default value but will be overridden by a
- * command-line argument.
- * @param description
- * LocalizableMessage for the description of this argument.
- * @throws ArgumentException
- * If there is a problem with any of the parameters used to
- * create this argument.
+ * The generic name that will be used to refer to this argument.
+ * @return A builder to continue building the {@link StringArgument}.
*/
- public StringArgument(final String name, final Character shortIdentifier,
- final String longIdentifier, final boolean isRequired, final boolean isMultiValued,
- final boolean needsValue, final LocalizableMessage valuePlaceholder,
- final String defaultValue, final String propertyName,
- final LocalizableMessage description) throws ArgumentException {
- super(name, shortIdentifier, longIdentifier, isRequired, isMultiValued, needsValue,
- valuePlaceholder, defaultValue, propertyName, description);
+ public static Builder builder(final String name) {
+ return new Builder(name);
}
- /**
- * Creates a new string argument with the provided information.
- *
- * @param name
- * The generic name that should be used to refer to this
- * argument.
- * @param shortIdentifier
- * The single-character identifier for this argument, or
- * null
if there is none.
- * @param longIdentifier
- * The long identifier for this argument, or null
if
- * there is none.
- * @param isRequired
- * Indicates whether this argument must be specified on the
- * command line.
- * @param needsValue
- * Indicates whether this argument requires a value.
- * @param valuePlaceholder
- * The placeholder for the argument value that will be displayed
- * in usage information, or null
if this argument
- * does not require a value.
- * @param description
- * LocalizableMessage for the description of this argument.
- * @throws ArgumentException
- * If there is a problem with any of the parameters used to
- * create this argument.
- */
- public StringArgument(final String name, final Character shortIdentifier,
- final String longIdentifier, final boolean isRequired, final boolean needsValue,
- final LocalizableMessage valuePlaceholder, final LocalizableMessage description)
- throws ArgumentException {
- super(name, shortIdentifier, longIdentifier, isRequired, false, needsValue,
- valuePlaceholder, null, null, description);
+ /** A fluent API for incrementally constructing {@link StringArgument}. */
+ public static final class Builder extends ArgumentBuilder {
+ private Builder(final String name) {
+ super(name);
+ }
+
+ @Override
+ Builder getThis() {
+ return this;
+ }
+
+ @Override
+ public StringArgument buildArgument() throws ArgumentException {
+ return new StringArgument(this);
+ }
+ }
+
+ private StringArgument(final Builder builder) throws ArgumentException {
+ super(builder);
}
- /**
- * Indicates whether the provided value is acceptable for use in this
- * argument.
- *
- * @param valueString
- * The value for which to make the determination.
- * @param invalidReason
- * A buffer into which the invalid reason may be written if the
- * value is not acceptable.
- * @return true
if the value is acceptable, or
- * false
if it is not.
- */
@Override
- public boolean valueIsAcceptable(final String valueString,
- final LocalizableMessageBuilder invalidReason) {
+ public boolean valueIsAcceptable(final String valueString, final LocalizableMessageBuilder invalidReason) {
// All values will be acceptable for this argument.
return true;
}
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommand.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommand.java
index c26ba9fa8..e6d3c82d3 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommand.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommand.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2006-2008 Sun Microsystems, Inc.
- * Portions Copyright 2014-2015 ForgeRock AS.
+ * Copyright 2006-2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
@@ -69,10 +59,7 @@ public class SubCommand implements DocDescriptionSupplement {
/** The minimum number of unnamed trailing arguments that may be provided. */
private int minTrailingArguments;
- /**
- * The display name that will be used for the trailing arguments in
- * the usage information.
- */
+ /** The display name that will be used for the trailing arguments in the usage information. */
private String trailingArgsDisplayName;
/**
@@ -166,12 +153,17 @@ public LocalizableMessage getDescription() {
*/
private LocalizableMessage docDescriptionSupplement;
- /** {@inheritDoc} */
+ @Override
public LocalizableMessage getDocDescriptionSupplement() {
return docDescriptionSupplement != null ? docDescriptionSupplement : LocalizableMessage.EMPTY;
}
- /** {@inheritDoc} */
+ /**
+ * Sets a supplement to the description intended for use in generated reference documentation.
+ *
+ * @param docDescriptionSupplement
+ * The supplement to the description for use in generated reference documentation.
+ */
public void setDocDescriptionSupplement(final LocalizableMessage docDescriptionSupplement) {
this.docDescriptionSupplement = docDescriptionSupplement;
}
@@ -208,20 +200,15 @@ public Argument getArgument(String longID) {
}
/**
- * Retrieves the subcommand argument with the specified name.
+ * Retrieves the subcommand argument with the specified long identifier.
*
- * @param name
- * The name of the argument to retrieve.
- * @return The subcommand argument with the specified name, or null
if there is no such argument.
+ * @param longIdentifier
+ * The long identifier of the argument to retrieve.
+ * @return The subcommand argument with the specified long identifier,
+ * or null
if there is no such argument.
*/
- public Argument getArgumentForName(String name) {
- for (Argument a : arguments) {
- if (a.getName().equals(name)) {
- return a;
- }
- }
-
- return null;
+ public Argument getArgumentForLongIdentifier(final String longIdentifier) {
+ return longIDMap.get(parser.longArgumentsCaseSensitive() ? longIdentifier : toLowerCase(longIdentifier));
}
/**
@@ -234,53 +221,40 @@ public Argument getArgumentForName(String name) {
* associated with this subcommand.
*/
public void addArgument(Argument argument) throws ArgumentException {
- String argumentName = argument.getName();
- for (Argument a : arguments) {
- if (argumentName.equals(a.getName())) {
- LocalizableMessage message = ERR_ARG_SUBCOMMAND_DUPLICATE_ARGUMENT_NAME.get(name, argumentName);
- throw new ArgumentException(message);
- }
+ final String argumentLongID = argument.getLongIdentifier();
+ if (getArgumentForLongIdentifier(argumentLongID) != null) {
+ throw new ArgumentException(ERR_ARG_SUBCOMMAND_DUPLICATE_ARGUMENT_NAME.get(name, argumentLongID));
}
- if (parser.hasGlobalArgument(argumentName)) {
- LocalizableMessage message = ERR_ARG_SUBCOMMAND_ARGUMENT_GLOBAL_CONFLICT.get(argumentName, name);
- throw new ArgumentException(message);
+ if (parser.hasGlobalArgument(argumentLongID)) {
+ throw new ArgumentException(ERR_ARG_SUBCOMMAND_ARGUMENT_GLOBAL_CONFLICT.get(argumentLongID, name));
}
Character shortID = argument.getShortIdentifier();
if (shortID != null) {
if (shortIDMap.containsKey(shortID)) {
- LocalizableMessage message = ERR_ARG_SUBCOMMAND_DUPLICATE_SHORT_ID.get(argumentName, name,
- String.valueOf(shortID), shortIDMap.get(shortID).getName());
- throw new ArgumentException(message);
+ throw new ArgumentException(ERR_ARG_SUBCOMMAND_DUPLICATE_SHORT_ID.get(
+ argumentLongID, name, String.valueOf(shortID), shortIDMap.get(shortID).getLongIdentifier()));
}
Argument arg = parser.getGlobalArgumentForShortID(shortID);
if (arg != null) {
- LocalizableMessage message = ERR_ARG_SUBCOMMAND_ARGUMENT_SHORT_ID_GLOBAL_CONFLICT.get(argumentName,
- name, String.valueOf(shortID), arg.getName());
- throw new ArgumentException(message);
+ throw new ArgumentException(ERR_ARG_SUBCOMMAND_ARGUMENT_SHORT_ID_GLOBAL_CONFLICT.get(
+ argumentLongID, name, String.valueOf(shortID), arg.getLongIdentifier()));
}
}
String longID = argument.getLongIdentifier();
- if (longID != null) {
- if (!parser.longArgumentsCaseSensitive()) {
- longID = toLowerCase(longID);
- }
-
+ if (!parser.longArgumentsCaseSensitive()) {
+ longID = toLowerCase(longID);
if (longIDMap.containsKey(longID)) {
- LocalizableMessage message = ERR_ARG_SUBCOMMAND_DUPLICATE_LONG_ID.get(argumentName, name,
- argument.getLongIdentifier(), longIDMap.get(longID).getName());
- throw new ArgumentException(message);
+ throw new ArgumentException(ERR_ARG_SUBCOMMAND_DUPLICATE_LONG_ID.get(argumentLongID, name));
}
+ }
- Argument arg = parser.getGlobalArgumentForLongID(longID);
- if (arg != null) {
- LocalizableMessage message = ERR_ARG_SUBCOMMAND_ARGUMENT_LONG_ID_GLOBAL_CONFLICT.get(argumentName,
- name, argument.getLongIdentifier(), arg.getName());
- throw new ArgumentException(message);
- }
+ Argument arg = parser.getGlobalArgumentForLongID(longID);
+ if (arg != null) {
+ throw new ArgumentException(ERR_ARG_SUBCOMMAND_ARGUMENT_LONG_ID_GLOBAL_CONFLICT.get(argumentLongID, name));
}
arguments.add(argument);
@@ -365,7 +339,6 @@ public void setHidden(boolean isHidden) {
this.isHidden = isHidden;
}
- /** {@inheritDoc} */
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java
index 56788b033..f2a5440e1 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2006-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011-2015 ForgeRock AS.
+ * Copyright 2006-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2011-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
@@ -99,15 +89,6 @@ public SubCommandArgumentParser(String mainClassName, LocalizableMessage toolDes
super(mainClassName, toolDescription, longArgumentsCaseSensitive);
}
- /**
- * Retrieves the list of all global arguments that have been defined for this argument parser.
- *
- * @return The list of all global arguments that have been defined for this argument parser.
- */
- public List getGlobalArgumentList() {
- return globalArgumentList;
- }
-
/**
* Indicates whether this argument parser contains a global argument with the specified name.
*
@@ -119,38 +100,6 @@ public boolean hasGlobalArgument(String argumentName) {
return globalArgumentMap.containsKey(argumentName);
}
- /**
- * Retrieves the global argument with the specified name.
- *
- * @param name
- * The name of the global argument to retrieve.
- * @return The global argument with the specified name, or null
if there is no such argument.
- */
- public Argument getGlobalArgument(String name) {
- return globalArgumentMap.get(name);
- }
-
- /**
- * Retrieves the set of global arguments mapped by the short identifier that may be used to reference them. Note
- * that arguments that do not have a short identifier will not be present in this list.
- *
- * @return The set of global arguments mapped by the short identifier that may be used to reference them.
- */
- public Map getGlobalArgumentsByShortID() {
- return globalShortIDMap;
- }
-
- /**
- * Indicates whether this argument parser has a global argument with the specified short ID.
- *
- * @param shortID
- * The short ID character for which to make the determination.
- * @return true
if a global argument exists with the specified short ID, or false
if not.
- */
- public boolean hasGlobalArgumentWithShortID(Character shortID) {
- return globalShortIDMap.containsKey(shortID);
- }
-
/**
* Retrieves the global argument with the specified short identifier.
*
@@ -163,27 +112,6 @@ public Argument getGlobalArgumentForShortID(Character shortID) {
return globalShortIDMap.get(shortID);
}
- /**
- * Retrieves the set of global arguments mapped by the long identifier that may be used to reference them. Note that
- * arguments that do not have a long identifier will not be present in this list.
- *
- * @return The set of global arguments mapped by the long identifier that may be used to reference them.
- */
- public Map getGlobalArgumentsByLongID() {
- return globalLongIDMap;
- }
-
- /**
- * Indicates whether this argument parser has a global argument with the specified long ID.
- *
- * @param longID
- * The long ID string for which to make the determination.
- * @return true
if a global argument exists with the specified long ID, or false
if not.
- */
- public boolean hasGlobalArgumentWithLongID(String longID) {
- return globalLongIDMap.containsKey(longID);
- }
-
/**
* Retrieves the global argument with the specified long identifier.
*
@@ -196,15 +124,6 @@ public Argument getGlobalArgumentForLongID(String longID) {
return globalLongIDMap.get(longID);
}
- /**
- * Retrieves the set of subcommands defined for this argument parser, referenced by subcommand name.
- *
- * @return The set of subcommands defined for this argument parser, referenced by subcommand name.
- */
- public SortedMap getSubCommands() {
- return subCommands;
- }
-
/**
* Indicates whether this argument parser has a subcommand with the specified name.
*
@@ -278,58 +197,44 @@ public void addLdapConnectionArgument(final Argument argument) throws ArgumentEx
* defined.
*/
public void addGlobalArgument(Argument argument, ArgumentGroup group) throws ArgumentException {
- String argumentName = argument.getName();
- if (globalArgumentMap.containsKey(argumentName)) {
- throw new ArgumentException(ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_NAME.get(argumentName));
+ String longID = argument.getLongIdentifier();
+ if (globalArgumentMap.containsKey(longID)) {
+ throw new ArgumentException(ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_NAME.get(longID));
}
for (SubCommand s : subCommands.values()) {
- if (s.getArgumentForName(argumentName) != null) {
+ if (s.getArgumentForLongIdentifier(longID) != null) {
throw new ArgumentException(ERR_SUBCMDPARSER_GLOBAL_ARG_NAME_SUBCMD_CONFLICT.get(
- argumentName, s.getName()));
+ longID, s.getName()));
}
}
Character shortID = argument.getShortIdentifier();
if (shortID != null) {
if (globalShortIDMap.containsKey(shortID)) {
- String name = globalShortIDMap.get(shortID).getName();
-
+ String conflictingLongID = globalShortIDMap.get(shortID).getLongIdentifier();
throw new ArgumentException(ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_SHORT_ID.get(
- shortID, argumentName, name));
+ shortID, longID, conflictingLongID));
}
for (SubCommand s : subCommands.values()) {
if (s.getArgument(shortID) != null) {
- String cmdName = s.getName();
- String name = s.getArgument(shortID).getName();
-
+ String conflictingLongID = s.getArgument(shortID).getLongIdentifier();
throw new ArgumentException(ERR_SUBCMDPARSER_GLOBAL_ARG_SHORT_ID_CONFLICT.get(
- shortID, argumentName, name, cmdName));
+ shortID, longID, conflictingLongID, s.getName()));
}
}
}
- String longID = argument.getLongIdentifier();
- if (longID != null) {
- if (!longArgumentsCaseSensitive()) {
- longID = toLowerCase(longID);
- }
-
+ if (!longArgumentsCaseSensitive()) {
+ longID = toLowerCase(longID);
if (globalLongIDMap.containsKey(longID)) {
- String name = globalLongIDMap.get(longID).getName();
-
- throw new ArgumentException(ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_LONG_ID.get(
- argument.getLongIdentifier(), argumentName, name));
+ throw new ArgumentException(ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_LONG_ID.get(longID));
}
+ }
- for (SubCommand s : subCommands.values()) {
- if (s.getArgument(longID) != null) {
- String cmdName = s.getName();
- String name = s.getArgument(longID).getName();
-
- throw new ArgumentException(ERR_SUBCMDPARSER_GLOBAL_ARG_LONG_ID_CONFLICT.get(
- argument.getLongIdentifier(), argumentName, name, cmdName));
- }
+ for (SubCommand s : subCommands.values()) {
+ if (s.getArgument(longID) != null) {
+ throw new ArgumentException(ERR_SUBCMDPARSER_GLOBAL_ARG_LONG_ID_CONFLICT.get(longID, s.getName()));
}
}
@@ -350,33 +255,6 @@ public void addGlobalArgument(Argument argument, ArgumentGroup group) throws Arg
argumentGroups.add(group);
}
- /**
- * Removes the provided argument from the set of global arguments handled by this parser.
- *
- * @param argument
- * The argument to be removed.
- */
- protected void removeGlobalArgument(Argument argument) {
- String argumentName = argument.getName();
- globalArgumentMap.remove(argumentName);
-
- Character shortID = argument.getShortIdentifier();
- if (shortID != null) {
- globalShortIDMap.remove(shortID);
- }
-
- String longID = argument.getLongIdentifier();
- if (longID != null) {
- if (!longArgumentsCaseSensitive()) {
- longID = toLowerCase(longID);
- }
-
- globalLongIDMap.remove(longID);
- }
-
- globalArgumentList.remove(argument);
- }
-
/**
* Sets the provided argument as one which will automatically trigger the output of full usage information if it is
* provided on the command line and no further argument validation will be performed.
@@ -445,7 +323,6 @@ public void setUsageHandler(SubCommandUsageHandler subCommandUsageHandler) {
*/
@Override
public void parseArguments(String[] rawArguments, Properties argumentProperties) throws ArgumentException {
- setRawArguments(rawArguments);
this.subCommand = null;
final ArrayList trailingArguments = getTrailingArguments();
trailingArguments.clear();
@@ -1242,11 +1119,6 @@ private void setSubCommandOptionsInfo(Map map, SubCommand subCom
if (a.isHidden()) {
continue;
}
- // Return a generic FQDN for localhost as the default hostname
- // in reference documentation.
- if (isHostNameArgument(a)) {
- a.setDefaultValue("localhost.localdomain");
- }
Map option = new HashMap<>();
String optionSynopsis = getOptionSynopsis(a);
@@ -1261,7 +1133,8 @@ private void setSubCommandOptionsInfo(Map map, SubCommand subCom
// Let this build its own arbitrarily formatted additional info.
info.put("usage", subCommandUsageHandler.getArgumentAdditionalInfo(subCommand, a, nameOption));
} else {
- String defaultValue = a.getDefaultValue();
+ // Return a generic FQDN for localhost as the default hostname in reference documentation.
+ final String defaultValue = isHostNameArgument(a) ? "localhost.localdomain" : a.getDefaultValue();
info.put("default", defaultValue != null ? REF_DEFAULT.get(defaultValue) : null);
// If there is a supplement to the description for this argument,
@@ -1338,4 +1211,9 @@ private void appendSubCommandReference(StringBuilder builder,
map.put("subcommands", commands);
applyTemplate(builder, "dscfgReference.ftl", map);
}
+
+ @Override
+ public void replaceArgument(final Argument argument) {
+ replaceArgumentInCollections(globalLongIDMap, globalShortIDMap, globalArgumentList, argument);
+ }
}
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandUsageHandler.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandUsageHandler.java
index 8a7bf893d..ff34872a6 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandUsageHandler.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandUsageHandler.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TabSeparatedTablePrinter.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TabSeparatedTablePrinter.java
index 68b2275b0..ed425320b 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TabSeparatedTablePrinter.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TabSeparatedTablePrinter.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
@@ -39,10 +29,7 @@
* a single space.
*/
public final class TabSeparatedTablePrinter extends TablePrinter {
-
- /**
- * Table serializer implementation.
- */
+ /** Table serializer implementation. */
private final class Serializer extends TableSerializer {
/**
* Counts the number of separators that should be output the next time a non-empty cell is displayed. The tab
@@ -55,7 +42,6 @@ private Serializer() {
// No implementation required.
}
- /** {@inheritDoc} */
@Override
public void addCell(String s) {
// Avoid printing tab separators for trailing empty cells.
@@ -72,7 +58,6 @@ public void addCell(String s) {
writer.print(s.replaceAll("[\\t\\n\\r]", " "));
}
- /** {@inheritDoc} */
@Override
public void addHeading(String s) {
if (displayHeadings) {
@@ -80,7 +65,6 @@ public void addHeading(String s) {
}
}
- /** {@inheritDoc} */
@Override
public void endHeader() {
if (displayHeadings) {
@@ -88,25 +72,21 @@ public void endHeader() {
}
}
- /** {@inheritDoc} */
@Override
public void endRow() {
writer.println();
}
- /** {@inheritDoc} */
@Override
public void endTable() {
writer.flush();
}
- /** {@inheritDoc} */
@Override
public void startHeader() {
requiredSeparators = 0;
}
- /** {@inheritDoc} */
@Override
public void startRow() {
requiredSeparators = 0;
@@ -150,10 +130,8 @@ public void setDisplayHeadings(boolean displayHeadings) {
this.displayHeadings = displayHeadings;
}
- /** {@inheritDoc} */
@Override
protected TableSerializer getSerializer() {
return new Serializer();
}
-
}
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TableBuilder.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TableBuilder.java
index 11b1a333a..984b49ef8 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TableBuilder.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TableBuilder.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2014-2015 ForgeRock AS
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
@@ -266,7 +256,7 @@ public void print(TablePrinter printer) {
List> sortedRows = new ArrayList<>(rows);
Comparator> comparator = new Comparator>() {
-
+ @Override
public int compare(List row1, List row2) {
for (int i = 0; i < sortKeys.size(); i++) {
String cell1 = row1.get(sortKeys.get(i));
@@ -281,7 +271,6 @@ public int compare(List row1, List row2) {
// Both rows are equal.
return 0;
}
-
};
Collections.sort(sortedRows, comparator);
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TablePrinter.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TablePrinter.java
index b54cd4cca..13fef0e73 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TablePrinter.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TablePrinter.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TableSerializer.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TableSerializer.java
index 384672595..430233d01 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TableSerializer.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TableSerializer.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TextTablePrinter.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TextTablePrinter.java
index 78b3833f4..f7fce40cb 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/TextTablePrinter.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/TextTablePrinter.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2007-2008 Sun Microsystems, Inc.
- * Portions Copyright 2014-2015 ForgeRock AS
+ * Copyright 2007-2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
@@ -42,12 +32,8 @@
* Tables have configurable column widths, padding, and column separators.
*/
public final class TextTablePrinter extends TablePrinter {
-
- /**
- * Table serializer implementation.
- */
+ /** Table serializer implementation. */
private final class Serializer extends TableSerializer {
-
/**The real column widths taking into account size constraints but
not including padding or separators.*/
private final List columnWidths = new ArrayList<>();
@@ -71,20 +57,17 @@ private Serializer() {
this.indentPadding = builder.toString();
}
- /** {@inheritDoc} */
@Override
public void addCell(String s) {
currentRow.add(s);
}
- /** {@inheritDoc} */
@Override
public void addColumn(int width) {
columnWidths.add(width);
totalColumns++;
}
- /** {@inheritDoc} */
@Override
public void addHeading(String s) {
if (displayHeadings) {
@@ -92,7 +75,6 @@ public void addHeading(String s) {
}
}
- /** {@inheritDoc} */
@Override
public void endHeader() {
if (displayHeadings) {
@@ -133,7 +115,6 @@ public void endHeader() {
}
}
- /** {@inheritDoc} */
@Override
public void endRow() {
boolean isRemainingText;
@@ -158,7 +139,6 @@ public void endRow() {
endIndex = width;
head = contents.substring(0, endIndex);
tail = contents.substring(endIndex);
-
} else {
head = contents.substring(0, endIndex);
tail = contents.substring(endIndex + 1);
@@ -204,24 +184,20 @@ public void endRow() {
// Output the line.
writer.println(builder.toString());
-
} while (isRemainingText);
}
- /** {@inheritDoc} */
@Override
public void endTable() {
writer.flush();
}
- /** {@inheritDoc} */
@Override
public void startHeader() {
determineColumnWidths();
currentRow.clear();
}
- /** {@inheritDoc} */
@Override
public void startRow() {
currentRow.clear();
@@ -312,10 +288,7 @@ private void determineColumnWidths() {
/** The number of characters the table should be indented. */
private int indentWidth;
- /**
- * The character which should be used to separate the table
- * heading row from the rows beneath.
- */
+ /** The character which should be used to separate the table heading row from the rows beneath. */
private char headingSeparator = DEFAULT_HEADING_SEPARATOR;
/** The column where the heading separator should begin. */
@@ -327,10 +300,7 @@ private void determineColumnWidths() {
*/
private int padding = DEFAULT_PADDING;
- /**
- * Total permitted width for the table which expandable columns
- * can use up.
- */
+ /** Total permitted width for the table which expandable columns can use up. */
private int totalWidth = MAX_LINE_WIDTH;
/** The output destination. */
@@ -472,7 +442,6 @@ public void setTotalWidth(int totalWidth) {
this.totalWidth = totalWidth;
}
- /** {@inheritDoc} */
@Override
protected TableSerializer getSerializer() {
return new Serializer();
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ToolRefDocContainer.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ToolRefDocContainer.java
index 08676d850..8a6f35d6f 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ToolRefDocContainer.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ToolRefDocContainer.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ToolVersionHandler.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ToolVersionHandler.java
new file mode 100644
index 000000000..cbb713e14
--- /dev/null
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ToolVersionHandler.java
@@ -0,0 +1,83 @@
+/*
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
+ *
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
+ *
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
+ *
+ * Copyright 2015-2016 ForgeRock AS.
+ */
+package com.forgerock.opendj.cli;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+/** Class that prints the version of the SDK to System.out. */
+public final class ToolVersionHandler implements VersionHandler {
+
+ /**
+ * Returns a {@link VersionHandler} which should be used by OpenDJ SDK tools.
+ *
+ * The printed version and SCM revision will be the one of the opendj-core module.
+ * @return A {@link VersionHandler} which should be used by OpenDJ SDK tools.
+ */
+ public static VersionHandler newSdkVersionHandler() {
+ return newToolVersionHandler("opendj-core");
+ }
+
+ /**
+ * Returns a {@link VersionHandler} which should be used to print version and SCM revision of a module.
+ *
+ * The printed version and SCM revision will be read from the module MANIFEST.MF‌ file.
+ * @param moduleName
+ * Name of the module which uniquely identify the URL of the MANIFEST‌.MF file.
+ * @return A {@link VersionHandler} which should be used by OpenDJ SDK tools.
+ */
+ public static VersionHandler newToolVersionHandler(final String moduleName) {
+ return new ToolVersionHandler(moduleName);
+ }
+
+ private final String moduleName;
+
+ private ToolVersionHandler(final String moduleName) {
+ this.moduleName = moduleName;
+ }
+
+ @Override
+ public void printVersion() {
+ System.out.println(getVersion());
+ }
+
+ @Override
+ public String toString() {
+ return getClass().getSimpleName() + "(" + getVersion() + ")";
+ }
+
+ private String getVersion() {
+ try {
+ final Enumeration manifests = getClass().getClassLoader().getResources("META-INF/MANIFEST.MF");
+ while (manifests.hasMoreElements()) {
+ final URL manifestUrl = manifests.nextElement();
+ if (manifestUrl.toString().contains(moduleName)) {
+ try (InputStream manifestStream = manifestUrl.openStream()) {
+ final Attributes attrs = new Manifest(manifestStream).getMainAttributes();
+ return attrs.getValue("Bundle-Version") + " (revision " + attrs.getValue("SCM-Revision") + ")";
+ }
+ }
+ }
+ return null;
+ } catch (IOException e) {
+ throw new RuntimeException("IOException while determining opendj tool version", e);
+ }
+ }
+}
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/Utils.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/Utils.java
index 28cafe9dc..0bff591bd 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/Utils.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/Utils.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2006-2010 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS.
+ * Copyright 2006-2010 Sun Microsystems, Inc.
+ * Portions copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
@@ -40,6 +30,8 @@
import java.net.UnknownHostException;
import java.security.GeneralSecurityException;
import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Collection;
import java.util.Date;
import java.util.StringTokenizer;
import java.util.TimeZone;
@@ -161,13 +153,10 @@ public static int filterExitCode(final int exitCode) {
* If a problem occurs while trying to read the specified file.
*/
public static byte[] readBytesFromFile(final String filePath) throws IOException {
- byte[] val = null;
- FileInputStream fis = null;
- try {
- final File file = new File(filePath);
- fis = new FileInputStream(file);
- final long length = file.length();
- val = new byte[(int) length];
+ final File file = new File(filePath);
+ final long length = file.length();
+ try (FileInputStream fis = new FileInputStream(file)) {
+ byte[] val = new byte[(int) length];
// Read in the bytes
int offset = 0;
int numRead = 0;
@@ -182,10 +171,6 @@ public static byte[] readBytesFromFile(final String filePath) throws IOException
}
return val;
- } finally {
- if (fis != null) {
- fis.close();
- }
}
}
@@ -626,4 +611,130 @@ public static void printWrappedText(final PrintStream stream, final String messa
public static void printWrappedText(final PrintStream stream, final LocalizableMessage message) {
printWrappedText(stream, message != null ? message.toString() : null);
}
+
+ /**
+ * Repeats the given {@link char} n times.
+ *
+ * @param charToRepeat
+ * The {@link char} to repeat.
+ * @param length
+ * The repetition count.
+ * @return The given {@link char} n times.
+ */
+ public static String repeat(final char charToRepeat, final int length) {
+ final char[] str = new char[length];
+ Arrays.fill(str, charToRepeat);
+ return new String(str);
+ }
+
+ /**
+ * Return a {@link ValidationCallback} which can be used to validate a port number.
+ *
+ * @param defaultPort
+ * The default value to suggest to the user.
+ * @return a {@link ValidationCallback} which can be used to validate a port number.
+ */
+ public static ValidationCallback portValidationCallback(final int defaultPort) {
+ return new ValidationCallback() {
+ @Override
+ public Integer validate(ConsoleApplication app, String rawInput) throws ClientException {
+ final String input = rawInput.trim();
+ if (input.length() == 0) {
+ return defaultPort;
+ }
+
+ try {
+ int i = Integer.parseInt(input);
+ if (i < 1 || i > 65535) {
+ throw new NumberFormatException();
+ }
+ return i;
+ } catch (NumberFormatException e) {
+ // Try again...
+ app.println();
+ app.println(ERR_BAD_PORT_NUMBER.get(input));
+ app.println();
+ return null;
+ }
+ }
+ };
+ }
+
+ /**
+ * Throws an {@link ArgumentException} if both provided {@link Argument} are presents in the command line arguments.
+ *
+ * @param arg1
+ * The first {@link Argument} which should not be present if {@literal arg2} is.
+ * @param arg2
+ * The second {@link Argument} which should not be present if {@literal arg1} is.
+ * @throws ArgumentException
+ * If both provided {@link Argument} are presents in the command line arguments
+ */
+ public static void throwIfArgumentsConflict(final Argument arg1, final Argument arg2) throws ArgumentException {
+ if (argsConflicts(arg1, arg2)) {
+ throw new ArgumentException(conflictingArgsErrorMessage(arg1, arg2));
+ }
+ }
+
+ /**
+ * Adds a {@link LocalizableMessage} to the provided {@link Collection}
+ * if both provided {@link Argument} are presents in the command line arguments.
+ *
+ * @param errors
+ * The {@link Collection} to use to add the conflict error (if occurs).
+ * @param arg1
+ * The first {@link Argument} which should not be present if {@literal arg2} is.
+ * @param arg2
+ * The second {@link Argument} which should not be present if {@literal arg1} is.
+ */
+ public static void addErrorMessageIfArgumentsConflict(
+ final Collection errors, final Argument arg1, final Argument arg2) {
+ if (argsConflicts(arg1, arg2)) {
+ errors.add(conflictingArgsErrorMessage(arg1, arg2));
+ }
+ }
+
+ /**
+ * Return {@code true} if provided {@link Argument} are presents in the command line arguments.
+ *
+ * If so, adds a {@link LocalizableMessage} to the provided {@link LocalizableMessageBuilder}.
+ *
+ * @param builder
+ * The {@link LocalizableMessageBuilder} to use to write the conflict error (if occurs).
+ * @param arg1
+ * The first {@link Argument} which should not be present if {@literal arg2} is.
+ * @param arg2
+ * The second {@link Argument} which should not be present if {@literal arg1} is.
+ * @return {@code true} if provided {@link Argument} are presents in the command line arguments.
+ */
+ public static boolean appendErrorMessageIfArgumentsConflict(
+ final LocalizableMessageBuilder builder, final Argument arg1, final Argument arg2) {
+ if (argsConflicts(arg1, arg2)) {
+ if (builder.length() > 0) {
+ builder.append(LINE_SEPARATOR);
+ }
+ builder.append(conflictingArgsErrorMessage(arg1, arg2));
+ return true;
+ }
+ return false;
+ }
+
+ private static boolean argsConflicts(final Argument arg1, final Argument arg2) {
+ return arg1.isPresent() && arg2.isPresent();
+ }
+
+ /**
+ * Returns a {@link LocalizableMessage} which explains to the user
+ * that provided {@link Argument}s can not be used together on the command line.
+ *
+ * @param arg1
+ * The first {@link Argument} which conflicts with {@literal arg2}.
+ * @param arg2
+ * The second {@link Argument} which conflicts with {@literal arg1}.
+ * @return A {@link LocalizableMessage} which explains to the user that arguments
+ * can not be used together on the command line.
+ */
+ public static LocalizableMessage conflictingArgsErrorMessage(final Argument arg1, final Argument arg2) {
+ return ERR_TOOL_CONFLICTING_ARGS.get(arg1.getLongIdentifier(), arg2.getLongIdentifier());
+ }
}
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ValidationCallback.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ValidationCallback.java
index da888119a..6220950f6 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ValidationCallback.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ValidationCallback.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/VersionHandler.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/VersionHandler.java
index e31166c9a..6cc220fa8 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/VersionHandler.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/VersionHandler.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2014 ForgeRock AS
+ * Copyright 2014 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/package-info.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/package-info.java
index a6ff22aeb..c8e38fa2b 100644
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/package-info.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/package-info.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2014 ForgeRock AS.
+ * Copyright 2014 ForgeRock AS.
*/
/**
* Classes implementing the OpenDJ CLI shared APIs.
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli.properties
old mode 100755
new mode 100644
index 956028e9b..9b3c3527d
--- a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli.properties
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli.properties
@@ -1,34 +1,18 @@
#
-# CDDL HEADER START
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
#
-# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-# or http://forgerock.org/license/CDDLv1.0.html.
-# See the License for the specific language governing permissions
-# and limitations under the License.
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at legal-notices/CDDLv1_0.txt.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information:
-# Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2014-2015 ForgeRock AS.
-#
-#
-# CLI messages
-#
-ERR_ARG_NO_IDENTIFIER=The %s argument does not have either a \
- single-character or a long identifier that may be used to specify it. At \
- least one of these must be specified for each argument
+# Copyright 2014-2016 ForgeRock AS.
+
ERR_ARG_NO_VALUE_PLACEHOLDER=The %s argument is configured to take \
a value but no value placeholder has been defined for it
ERR_ARG_NO_INT_VALUE=The %s argument does not have any value that \
@@ -37,18 +21,6 @@ ERR_ARG_CANNOT_DECODE_AS_INT=The provided value "%s" for the %s \
argument cannot be decoded as an integer
ERR_ARG_INT_MULTIPLE_VALUES=The %s argument has multiple values and \
therefore cannot be decoded as a single integer value
-ERR_ARG_NO_DOUBLE_VALUE=The %s argument does not have any value that \
- may be retrieved as a double
-ERR_ARG_CANNOT_DECODE_AS_DOUBLE=The provided value "%s" for the %s \
- argument cannot be decoded as a double
-ERR_ARG_DOUBLE_MULTIPLE_VALUES=The %s argument has multiple values and \
- therefore cannot be decoded as a single double value
-ERR_ARG_NO_BOOLEAN_VALUE=The %s argument does not have any value \
- that may be retrieved as a Boolean
-ERR_ARG_CANNOT_DECODE_AS_BOOLEAN=The provided value "%s" for the %s \
- argument cannot be decoded as a Boolean
-ERR_ARG_BOOLEAN_MULTIPLE_VALUES=The %s argument has multiple values \
- and therefore cannot be decoded as a single Boolean value
ERR_INTARG_LOWER_BOUND_ABOVE_UPPER_BOUND=The %s argument \
configuration is invalid because the lower bound of %d is greater than the \
upper bound of %d
@@ -75,8 +47,7 @@ ERR_ARGPARSER_DUPLICATE_SHORT_ID=Cannot add argument %s to the \
argument list because its short identifier -%s conflicts with the %s argument \
that has already been defined
ERR_ARGPARSER_DUPLICATE_LONG_ID=Cannot add argument %s to the \
- argument list because its long identifier --%s conflicts with the %s argument \
- that has already been defined
+ argument list because there is already one defined with the same identifier
ERR_ARGPARSER_CANNOT_READ_PROPERTIES_FILE=An error occurred while \
attempting to read the contents of the argument properties file %s: %s
ERR_ARGPARSER_TOO_MANY_TRAILING_ARGS=The provided set of \
@@ -123,21 +94,8 @@ INFO_TIME_IN_HOURS_MINUTES_SECONDS=%d hours, %d minutes, %d seconds
INFO_TIME_IN_DAYS_HOURS_MINUTES_SECONDS=%d days, %d hours, %d minutes, %d \
seconds
INFO_SUBCMDPARSER_WHERE_OPTIONS_INCLUDE=Command options:
-ERR_MENU_BAD_CHOICE_SINGLE=Invalid response. Please enter a valid \
-menu option
-INFO_MENU_PROMPT_SINGLE=Enter choice:
INFO_MENU_PROMPT_RETURN_TO_CONTINUE=Press RETURN to continue
ERR_CONSOLE_INPUT_ERROR=The response could not be read from the console due to the following error: %s
-INFO_LDAP_CONN_PROMPT_SECURITY_SERVER_CERTIFICATE=Server Certificate:
-INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE=%s
-INFO_LDAP_CONN_PROMPT_SECURITY_TRUST_OPTION=Do you trust this server certificate?
-INFO_LDAP_CONN_PROMPT_SECURITY_TRUST_OPTION_NO=No
-INFO_LDAP_CONN_PROMPT_SECURITY_TRUST_OPTION_SESSION=Yes, for this session only
-INFO_LDAP_CONN_PROMPT_SECURITY_TRUST_OPTION_ALWAYS=Yes, also add it to a truststore
-INFO_LDAP_CONN_PROMPT_SECURITY_CERTIFICATE_DETAILS=View certificate details
-INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE_USER_DN=User DN : %s
-INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE_VALIDITY=Validity : From '%s'%n To '%s'
-INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE_ISSUER=Issuer : %s
INFO_PROMPT_SINGLE_DEFAULT=%s [%s]:
INFO_ARGPARSER_USAGE_JAVA_CLASSNAME=Usage: java %s {options}
INFO_ARGPARSER_USAGE_JAVA_SCRIPTNAME=Usage: %s {options}
@@ -160,19 +118,6 @@ INFO_SUBCMDPARSER_GLOBAL_HEADING=The global options are:
#
# Tools messages
#
-ERR_CANNOT_INITIALIZE_ARGS=An unexpected error occurred while \
- attempting to initialize the command-line arguments: %s
-ERR_ERROR_PARSING_ARGS=An error occurred while parsing the \
- command-line arguments: %s
-INFO_PROCESSING_OPERATION=Processing %s request for %s
-INFO_OPERATION_FAILED=%s operation failed
-INFO_OPERATION_SUCCESSFUL=%s operation successful for DN %s
-INFO_PROCESSING_COMPARE_OPERATION=Comparing type %s with value %s in \
- entry %s
-INFO_COMPARE_OPERATION_RESULT_FALSE=Compare operation returned false for \
- entry %s
-INFO_COMPARE_OPERATION_RESULT_TRUE=Compare operation returned true for \
- entry %s
INFO_DESCRIPTION_TRUSTALL=Trust all server SSL certificates
INFO_DESCRIPTION_BINDDN=DN to use to bind to the server
INFO_DESCRIPTION_BINDPASSWORD=Password to use to bind to \
@@ -184,7 +129,6 @@ INFO_DESCRIPTION_ENCODING=Use the specified character set for \
INFO_DESCRIPTION_VERBOSE=Use verbose mode
INFO_DESCRIPTION_KEYSTOREPATH=Certificate key store path
INFO_DESCRIPTION_TRUSTSTOREPATH=Certificate trust store path
-INFO_DESCRIPTION_KEYSTOREPASSWORD=Certificate key store PIN
INFO_DESCRIPTION_HOST=Directory server hostname or IP address
INFO_DESCRIPTION_PORT=Directory server port number
INFO_DESCRIPTION_SHOWUSAGE=Display this usage information
@@ -199,205 +143,25 @@ INFO_DESCRIPTION_PROXYAUTHZID=Use the proxied authorization \
control with the given authorization ID
INFO_DESCRIPTION_RESTART=Attempt to automatically restart the \
server once it has stopped
-INFO_DESCRIPTION_STOP_REASON=Reason the server is being stopped or \
- restarted
-INFO_CHECK_STOPPABILITY=Used to determine whether the server can \
- be stopped or not and the mode to be used to stop it
-INFO_DESCRIPTION_WINDOWS_NET_STOP=Used by the window service code \
- to inform that stop-ds is being called from the window services after a call \
- to net stop
-INFO_DESCRIPTION_STOP_TIME=Indicates the date/time at which the \
- shutdown operation will begin as a server task expressed in format \
- YYYYMMDDhhmmssZ for UTC time or YYYYMMDDhhmmss for local time. A value of \
- '0' will cause the shutdown to be scheduled for \
- immediate execution. When this option is specified the operation will be \
- scheduled to start at the specified time after which this utility will exit \
- immediately
-INFO_DESCRIPTION_BACKUP_ALL=Back up all backends in the server
-INFO_MODIFY_DESCRIPTION_DEFAULT_ADD=Treat records with no changetype as \
- add operations
-INFO_SEARCH_DESCRIPTION_BASEDN=Search base DN
-INFO_SEARCH_DESCRIPTION_SIZE_LIMIT=Maximum number of entries to return \
- from the search
-INFO_SEARCH_DESCRIPTION_TIME_LIMIT=Maximum length of time in seconds to \
- allow for the search
INFO_SEARCH_DESCRIPTION_SEARCH_SCOPE=Search scope ('base', 'one', 'sub', \
or 'subordinate')
-INFO_SEARCH_DESCRIPTION_DEREFERENCE_POLICY=Alias dereference policy \
- ('never', 'always', 'search', or 'find')
ERR_LDAPAUTH_UNSUPPORTED_SASL_MECHANISM=The requested SASL mechanism \
"%s" is not supported by this client
ERR_LDAPAUTH_SASL_AUTHID_REQUIRED=The "authid" SASL property is \
required for use with the %s mechanism
INFO_DESCRIPTION_VERSION=LDAP protocol version number
-ERR_DESCRIPTION_INVALID_VERSION=Invalid LDAP version number '%s'. \
- Allowed values are 2 and 3
-ERR_SEARCH_NO_FILTERS=No filters specified for the search request
-INFO_DESCRIPTION_DONT_WRAP=Do not wrap long lines
INFO_DESCRIPTION_NOOP=Show what would be done but do not perform any \
operation
-INFO_DESCRIPTION_TYPES_ONLY=Only retrieve attribute names but not their \
- values
-INFO_DESCRIPTION_ASSERTION_FILTER=Use the LDAP assertion control with the \
- provided filter
-ERR_LDAP_ASSERTION_INVALID_FILTER=The search filter provided for the \
- LDAP assertion control was invalid: %s
-INFO_DESCRIPTION_PREREAD_ATTRS=Use the LDAP ReadEntry pre-read control
-INFO_DESCRIPTION_POSTREAD_ATTRS=Use the LDAP ReadEntry post-read control
-INFO_LDAPMODIFY_PREREAD_ENTRY=Target entry before the operation:
-INFO_LDAPMODIFY_POSTREAD_ENTRY=Target entry after the operation:
-INFO_DESCRIPTION_PROXY_AUTHZID=Use the proxied authorization control with \
- the given authorization ID
-INFO_DESCRIPTION_PSEARCH_INFO=Use the persistent search control
-ERR_PSEARCH_MISSING_DESCRIPTOR=The request to use the persistent \
- search control did not include a descriptor that indicates the options to use \
- with that control
-ERR_PSEARCH_DOESNT_START_WITH_PS=The persistent search descriptor %s \
- did not start with the required 'ps' string
-ERR_PSEARCH_INVALID_CHANGE_TYPE=The provided change type value %s is \
- invalid. The recognized change types are add, delete, modify, modifydn, and \
- any
-ERR_PSEARCH_INVALID_CHANGESONLY=The provided changesOnly value %s is \
- invalid. Allowed values are 1 to only return matching entries that have \
- changed since the beginning of the search, or 0 to also include existing \
- entries that match the search criteria
-ERR_PSEARCH_INVALID_RETURN_ECS=The provided returnECs value %s is \
- invalid. Allowed values are 1 to request that the entry change notification \
- control be included in updated entries, or 0 to exclude the control from \
- matching entries
INFO_DESCRIPTION_REPORT_AUTHZID=Use the authorization identity control
-INFO_BIND_AUTHZID_RETURNED=# Bound with authorization ID %s
-INFO_SEARCH_DESCRIPTION_FILENAME=File containing a list of search filter \
- strings
-INFO_DESCRIPTION_MATCHED_VALUES_FILTER=Use the LDAP matched values \
- control with the provided filter
-ERR_LDAP_MATCHEDVALUES_INVALID_FILTER=The provided matched values \
- filter was invalid: %s
-ERR_LDIF_FILE_CANNOT_OPEN_FOR_READ=An error occurred while \
- attempting to open the LDIF file %s for reading: %s
-ERR_LDIF_FILE_CANNOT_OPEN_FOR_WRITE=An error occurred while \
- attempting to open the LDIF file %s for writing: %s
-ERR_LDIF_FILE_READ_ERROR=An error occurred while attempting to read \
- the contents of LDIF file %s: %s
-INFO_BIND_PASSWORD_EXPIRED=# Your password has expired
-INFO_BIND_PASSWORD_EXPIRING=# Your password will expire in %s
-INFO_BIND_ACCOUNT_LOCKED=# Your account has been locked
-INFO_BIND_MUST_CHANGE_PASSWORD=# You must change your password before any \
- other operations will be allowed
-INFO_BIND_GRACE_LOGINS_REMAINING=# You have %d grace logins remaining
INFO_DESCRIPTION_USE_PWP_CONTROL=Use the password policy request control
-INFO_LDAPPWMOD_DESCRIPTION_AUTHZID=Authorization ID for the \
- user entry whose password should be changed
-INFO_LDAPPWMOD_DESCRIPTION_NEWPW=New password to provide \
- for the target user
-INFO_LDAPPWMOD_DESCRIPTION_NEWPWFILE=Path to a file \
- containing the new password to provide for the target user
-INFO_LDAPPWMOD_DESCRIPTION_CURRENTPW=Current password for \
- the target user
-INFO_LDAPPWMOD_DESCRIPTION_CURRENTPWFILE=Path to a file \
- containing the current password for the target user
-ERR_LDAPPWMOD_CONFLICTING_ARGS=The %s and %s arguments may not be \
- provided together
-ERR_LDAPPWMOD_FAILED=The LDAP password modify operation failed: \
- %d (%s)
-ERR_LDAPPWMOD_FAILURE_ERROR_MESSAGE=Error Message: %s
-ERR_LDAPPWMOD_FAILURE_MATCHED_DN=Matched DN: %s
-INFO_LDAPPWMOD_SUCCESSFUL=The LDAP password modify operation was \
- successful
-INFO_LDAPPWMOD_ADDITIONAL_INFO=Additional Info: %s
-INFO_LDAPPWMOD_GENERATED_PASSWORD=Generated Password: %s
-INFO_COMPARE_CANNOT_BASE64_DECODE_ASSERTION_VALUE=The assertion value was \
- indicated to be base64-encoded, but an error occurred while trying to decode \
- the value
-INFO_COMPARE_CANNOT_READ_ASSERTION_VALUE_FROM_FILE=Unable to read the \
- assertion value from the specified file: %s
-ERR_LDAPCOMPARE_NO_DNS=No entry DNs provided for the compare \
- operation
-INFO_LDAPCOMPARE_TOOL_DESCRIPTION=This utility can be used to perform \
- LDAP compare operations in the Directory Server
-INFO_LDAPMODIFY_TOOL_DESCRIPTION=This utility can be used to perform LDAP \
- modify, add, delete, and modify DN operations in the Directory Server
-INFO_LDAPPWMOD_TOOL_DESCRIPTION=This utility can be used to perform LDAP \
- password modify operations in the Directory Server
-INFO_LDAPSEARCH_TOOL_DESCRIPTION=This utility can be used to perform LDAP \
- search operations in the Directory Server
ERR_TOOL_CONFLICTING_ARGS=You may not provide both the --%s and \
the --%s arguments
-ERR_LDAPCOMPARE_NO_ATTR=No attribute was specified to use as the \
- target for the comparison
-ERR_LDAPCOMPARE_INVALID_ATTR_STRING=Invalid attribute string '%s'. \
- The attribute string must be in one of the following forms: \
- 'attribute:value', 'attribute::base64value', or 'attribute:
ERR_CANNOT_READ_TRUSTSTORE=Cannot access trust store '%s'. Verify \
that the provided trust store exists and that you have read access rights to it
ERR_CANNOT_READ_KEYSTORE=Cannot access key store '%s'. Verify \
that the provided key store exists and that you have read access rights to it
INFO_DESCRIPTION_ADMIN_PORT=Directory server administration port number
INFO_DESCRIPTION_ADMIN_BINDDN=Administrator user bind DN
-ERR_LDAPCOMPARE_ERROR_READING_FILE=An error occurred reading file \
- '%s'. Check that the file exists and that you have read access rights to \
- it. Details: %s
-ERR_LDAPCOMPARE_FILENAME_AND_DNS=Both entry DNs and a file name \
- were provided for the compare operation. These arguments are not compatible
INFO_ERROR_EMPTY_RESPONSE=ERROR: a response must be provided in order to continue
-ERR_DECODE_CONTROL_FAILURE=# %s
-INFO_SEARCHRATE_TOOL_DESCRIPTION=This utility can be used to measure \
- search throughput and response time of a directory service using \
- user-defined searches.\n\n\
- Example:\n\n\ \ searchrate -p 1389 -D "cn=directory manager" -w password \\\n\
- \ \ \ \ -F -c 4 -t 4 -b "dc=example,dc=com" -g "rand(0,2000)" "(uid=user.%%d)"
-INFO_SEARCHRATE_TOOL_DESCRIPTION_BASEDN=Base DN format string.
-INFO_MODRATE_TOOL_DESCRIPTION=This utility can be used to measure \
- modify throughput and response time of a directory service using \
- user-defined modifications.\n\n\
- Example:\n\n\ \ modrate -p 1389 -D "cn=directory manager" -w password \\\n\
- \ \ \ \ -F -c 4 -t 4 -b "uid=user.%%d,ou=people,dc=example,dc=com" \\\n\
- \ \ \ \ -g "rand(0,2000)" -g "randstr(16)" 'description:%%2$s'
-INFO_MODRATE_TOOL_DESCRIPTION_TARGETDN=Target entry DN format string
-INFO_AUTHRATE_TOOL_DESCRIPTION=This utility can be used to measure \
- bind throughput and response time of a directory service using \
- user-defined bind or search-then-bind operations.\n\nFormat strings may be \
- used in the bind DN option as well as the authid and authzid SASL bind \
- options. A search operation may be used to retrieve the bind DN by \
- specifying the base DN and a filter. The retrieved entry DN will be appended \
- as the last argument in the argument list when evaluating format strings.\n\n\
- Example (bind only):\n\n\ \ authrate -p 1389 -D "uid=user.%%d,ou=people,dc=example,dc=com" \\\n\
- \ \ \ \ -w password -f -c 10 -g "rand(0,2000)"\n\n\
- Example (search then bind):\n\n\ \ authrate -p 1389 -D '%%2$s' -w password -f -c 10 \\\n\
- \ \ \ \ -b "ou=people,dc=example,dc=com" -s one -g "rand(0,2000)" "(uid=user.%%d)"
-INFO_OUTPUT_LDIF_FILE_PLACEHOLDER={file}
-INFO_LDIFMODIFY_DESCRIPTION_OUTPUT_FILENAME=Write updated entries to %s \
- instead of stdout
-INFO_LDIFDIFF_DESCRIPTION_OUTPUT_FILENAME=Write differences to %s \
- instead of stdout
-INFO_LDIFSEARCH_DESCRIPTION_OUTPUT_FILENAME=Write search results to %s \
- instead of stdout
-ERR_LDIFMODIFY_MULTIPLE_USES_OF_STDIN=Unable to use stdin for both the source \
- LDIF and changes LDIF
-ERR_LDIFDIFF_MULTIPLE_USES_OF_STDIN=Unable to use stdin for both the source \
- LDIF and target LDIF
-ERR_LDIFMODIFY_PATCH_FAILED=The changes could not be applied for the following \
- reason: %s
-ERR_LDIFDIFF_DIFF_FAILED=The differences could not be computed for the following \
- reason: %s
-ERR_LDIFSEARCH_FAILED=The search could not be performed for the following \
- reason: %s
-INFO_LDIFMODIFY_TOOL_DESCRIPTION=This utility can be used to apply a set of \
- modify, add, and delete operations to entries contained in an LDIF file
-INFO_LDIFDIFF_TOOL_DESCRIPTION=This utility can be used to compare two LDIF \
- files and report the differences in LDIF format
-INFO_LDIFSEARCH_TOOL_DESCRIPTION=This utility can be used to perform search \
- operations against entries contained in an LDIF file
#
# MakeLDIF tool
#
-INFO_MAKELDIF_TOOL_DESCRIPTION=This utility can be used to generate LDIF \
- data based on a definition in a template file
-INFO_CONSTANT_PLACEHOLDER={name=value}
-INFO_SEED_PLACEHOLDER={seed}
-INFO_BATCH_FILE_PATH_PLACEHOLDER={batchFilePath}
-INFO_MAKELDIF_DESCRIPTION_CONSTANT=A constant that overrides the value \
- set in the template file
-INFO_MAKELDIF_DESCRIPTION_LDIF=The path to the LDIF file to be written
-INFO_MAKELDIF_DESCRIPTION_SEED=The seed to use to initialize the random \
- number generator
-INFO_MAKELDIF_DESCRIPTION_HELP=Show this usage information
-INFO_MAKELDIF_DESCRIPTION_RESOURCE_PATH=Path to look for \
- MakeLDIF resources (e.g., data files)
-ERR_MAKELDIF_NO_SUCH_RESOURCE_DIRECTORY=The specified resource \
- directory %s could not be found
-INFO_MAKELDIF_PROCESSED_N_ENTRIES=Processed %d entries
-INFO_MAKELDIF_PROCESSING_COMPLETE=LDIF processing complete. %d entries \
- written
-ERR_MAKELDIF_EXCEPTION_DURING_PARSE=An error occurred while \
- parsing template file : %s
-ERR_MAKELDIF_UNABLE_TO_CREATE_LDIF=An error occurred while \
- attempting to open LDIF file %s for writing: %s
-ERR_MAKELDIF_ERROR_WRITING_LDIF=An error occurred while writing data \
- to LDIF file %s: %s
-ERR_MAKELDIF_EXCEPTION_DURING_PROCESSING=An error occurred while \
- processing : %s
-ERR_CONSTANT_ARG_CANNOT_DECODE=Unable to parse a constant argument, \
- expecting name=value but got %s
INFO_DESCRIPTION_QUIET=Use quiet mode
INFO_DESCRIPTION_NO_PROMPT=Use non-interactive mode. If data in \
the command is missing, the user is not prompted and the tool will fail
@@ -568,8 +221,6 @@ INFO_OPTION_ACCEPT_LICENSE=Automatically accepts the product license \
#
# Setup messages
#
-INFO_SETUP_TITLE=OPENDJ3 Setup tool
-INFO_SETUP_DESCRIPTION=This utility can be used to setup the Directory Server
INFO_ARGUMENT_DESCRIPTION_CLI=Use the command line install. \
If not specified the graphical interface will be launched. The rest of the \
options (excluding help and version) will only be taken into account if this \
@@ -579,9 +230,6 @@ INFO_ARGUMENT_DESCRIPTION_BASEDN=Base DN for user \
using this option multiple times
INFO_ARGUMENT_DESCRIPTION_ADDBASE=Indicates whether to create the base \
entry in the Directory Server database
-INFO_ARGUMENT_DESCRIPTION_IMPORTLDIF=Path to an LDIF file \
- containing data that should be added to the Directory Server database. \
- Multiple LDIF files may be provided by using this option multiple times
INFO_LDIFFILE_PLACEHOLDER={ldifFile}
INFO_REJECT_FILE_PLACEHOLDER={rejectFile}
INFO_SKIP_FILE_PLACEHOLDER={skipFile}
@@ -589,7 +237,6 @@ INFO_JMXPORT_PLACEHOLDER={jmxPort}
INFO_ROOT_USER_DN_PLACEHOLDER={rootUserDN}
INFO_ROOT_USER_PWD_PLACEHOLDER={rootUserPassword}
INFO_ROOT_USER_PWD_FILE_PLACEHOLDER={rootUserPasswordFile}
-INFO_HOST_PLACEHOLDER={host}
INFO_TIMEOUT_PLACEHOLDER={timeout}
INFO_GENERAL_DESCRIPTION_REJECTED_FILE=Write rejected entries to the \
specified file
@@ -601,14 +248,10 @@ INFO_ARGUMENT_DESCRIPTION_LDAPPORT=Port on which the \
Directory Server should listen for LDAP communication
INFO_ARGUMENT_DESCRIPTION_ADMINCONNECTORPORT=Port on which the \
Administration Connector should listen for communication
-INFO_ARGUMENT_DESCRIPTION_JMXPORT=Port on which the \
- Directory Server should listen for JMX communication
INFO_ARGUMENT_DESCRIPTION_SKIPPORT=Skip the check to determine whether \
the specified ports are usable
INFO_ARGUMENT_DESCRIPTION_ROOTDN=DN for the initial root \
user for the Directory Server
-INFO_ARGUMENT_DESCRIPTION_ROOTPW=Password for the initial \
- root user for the Directory Server
INFO_ARGUMENT_DESCRIPTION_ROOTPWFILE=Path to a file \
containing the password for the initial root user for the Directory Server
INFO_ARGUMENT_DESCRIPTION_ENABLE_WINDOWS_SERVICE=Enable the server to run \
@@ -634,8 +277,6 @@ INFO_ARGUMENT_DESCRIPTION_USE_JCEKS=Path of a JCEKS containing a \
INFO_ARGUMENT_DESCRIPTION_USE_PKCS12=Path of a PKCS#12 key \
store containing the certificate that the server should use when accepting \
SSL-based connections or performing StartTLS negotiation
-INFO_ARGUMENT_CERT_OPTION_JCEKS=Use an existing certificate located on a \
- JCEKS key store
INFO_ARGUMENT_DESCRIPTION_CERT_NICKNAME=Nickname of the \
certificate that the server should use when accepting SSL-based \
connections or performing StartTLS negotiation
@@ -663,11 +304,11 @@ ERR_ARG_SUBCOMMAND_DUPLICATE_SHORT_ID=Argument %s for subcommand %s \
ERR_ARG_SUBCOMMAND_ARGUMENT_SHORT_ID_GLOBAL_CONFLICT=Argument %s \
for subcommand %s has a short ID -%s that conflicts with that of global \
argument %s
-ERR_ARG_SUBCOMMAND_DUPLICATE_LONG_ID=Argument %s for subcommand %s \
- has a long identifier --%s that conflicts with that of argument %s
-ERR_ARG_SUBCOMMAND_ARGUMENT_LONG_ID_GLOBAL_CONFLICT=Argument %s for \
- subcommand %s has a long ID --%s that conflicts with that of global argument \
- %s
+ERR_ARG_SUBCOMMAND_DUPLICATE_LONG_ID=Failed to add Argument %s for subcommand %s \
+ because there is already an argument with the same identifier for this subcommand
+ERR_ARG_SUBCOMMAND_ARGUMENT_LONG_ID_GLOBAL_CONFLICT=Failed to add Argument %s for \
+ subcommand %s because there is already a global argument defined with the \
+ same long identifier
ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_NAME=There is already another \
global argument named "%s"
ERR_SUBCMDPARSER_GLOBAL_ARG_NAME_SUBCMD_CONFLICT=The argument name \
@@ -678,13 +319,11 @@ ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_SHORT_ID=Short ID -%s for \
ERR_SUBCMDPARSER_GLOBAL_ARG_SHORT_ID_CONFLICT=Short ID -%s for \
global argument %s conflicts with the short ID for the %s argument associated \
with subcommand %s
-ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_LONG_ID=Long ID --%s for \
- global argument %s conflicts with the long ID of another global argument %s
-ERR_SUBCMDPARSER_GLOBAL_ARG_LONG_ID_CONFLICT=Long ID --%s for \
- global argument %s conflicts with the long ID for the %s argument associated \
- with subcommand %s
-ERR_SUBCMDPARSER_CANNOT_READ_PROPERTIES_FILE=An error occurred \
- while attempting to read the contents of the argument properties file %s: %s
+ERR_SUBCMDPARSER_DUPLICATE_GLOBAL_ARG_LONG_ID=Failed to add global argument \
+ %s because there is already one defined with the same long identifier
+ERR_SUBCMDPARSER_GLOBAL_ARG_LONG_ID_CONFLICT=Failed to add argument %s to \
+ subcommand %s because there is already one argument with the same long identifier \
+ associated to this subcommand.
ERR_SUBCMDPARSER_LONG_ARG_WITHOUT_NAME=The provided command-line \
argument %s does not contain an argument name
ERR_SUBCMDPARSER_NO_GLOBAL_ARGUMENT_FOR_LONG_ID=The provided \
@@ -718,46 +357,11 @@ ERR_SUBCMDPARSER_CANT_MIX_ARGS_WITH_VALUES=The provided argument \
the same block as at least one other argument that does not require a value
ERR_SUBCMDPARSER_INVALID_ARGUMENT=The provided argument "%s" is \
not recognized
-ERR_SUBCMDPARSER_NO_VALUE_FOR_REQUIRED_ARG=The argument %s is \
- required to have a value but none was provided in the argument list and no \
- default value is available
-ERR_ARGUMENT_NO_BASE_DN_SPECIFIED=You have specified \
- not to create a base DN. If no base DN is to be created you cannot specify \
- argument '%s'
-ERR_PORT_ALREADY_SPECIFIED=ERROR: You have specified \
- the value %s for different ports
-ERR_SEVERAL_CERTIFICATE_TYPE_SPECIFIED=You have \
- specified several certificate types to be used. Only one certificate type \
- is allowed
-ERR_CERTIFICATE_REQUIRED_FOR_SSL_OR_STARTTLS=You have \
- chosen to enable SSL or StartTLS. You must specify which type of certificate \
- you want the server to use
-ERR_TWO_CONFLICTING_ARGUMENTS=ERROR: You may not \
- provide both the %s and the %s arguments at the same time
-ERR_NO_KEYSTORE_PASSWORD=You must provide the PIN of the \
- keystore to retrieve the certificate to be used by the server. You can use \
- {%s} or {%s}
-ERR_SSL_OR_STARTTLS_REQUIRED=You have specified to use a \
- certificate as server certificate. You must enable SSL (using option {%s}) \
- or Start TLS (using option %s)
-ERR_NO_ROOT_PASSWORD=ERROR: No password was provided \
- for the initial root user. When performing a non-interactive installation, \
- this must be provided using either the %s or the %s argument
-INFO_BACKUPDB_DESCRIPTION_BACKEND_ID=Backend ID for the backend to \
- archive
-INFO_BACKUPDB_DESCRIPTION_BACKUP_ALL=Back up all backends in the server
-INFO_SETUP_SUBCOMMAND_CREATE_DIRECTORY_SERVER=Can be used with global arguments \
-to setup a directory server
-INFO_SETUP_SUBCOMMAND_CREATE_PROXY=Can be used with global arguments \
-to setup a proxy
ERR_INCOMPATIBLE_JAVA_VERSION=The minimum Java version required is %s.%n%n\
The detected version is %s.%nThe binary detected is %s%n%nPlease set \
OPENDJ_JAVA_HOME to the root of a compatible Java installation or edit the \
java.properties file and then run the dsjavaproperties script to specify the \
java version to be used.
-INFO_INSTANCE_DIRECTORY=Instance Directory: %s
-INFO_INSTALLATION_DIRECTORY=Installation Directory: %s
-ERR_INVALID_LOG_FILE=Invalid log file %s
INFO_DESCRIPTION_CONNECTION_TIMEOUT=Maximum length of time (in \
milliseconds) that can be taken to establish a connection. Use '0' to \
specify no time out
@@ -805,14 +409,6 @@ INFO_CANNOT_CONNECT_TO_REMOTE_GENERIC=Could not connect to %s. Check that the \
server is running and that the provided credentials are valid.%nError \
details:%n%s
ERR_CONFIRMATION_TRIES_LIMIT_REACHED=Confirmation tries limit reached (%d)
-INFO_ADMINISTRATOR_UID_PROMPT=Global Administrator User ID
-INFO_ADMINISTRATOR_PWD_PROMPT=Global Administrator Password:
-INFO_ADMINISTRATOR_PWD_CONFIRM_PROMPT=Confirm Password:
-ERR_ADMINISTRATOR_PWD_DO_NOT_MATCH=The provided passwords do not match.
-ERR_BAD_INTEGER=Invalid integer number "%s". Please enter a valid integer
-INFO_DESCRIPTION_BATCH=Reads from standard input a set of commands to be executed
-INFO_DESCRIPTION_BATCH_FILE_PATH=Path to a batch file containing \
-a set of commands to be executed
INFO_DESCRIPTION_DISPLAY_EQUIVALENT=Display the equivalent \
non-interactive argument in the standard output when this command is run in \
interactive mode
@@ -825,103 +421,16 @@ INFO_DESCRIPTION_CONFIG_CLASS=The fully-qualified name of the Java class \
will be used
INFO_DESCRIPTION_CONFIG_FILE=Path to the Directory Server \
configuration file
-INFO_DESCRIPTION_BACKUP_ID=Use the provided identifier for the \
- backup
-INFO_DESCRIPTION_BACKUP_DIR=Path to the target directory for the \
- backup file(s)
-INFO_DESCRIPTION_KEYMANAGER_PROVIDER_DN=DN of the \
- key manager provider to use for SSL and/or StartTLS
-INFO_DESCRIPTION_TRUSTMANAGER_PROVIDER_DN=DN of \
- the trust manager provider to use for SSL and/or StartTLS
-INFO_DESCRIPTION_KEYMANAGER_PATH=Path of the \
- key store to be used by the key manager provider
-INFO_CONFIGURE_WINDOWS_SERVICE_DESCRIPTION_DISABLE=Disables the server as \
- a Windows service and stops the server
-INFO_CONFIGURE_WINDOWS_SERVICE_DESCRIPTION_STATE=Provides information \
- about the state of the server as a Windows service
-INFO_CONFIGURE_WINDOWS_SERVICE_DESCRIPTION_CLEANUP=Allows to disable the \
- server service and to clean up the windows registry information associated \
- with the provided service name
-INFO_COMPARE_DESCRIPTION_FILENAME=File containing the DNs of the entries \
- to compare
-INFO_DESCRIPTION_USE_SASL_EXTERNAL=Use the SASL EXTERNAL authentication \
- mechanism
-INFO_DELETE_DESCRIPTION_FILENAME=File containing the DNs of the entries \
- to delete
-INFO_DESCRIPTION_TIME_LIMIT=Maximum length of \
- time (in seconds) to spend processing
-INFO_DESCRIPTION_IMPORTLDIF=Path to an LDIF file \
- containing data that should be added to the Directory Server database. \
- Multiple LDIF files may be provided by using this option multiple times
INFO_LDAPAUTH_PASSWORD_PROMPT=Password for user '%s':
-INFO_DESCRIPTION_ADMIN_UID=User ID of the Global Administrator \
- to use to bind to the server
#
# Uninstall messages
#
-INFO_UNINSTALLDS_DESCRIPTION_REMOVE_ALL=Remove all components of \
- the server (this option is not compatible with the rest of remove options)
-INFO_UNINSTALLDS_DESCRIPTION_REMOVE_SERVER_LIBRARIES=Remove Server Libraries \
- and Administrative Tools
-INFO_UNINSTALLDS_DESCRIPTION_REMOVE_DATABASES=Remove database contents
-INFO_UNINSTALLDS_DESCRIPTION_REMOVE_LOG_FILES=Remove log files
-INFO_UNINSTALLDS_DESCRIPTION_REMOVE_CONFIGURATION_FILES=Remove configuration \
- files
-INFO_UNINSTALLDS_DESCRIPTION_REMOVE_BACKUP_FILES=Remove backup files
-INFO_UNINSTALLDS_DESCRIPTION_REMOVE_LDIF_FILES=Remove LDIF files
-INFO_DESCRIPTION_REFERENCED_HOST=The name of this host (or IP address) as \
- it is referenced in remote servers for replication
-INFO_UNINSTALLDS_DESCRIPTION_FORCE=Specifies whether the uninstall should \
- continue if there is an error updating references to this server in remote \
- server instances or not. This option can only be used with the %s no \
- prompt option.
#
# Connection messages
#
-ERR_FAILED_TO_CONNECT=Unable to connect to the server at "%s" on port %s
-ERR_SIMPLE_BIND_NOT_SUPPORTED=Unable to authenticate using simple \
-authentication
-ERR_FAILED_TO_CONNECT_WRONG_PORT=Unable to connect to the \
- server at %s on port %s. Check this port is an administration port
-ERR_CANNOT_BIND_TO_PRIVILEGED_PORT=ERROR: Unable to \
- bind to port %d. This port may already be in use, or you may not have \
- permission to bind to it. On UNIX-based operating systems, non-root users \
- may not be allowed to bind to ports 1 through 1024
-ERR_CANNOT_BIND_TO_PORT=ERROR: Unable to bind to port \
- %d. This port may already be in use, or you may not have permission to bind \
- to it
-ERR_FAILED_TO_CONNECT_NOT_TRUSTED=Unable to connect to the \
- server at %s on port %s. In non-interactive mode, if the trustStore related parameters are not used, \
- you must use the '--trustAll' option for remote connections
INFO_EXCEPTION_OUT_OF_MEMORY_DETAILS=Not enough memory to perform the \
operation. Details: %s
INFO_EXCEPTION_DETAILS=Details: %s
-INFO_LDAP_CONN_PROMPT_SECURITY_LDAP=LDAP
-INFO_LDAP_CONN_PROMPT_SECURITY_USE_SSL=LDAP with SSL
-INFO_LDAP_CONN_PROMPT_SECURITY_USE_START_TLS=LDAP with StartTLS
-INFO_LDAP_CONN_PROMPT_SECURITY_USE_TRUST_ALL=Automatically \
- trust
-INFO_LDAP_CONN_PROMPT_SECURITY_TRUSTSTORE_PATH=Truststore path:
-INFO_LDAP_CONN_PROMPT_SECURITY_TRUSTSTORE_PASSWORD=Password for \
- truststore '%s':
-INFO_LDAP_CONN_PROMPT_SECURITY_KEYSTORE_PATH=Keystore path:
-INFO_LDAP_CONN_PROMPT_SECURITY_KEYSTORE_PASSWORD=Password for keystore \
- '%s':
-INFO_LDAP_CONN_HEADING_CONNECTION_PARAMETERS=>>>> Specify OpenDJ LDAP \
- connection parameters
-ERR_LDAP_CONN_BAD_HOST_NAME=The hostname "%s" could not be \
- resolved. Please check you have provided the correct address
-ERR_LDAP_CONN_BAD_PORT_NUMBER=Invalid port number "%s". Please \
- enter a valid port number between 1 and 65535
-INFO_LDAP_CONN_PROMPT_HOST_NAME=Directory server hostname or IP address \
- [%s]:
-INFO_LDAP_CONN_PROMPT_SECURITY_USE_SECURE_CTX=How do you want to connect?
-INFO_LDAP_CONN_PROMPT_SECURITY_PROTOCOL_DEFAULT_CHOICE=%d
-ERR_LDAP_CONN_PROMPT_SECURITY_INVALID_FILE_PATH=The provided path \
- is not valid
-INFO_LDAP_CONN_PROMPT_SECURITY_TRUST_METHOD=How do you want to trust the server certificate?
-INFO_LDAP_CONN_PROMPT_SECURITY_TRUSTSTORE=Use a truststore
-INFO_LDAP_CONN_PROMPT_SECURITY_MANUAL_CHECK=Manually validate
INFO_LDAP_CONN_PROMPT_SECURITY_SERVER_CERTIFICATE=Server Certificate:
INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE=%s
INFO_LDAP_CONN_PROMPT_SECURITY_TRUST_OPTION=Do you trust this server certificate?
@@ -932,38 +441,6 @@ INFO_LDAP_CONN_PROMPT_SECURITY_CERTIFICATE_DETAILS=View certificate details
INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE_USER_DN=User DN : %s
INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE_VALIDITY=Validity : From '%s'%n To '%s'
INFO_LDAP_CONN_SECURITY_SERVER_CERTIFICATE_ISSUER=Issuer : %s
-INFO_LDAP_CONN_PROMPT_SECURITY_CERTIFICATE_ALIASES=Which certificate do you want to use?
-INFO_LDAP_CONN_PROMPT_SECURITY_CERTIFICATE_ALIAS=%s (%s)
-INFO_LDAP_CONN_PROMPT_ADMINISTRATOR_UID=Global Administrator User ID [%s]:
-INFO_LDAP_CONN_GLOBAL_ADMINISTRATOR_OR_BINDDN_PROMPT=Global Administrator \
- User ID, or bind DN if no Global Administrator is defined [%s]:
-INFO_LDAP_CONN_PROMPT_PORT_NUMBER=Directory server port number [%d]:
-INFO_LDAP_CONN_PROMPT_BIND_DN=Administrator user bind DN [%s]:
-INFO_ADMIN_CONN_PROMPT_PORT_NUMBER=Directory server administration port number [%d]:
-INFO_ERROR_CONNECTING_TO_LOCAL=An error occurred connecting to the server
-INFO_CERTIFICATE_NOT_TRUSTED_TEXT_CLI=The Certificate presented by the server \
- %s:%s could not be trusted.\nPossible reasons for this error:\n\
- -The Certificate Authority that issued the certificate is not recognized (this \
- is the case of the self-signed certificates).\n-The server's certificate is \
- incomplete due to a misconfiguration.\n-The server's certificate has \
- expired.\n-There is a time difference between the server machine clock and \
- the local machine clock.\nBefore accepting this certificate, you should \
- examine the server's certificate carefully.
-INFO_CERTIFICATE_NAME_MISMATCH_TEXT_CLI=The Certificate presented by the server \
- %s:%s could not be trusted.\nThere is a name mismatch between the name of \
- the server (%s) and the subject DN of the certificate. This could be caused \
- because you are connected to a server pretending to be %s:%s.\n\
- Before accepting this certificate, you should examine the server's \
- certificate carefully.
-ERR_ERROR_CANNOT_READ_CONNECTION_PARAMETERS=The connection \
- parameters could not be read due to the following error: %s
-ERR_ERROR_NO_ADMIN_PASSWORD=No password was specified for \
- administrator "%s"
-ERR_ERROR_BIND_PASSWORD_NONINTERACTIVE=The LDAP bind \
- password was not specified and cannot be read interactively
-ERR_ERROR_INCOMPATIBLE_PROPERTY_MOD=The property \
- modification "%s" is incompatible with another modification to the same \
- property
INFO_LDAP_CONN_HEADING_CONNECTION_PARAMETERS=>>>> Specify OpenDJ LDAP \
connection parameters
ERR_ERROR_CANNOT_READ_PASSWORD=Unable to read password
@@ -979,8 +456,8 @@ REF_TITLE_SUBCOMMANDS=Subcommands
REF_INTRO_SUBCOMMANDS=The %s command supports the following subcommands:
REF_PART_TITLE_SUBCOMMANDS=%s Subcommands Reference
REF_PART_INTRO_SUBCOMMANDS=This section covers %s subcommands.
-REF_SHORT_DESC_UNINSTALL=remove OpenDJ directory server software
-REF_DEFAULT_BACKEND_TYPE=Depends on the distribution
+REF_DEFAULT_BACKEND_TYPE=Default: je for standard edition, \
+ pdb for OEM edition.
# Supplements to descriptions for generated reference documentation.
SUPPLEMENT_DESCRIPTION_CONTROLS=
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ca_ES.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ca_ES.properties
new file mode 100644
index 000000000..c3458b9dc
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ca_ES.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=ERROR: Potser nou heu introdu\u00eft ambd\u00f3s arguments %s i %s al mateix cop
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_de.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_de.properties
new file mode 100644
index 000000000..cc8cb1b42
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_de.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=Sie haben m\u00f6glicherweise nicht beide Argumente --%s und --%s angegeben
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_es.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_es.properties
new file mode 100644
index 000000000..f019d986d
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_es.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=No se pueden proporcionar los argumentos --%s y --%s conjuntamente
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_fr.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_fr.properties
new file mode 100644
index 000000000..9e9c37c11
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_fr.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=Vous ne pouvez pas utiliser \u00e0 la fois les arguments --%s et --%s
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ja.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ja.properties
new file mode 100644
index 000000000..e7cb5c8dc
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ja.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=--%s \u5f15\u6570\u3068 --%s \u5f15\u6570\u306e\u4e21\u65b9\u306f\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ko.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ko.properties
new file mode 100644
index 000000000..1bf6f3518
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_ko.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=--%s \uc778\uc218\uc640 --%s \uc778\uc218\ub97c \ubaa8\ub450 \uc81c\uacf5\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_pl.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_pl.properties
new file mode 100644
index 000000000..c0cc2e533
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_pl.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=B\u0141\u0104D\: Nie mo\u017cesz poda\u0107 obydwu arument\u00f3w %s i %s w tym samym czasie
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_zh_CN.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_zh_CN.properties
new file mode 100644
index 000000000..573ed952f
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_zh_CN.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=\u4e0d\u80fd\u540c\u65f6\u63d0\u4f9b --%s \u548c --%s \u53c2\u6570
diff --git a/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_zh_TW.properties b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_zh_TW.properties
new file mode 100644
index 000000000..47851740a
--- /dev/null
+++ b/opendj-cli/src/main/resources/com/forgerock/opendj/cli/cli_zh_TW.properties
@@ -0,0 +1,17 @@
+#
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
+#
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
+#
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
+#
+# Copyright 2016 ForgeRock AS.
+#
+
+ERR_TOOL_CONFLICTING_ARGS=\u60a8\u7121\u6cd5\u540c\u6642\u63d0\u4f9b --%s \u8207 --%s \u5f15\u6578
diff --git a/opendj-cli/src/main/resources/templates/dscfgAppendProps.ftl b/opendj-cli/src/main/resources/templates/dscfgAppendProps.ftl
index da914fafc..4d20a023e 100644
--- a/opendj-cli/src/main/resources/templates/dscfgAppendProps.ftl
+++ b/opendj-cli/src/main/resources/templates/dscfgAppendProps.ftl
@@ -1,28 +1,17 @@
<#--
- # CDDL HEADER START
+ # The contents of this file are subject to the terms of the Common Development and
+ # Distribution License (the License). You may not use this file except in compliance with the
+ # License.
#
- # The contents of this file are subject to the terms of the
- # Common Development and Distribution License, Version 1.0 only
- # (the "License"). You may not use this file except in compliance
- # with the License.
+ # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ # specific language governing permission and limitations under the License.
#
- # You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- # or http://forgerock.org/license/CDDLv1.0.html.
- # See the License for the specific language governing permissions
- # and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL HEADER in each
- # file and include the License file at legal-notices/CDDLv1_0.txt.
- # If applicable, add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced
- # with your own identifying information:
- #
- # Portions Copyright [yyyy] [name of copyright owner]
- #
- # CDDL HEADER END
- #
- # Copyright 2015 ForgeRock AS.
+ # When distributing Covered Software, include this CDDL Header Notice in each file and include
+ # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ # Header, with the fields enclosed by brackets [] replaced by your own identifying
+ # information: "Portions Copyright [year] [name of copyright owner]".
#
+ # Copyright 2015 ForgeRock AS.
#-->
${title}
diff --git a/opendj-cli/src/main/resources/templates/dscfgListItem.ftl b/opendj-cli/src/main/resources/templates/dscfgListItem.ftl
index 9b49a1c34..d4836c232 100644
--- a/opendj-cli/src/main/resources/templates/dscfgListItem.ftl
+++ b/opendj-cli/src/main/resources/templates/dscfgListItem.ftl
@@ -1,28 +1,17 @@
<#--
- # CDDL HEADER START
+ # The contents of this file are subject to the terms of the Common Development and
+ # Distribution License (the License). You may not use this file except in compliance with the
+ # License.
#
- # The contents of this file are subject to the terms of the
- # Common Development and Distribution License, Version 1.0 only
- # (the "License"). You may not use this file except in compliance
- # with the License.
+ # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ # specific language governing permission and limitations under the License.
#
- # You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- # or http://forgerock.org/license/CDDLv1.0.html.
- # See the License for the specific language governing permissions
- # and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL HEADER in each
- # file and include the License file at legal-notices/CDDLv1_0.txt.
- # If applicable, add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced
- # with your own identifying information:
- #
- # Portions Copyright [yyyy] [name of copyright owner]
- #
- # CDDL HEADER END
- #
- # Copyright 2015 ForgeRock AS.
+ # When distributing Covered Software, include this CDDL Header Notice in each file and include
+ # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ # Header, with the fields enclosed by brackets [] replaced by your own identifying
+ # information: "Portions Copyright [year] [name of copyright owner]".
#
+ # Copyright 2015 ForgeRock AS.
#-->
diff --git a/opendj-cli/src/main/resources/templates/dscfgListSubtypes.ftl b/opendj-cli/src/main/resources/templates/dscfgListSubtypes.ftl
index 7aa96b181..5789cbc05 100644
--- a/opendj-cli/src/main/resources/templates/dscfgListSubtypes.ftl
+++ b/opendj-cli/src/main/resources/templates/dscfgListSubtypes.ftl
@@ -1,28 +1,17 @@
<#--
- # CDDL HEADER START
+ # The contents of this file are subject to the terms of the Common Development and
+ # Distribution License (the License). You may not use this file except in compliance with the
+ # License.
#
- # The contents of this file are subject to the terms of the
- # Common Development and Distribution License, Version 1.0 only
- # (the "License"). You may not use this file except in compliance
- # with the License.
+ # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ # specific language governing permission and limitations under the License.
#
- # You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- # or http://forgerock.org/license/CDDLv1.0.html.
- # See the License for the specific language governing permissions
- # and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL HEADER in each
- # file and include the License file at legal-notices/CDDLv1_0.txt.
- # If applicable, add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced
- # with your own identifying information:
- #
- # Portions Copyright [yyyy] [name of copyright owner]
- #
- # CDDL HEADER END
- #
- # Copyright 2015 ForgeRock AS.
+ # When distributing Covered Software, include this CDDL Header Notice in each file and include
+ # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ # Header, with the fields enclosed by brackets [] replaced by your own identifying
+ # information: "Portions Copyright [year] [name of copyright owner]".
#
+ # Copyright 2015 ForgeRock AS.
#-->
diff --git a/opendj-cli/src/main/resources/templates/dscfgReference.ftl b/opendj-cli/src/main/resources/templates/dscfgReference.ftl
index 236ca4e3d..860b8faa3 100644
--- a/opendj-cli/src/main/resources/templates/dscfgReference.ftl
+++ b/opendj-cli/src/main/resources/templates/dscfgReference.ftl
@@ -1,28 +1,17 @@
<#--
- # CDDL HEADER START
+ # The contents of this file are subject to the terms of the Common Development and
+ # Distribution License (the License). You may not use this file except in compliance with the
+ # License.
#
- # The contents of this file are subject to the terms of the
- # Common Development and Distribution License, Version 1.0 only
- # (the "License"). You may not use this file except in compliance
- # with the License.
+ # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ # specific language governing permission and limitations under the License.
#
- # You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- # or http://forgerock.org/license/CDDLv1.0.html.
- # See the License for the specific language governing permissions
- # and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL HEADER in each
- # file and include the License file at legal-notices/CDDLv1_0.txt.
- # If applicable, add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced
- # with your own identifying information:
- #
- # Portions Copyright [yyyy] [name of copyright owner]
- #
- # CDDL HEADER END
- #
- # Copyright 2015 ForgeRock AS.
+ # When distributing Covered Software, include this CDDL Header Notice in each file and include
+ # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ # Header, with the fields enclosed by brackets [] replaced by your own identifying
+ # information: "Portions Copyright [year] [name of copyright owner]".
#
+ # Copyright 2015 ForgeRock AS.
#-->
${marker}
${term}
diff --git a/opendj-cli/src/main/resources/templates/dscfgVariableList.ftl b/opendj-cli/src/main/resources/templates/dscfgVariableList.ftl
index 584b75421..79cf12a78 100644
--- a/opendj-cli/src/main/resources/templates/dscfgVariableList.ftl
+++ b/opendj-cli/src/main/resources/templates/dscfgVariableList.ftl
@@ -1,28 +1,17 @@
<#--
- # CDDL HEADER START
+ # The contents of this file are subject to the terms of the Common Development and
+ # Distribution License (the License). You may not use this file except in compliance with the
+ # License.
#
- # The contents of this file are subject to the terms of the
- # Common Development and Distribution License, Version 1.0 only
- # (the "License"). You may not use this file except in compliance
- # with the License.
+ # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ # specific language governing permission and limitations under the License.
#
- # You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- # or http://forgerock.org/license/CDDLv1.0.html.
- # See the License for the specific language governing permissions
- # and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL HEADER in each
- # file and include the License file at legal-notices/CDDLv1_0.txt.
- # If applicable, add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced
- # with your own identifying information:
- #
- # Portions Copyright [yyyy] [name of copyright owner]
- #
- # CDDL HEADER END
- #
- # Copyright 2015 ForgeRock AS.
+ # When distributing Covered Software, include this CDDL Header Notice in each file and include
+ # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ # Header, with the fields enclosed by brackets [] replaced by your own identifying
+ # information: "Portions Copyright [year] [name of copyright owner]".
#
+ # Copyright 2015 ForgeRock AS.
#-->
diff --git a/opendj-cli/src/main/resources/templates/optionsRefSect1.ftl b/opendj-cli/src/main/resources/templates/optionsRefSect1.ftl
index 23bb099cd..a07cc9bd4 100644
--- a/opendj-cli/src/main/resources/templates/optionsRefSect1.ftl
+++ b/opendj-cli/src/main/resources/templates/optionsRefSect1.ftl
@@ -1,28 +1,17 @@
<#--
- # CDDL HEADER START
+ # The contents of this file are subject to the terms of the Common Development and
+ # Distribution License (the License). You may not use this file except in compliance with the
+ # License.
#
- # The contents of this file are subject to the terms of the
- # Common Development and Distribution License, Version 1.0 only
- # (the "License"). You may not use this file except in compliance
- # with the License.
+ # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ # specific language governing permission and limitations under the License.
#
- # You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- # or http://forgerock.org/license/CDDLv1.0.html.
- # See the License for the specific language governing permissions
- # and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL HEADER in each
- # file and include the License file at legal-notices/CDDLv1_0.txt.
- # If applicable, add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced
- # with your own identifying information:
- #
- # Portions Copyright [yyyy] [name of copyright owner]
- #
- # CDDL HEADER END
- #
- # Copyright 2015 ForgeRock AS.
+ # When distributing Covered Software, include this CDDL Header Notice in each file and include
+ # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ # Header, with the fields enclosed by brackets [] replaced by your own identifying
+ # information: "Portions Copyright [year] [name of copyright owner]".
#
+ # Copyright 2015 ForgeRock AS.
#-->
${title}
diff --git a/opendj-cli/src/main/resources/templates/refEntry.ftl b/opendj-cli/src/main/resources/templates/refEntry.ftl
index b0c853f78..fcc32bbf8 100644
--- a/opendj-cli/src/main/resources/templates/refEntry.ftl
+++ b/opendj-cli/src/main/resources/templates/refEntry.ftl
@@ -1,54 +1,33 @@
<#--
- # CDDL HEADER START
+ # The contents of this file are subject to the terms of the Common Development and
+ # Distribution License (the License). You may not use this file except in compliance with the
+ # License.
#
- # The contents of this file are subject to the terms of the
- # Common Development and Distribution License, Version 1.0 only
- # (the "License"). You may not use this file except in compliance
- # with the License.
+ # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ # specific language governing permission and limitations under the License.
#
- # You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- # or http://forgerock.org/license/CDDLv1.0.html.
- # See the License for the specific language governing permissions
- # and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL HEADER in each
- # file and include the License file at legal-notices/CDDLv1_0.txt.
- # If applicable, add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced
- # with your own identifying information:
- #
- # Portions Copyright [yyyy] [name of copyright owner]
- #
- # CDDL HEADER END
- #
- # Copyright 2015 ForgeRock AS.
+ # When distributing Covered Software, include this CDDL Header Notice in each file and include
+ # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ # Header, with the fields enclosed by brackets [] replaced by your own identifying
+ # information: "Portions Copyright [year] [name of copyright owner]".
#
+ # Copyright 2015 ForgeRock AS.
#-->
${title}
diff --git a/opendj-cli/src/main/resources/templates/refSect2.ftl b/opendj-cli/src/main/resources/templates/refSect2.ftl
index 69c0ebb1a..4dcba4ea7 100644
--- a/opendj-cli/src/main/resources/templates/refSect2.ftl
+++ b/opendj-cli/src/main/resources/templates/refSect2.ftl
@@ -1,28 +1,17 @@
<#--
- # CDDL HEADER START
+ # The contents of this file are subject to the terms of the Common Development and
+ # Distribution License (the License). You may not use this file except in compliance with the
+ # License.
#
- # The contents of this file are subject to the terms of the
- # Common Development and Distribution License, Version 1.0 only
- # (the "License"). You may not use this file except in compliance
- # with the License.
+ # You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ # specific language governing permission and limitations under the License.
#
- # You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- # or http://forgerock.org/license/CDDLv1.0.html.
- # See the License for the specific language governing permissions
- # and limitations under the License.
- #
- # When distributing Covered Code, include this CDDL HEADER in each
- # file and include the License file at legal-notices/CDDLv1_0.txt.
- # If applicable, add the following below this CDDL HEADER,
- # with the fields enclosed by brackets "[]" replaced
- # with your own identifying information:
- #
- # Portions Copyright [yyyy] [name of copyright owner]
- #
- # CDDL HEADER END
- #
- # Copyright 2015 ForgeRock AS.
+ # When distributing Covered Software, include this CDDL Header Notice in each file and include
+ # the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ # Header, with the fields enclosed by brackets [] replaced by your own identifying
+ # information: "Portions Copyright [year] [name of copyright owner]".
#
+ # Copyright 2015 ForgeRock AS.
#-->
${name}
diff --git a/opendj-cli/src/test/java/com/forgerock/opendj/cli/CliTestCase.java b/opendj-cli/src/test/java/com/forgerock/opendj/cli/CliTestCase.java
index 5690873d2..376e4994c 100644
--- a/opendj-cli/src/test/java/com/forgerock/opendj/cli/CliTestCase.java
+++ b/opendj-cli/src/test/java/com/forgerock/opendj/cli/CliTestCase.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2014 ForgeRock AS.
+ * Copyright 2014 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/test/java/com/forgerock/opendj/cli/ConsoleApplicationTestCase.java b/opendj-cli/src/test/java/com/forgerock/opendj/cli/ConsoleApplicationTestCase.java
index 601b9ce73..1f537e285 100644
--- a/opendj-cli/src/test/java/com/forgerock/opendj/cli/ConsoleApplicationTestCase.java
+++ b/opendj-cli/src/test/java/com/forgerock/opendj/cli/ConsoleApplicationTestCase.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2014 ForgeRock AS.
+ * Copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
@@ -36,19 +26,14 @@
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
-/**
- * Unit tests for the console application class.
- */
+/** Unit tests for the console application class. */
@SuppressWarnings("javadoc")
public class ConsoleApplicationTestCase extends CliTestCase {
-
final LocalizableMessage msg = LocalizableMessage.raw("Language is the source of misunderstandings.");
final LocalizableMessage msg2 = LocalizableMessage
.raw("If somebody wants a sheep, that is a proof that one exists.");
- /**
- * For test purposes only.
- */
+ /** For test purposes only. */
private static class MockConsoleApplication extends ConsoleApplication {
private static ByteArrayOutputStream out;
private static ByteArrayOutputStream err;
@@ -76,19 +61,16 @@ public String getErr() throws UnsupportedEncodingException {
return err.toString("UTF-8");
}
- /** {@inheritDoc} */
@Override
public boolean isVerbose() {
return verbose;
}
- /** {@inheritDoc} */
@Override
public boolean isInteractive() {
return interactive;
}
- /** {@inheritDoc} */
@Override
public boolean isQuiet() {
return quiet;
diff --git a/opendj-cli/src/test/java/com/forgerock/opendj/cli/TestSubCommandArgumentParserTestCase.java b/opendj-cli/src/test/java/com/forgerock/opendj/cli/TestSubCommandArgumentParserTestCase.java
index cd343e07c..863fa2bda 100644
--- a/opendj-cli/src/test/java/com/forgerock/opendj/cli/TestSubCommandArgumentParserTestCase.java
+++ b/opendj-cli/src/test/java/com/forgerock/opendj/cli/TestSubCommandArgumentParserTestCase.java
@@ -1,33 +1,21 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2014-2015 ForgeRock AS
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014-2016 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
-import static com.forgerock.opendj.cli.CliMessages.*;
-
import java.util.ArrayList;
import java.util.List;
@@ -61,9 +49,9 @@ public final class TestSubCommandArgumentParserTestCase extends CliTestCase {
public void setup() throws Exception {
parser = new SubCommandArgumentParser(getClass().getName(), LocalizableMessage.raw("test description"), true);
- sc1 = new SubCommand(parser, "sub-command1", INFO_BACKUPDB_DESCRIPTION_BACKEND_ID.get());
+ sc1 = new SubCommand(parser, "sub-command1", LocalizableMessage.raw("sub-command1"));
sc2 = new SubCommand(parser, "sub-command2", true, 2, 4, "args1 arg2 [arg3 arg4]",
- INFO_BACKUPDB_DESCRIPTION_BACKUP_ALL.get());
+ LocalizableMessage.raw("sub-command2"));
}
/**
diff --git a/opendj-cli/src/test/java/com/forgerock/opendj/cli/TestSubCommandTestCase.java b/opendj-cli/src/test/java/com/forgerock/opendj/cli/TestSubCommandTestCase.java
index 1ce1846e0..885a08ff5 100644
--- a/opendj-cli/src/test/java/com/forgerock/opendj/cli/TestSubCommandTestCase.java
+++ b/opendj-cli/src/test/java/com/forgerock/opendj/cli/TestSubCommandTestCase.java
@@ -1,28 +1,18 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
+ * Copyright 2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-cli/src/test/java/com/forgerock/opendj/cli/UtilsTestCase.java b/opendj-cli/src/test/java/com/forgerock/opendj/cli/UtilsTestCase.java
index e0671bdda..18401c0ba 100644
--- a/opendj-cli/src/test/java/com/forgerock/opendj/cli/UtilsTestCase.java
+++ b/opendj-cli/src/test/java/com/forgerock/opendj/cli/UtilsTestCase.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2014-2015 ForgeRock AS.
+ * Copyright 2014-2015 ForgeRock AS.
*/
package com.forgerock.opendj.cli;
diff --git a/opendj-copyright-maven-plugin/pom.xml b/opendj-copyright-maven-plugin/pom.xml
deleted file mode 100644
index 1df418532..000000000
--- a/opendj-copyright-maven-plugin/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
- 4.0.0
-
-
- opendj-sdk-parent
- org.forgerock.opendj
- 3.0.0-SNAPSHOT
- ../opendj-sdk-parent/pom.xml
-
-
- opendj-copyright-maven-plugin
- OpenDJ Copyright Check Maven Plugin
- Checks ForgeRock source file copyrights.
-
- maven-plugin
-
-
-
- 3.2.3
- 3.2
-
-
-
-
-
-
- org.apache.maven
- maven-core
- ${maven.version}
- provided
-
-
-
- org.apache.maven
- maven-model
- ${maven.version}
- provided
-
-
-
- org.apache.maven
- maven-plugin-api
- ${maven.version}
- provided
-
-
-
- org.apache.maven.plugin-tools
- maven-plugin-annotations
- ${maven-plugin-plugin.version}
- provided
-
-
-
-
- org.forgerock
- forgerock-build-tools
- test
-
-
-
-
- org.twdata.maven
- mojo-executor
- 2.2.0
-
-
-
-
- org.forgerock.commons
- forgerock-util
-
-
-
- org.apache.maven.scm
- maven-scm-api
- 1.9.2
-
-
-
- org.apache.maven.scm
- maven-scm-provider-svn-commons
- 1.9.2
-
-
-
- org.apache.maven.scm
- maven-scm-provider-gitexe
- 1.9.2
-
-
-
diff --git a/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/CheckCopyrightMojo.java b/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/CheckCopyrightMojo.java
deleted file mode 100644
index 8a56c02ee..000000000
--- a/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/CheckCopyrightMojo.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
- */
-package org.forgerock.maven;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-
-/**
- * This be used to check that if a modified file contains a line that appears to
- * be a comment and includes the word "copyright", then it should contain the
- * current year.
- */
-@Mojo(name = "check-copyright", defaultPhase = LifecyclePhase.VALIDATE)
-public class CheckCopyrightMojo extends CopyrightAbstractMojo {
-
- /**
- * The property that may be used to prevent copyright date problems from
- * failing the build.
- */
- @Parameter(required = true, property = "ignoreCopyrightErrors", defaultValue = "false")
- private boolean ignoreCopyrightErrors;
-
- @Parameter(required = true, property = "skipCopyrightCheck", defaultValue = "false")
- private boolean checkDisabled;
-
- /**
- * Uses maven-scm API to identify all modified files in the current
- * workspace. For all source files, check if the copyright is up to date.
- *
- * @throws MojoFailureException
- * if any
- * @throws MojoExecutionException
- * if any
- */
- public void execute() throws MojoFailureException, MojoExecutionException {
- if (checkDisabled) {
- getLog().info("Copyright check is disabled");
- return;
- }
-
- checkCopyrights();
- if (!getIncorrectCopyrightFilePaths().isEmpty()) {
- getLog().warn("Potential copyright year updates needed for the following files:");
- for (String filename : getIncorrectCopyrightFilePaths()) {
- getLog().warn(" " + filename);
- }
-
- if (!ignoreCopyrightErrors) {
- getLog().warn("Fix copyright date problems before proceeding, "
- + "or use '-DignoreCopyrightErrors=true' to ignore copyright errors.");
- getLog().warn("You can use update-copyrights maven profile "
- + "(mvn validate -Pupdate-copyrights) to automatically update copyrights.");
- throw new MojoExecutionException("Found files with potential copyright year updates needed");
- }
- } else {
- getLog().info("Copyrights are up to date");
- }
- }
-}
diff --git a/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/CopyrightAbstractMojo.java b/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/CopyrightAbstractMojo.java
deleted file mode 100644
index 54fd88488..000000000
--- a/opendj-copyright-maven-plugin/src/main/java/org/forgerock/maven/CopyrightAbstractMojo.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
- */
-package org.forgerock.maven;
-
-import static org.forgerock.util.Utils.closeSilently;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.scm.ScmException;
-import org.apache.maven.scm.ScmFile;
-import org.apache.maven.scm.ScmFileSet;
-import org.apache.maven.scm.ScmFileStatus;
-import org.apache.maven.scm.ScmResult;
-import org.apache.maven.scm.ScmVersion;
-import org.apache.maven.scm.command.diff.DiffScmResult;
-import org.apache.maven.scm.command.status.StatusScmResult;
-import org.apache.maven.scm.log.ScmLogDispatcher;
-import org.apache.maven.scm.log.ScmLogger;
-import org.apache.maven.scm.manager.BasicScmManager;
-import org.apache.maven.scm.manager.NoSuchScmProviderException;
-import org.apache.maven.scm.manager.ScmManager;
-import org.apache.maven.scm.provider.ScmProviderRepository;
-import org.apache.maven.scm.provider.git.command.GitCommand;
-import org.apache.maven.scm.provider.git.command.diff.GitDiffConsumer;
-import org.apache.maven.scm.provider.git.gitexe.GitExeScmProvider;
-import org.apache.maven.scm.provider.git.gitexe.command.GitCommandLineUtils;
-import org.apache.maven.scm.provider.git.gitexe.command.diff.GitDiffCommand;
-import org.apache.maven.scm.repository.ScmRepository;
-import org.apache.maven.scm.repository.ScmRepositoryException;
-import org.codehaus.plexus.util.cli.CommandLineUtils;
-import org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer;
-import org.codehaus.plexus.util.cli.Commandline;
-
-/**
- * Abstract class which is used for both copyright checks and updates.
- */
-public abstract class CopyrightAbstractMojo extends AbstractMojo {
-
- /** The Maven Project. */
- @Parameter(required = true, property = "project", readonly = true)
- private MavenProject project;
-
- /**
- * Copyright owner.
- * This string token must be present on the same line with 'copyright' keyword and the current year.
- */
- @Parameter(required = true, defaultValue = "ForgeRock AS")
- private String copyrightOwnerToken;
-
- /** The path to the root of the scm local workspace to check. */
- @Parameter(required = true, defaultValue = "${basedir}")
- private String baseDir;
-
- @Parameter(required = true, defaultValue = "${project.scm.connection}")
- private String scmRepositoryUrl;
-
- /**
- * List of file patterns for which copyright check and/or update will be skipped.
- * Pattern can contain the following wildcards (*, ?, **{@literal /}).
- */
- @Parameter(required = false)
- private List disabledFiles;
-
- /** The file extensions to test. */
- public static final List CHECKED_EXTENSIONS = new LinkedList<>(Arrays.asList(
- "bat", "c", "h", "html", "java", "ldif", "Makefile", "mc", "sh", "txt", "xml", "xsd", "xsl"));
-
- private static final List EXCLUDED_END_COMMENT_BLOCK_TOKEN = new LinkedList<>(Arrays.asList(
- "*/", "-->"));
-
- private static final List SUPPORTED_COMMENT_MIDDLE_BLOCK_TOKEN = new LinkedList<>(Arrays.asList(
- "*", "#", "rem", "!"));
-
- private static final List SUPPORTED_START_BLOCK_COMMENT_TOKEN = new LinkedList<>(Arrays.asList(
- "/*", "
-
-MUST BE REMOVED: Copyright 2012-2014 ForgeRock AS.
-EXPECTED OUTPUT: Copyright 2012-YEAR ForgeRock AS.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-2.txt b/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-2.txt
deleted file mode 100644
index 4c140eb64..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-2.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2013 ForgeRock AS.
- */
-
-MUST BE REMOVED: Copyright 2013 ForgeRock AS.
-EXPECTED OUTPUT: Copyright 2013-YEAR ForgeRock AS.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-3.txt b/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-3.txt
deleted file mode 100644
index e5f672171..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-3.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- */
-
-EXPECTED OUTPUT: Copyright YEAR ForgeRock AS.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-4.txt b/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-4.txt
deleted file mode 100644
index 1537c5702..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-4.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2010-2013 Old Copyright Owner Inc.
- *
- */
-
-EXPECTED OUTPUT: Portions Copyright YEAR ForgeRock AS.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-5.txt b/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-5.txt
deleted file mode 100644
index 1c120bb0c..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-5.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2010-2012 Very Old copyright owner Inc.
- * Copyright 2013-2014 Old copyright owner Inc.
- */
-
-EXPECTED OUTPUT: Portions Copyright YEAR ForgeRock AS.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-6.txt b/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-6.txt
deleted file mode 100644
index 0c3a8220d..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/opendj-copyrights/opendj-bad-copyright-6.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2008-2010 Very Old copyright owner Inc.
- * Portions Copyright 2011-2012 Old copyright owner Inc.
- * Portions Copyright 2013-2014 ForgeRock AS.
- */
-
-MUST BE REMOVED: Portions Copyright 2013-2014 ForgeRock AS.
-EXPECTED OUTPUT: Portions Copyright 2013-YEAR ForgeRock AS.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-1.txt b/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-1.txt
deleted file mode 100644
index e01ee4e73..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-1.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2011-2014 ForgeRock AS. All rights reserved.
- *
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the License). You may not use this file except in
- * compliance with the License.
- *
- * You can obtain a copy of the License at
- * http://forgerock.org/license/CDDLv1.0.html
- * See the License for the specific language governing
- * permission and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * Header Notice in each file and include the License file
- * at http://forgerock.org/license/CDDLv1.0.html
- * If applicable, add the following below the CDDL Header,
- * with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- */
-
-MUST BE REMOVED: Copyright (c) 2011-2014 ForgeRock AS. All rights reserved.
-EXPECTED OUTPUT: Copyright (c) 2011-YEAR ForgeRock AS. All rights reserved.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-2.txt b/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-2.txt
deleted file mode 100644
index d748d883c..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-2.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2012 ForgeRock AS. All rights reserved.
- *
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the License). You may not use this file except in
- * compliance with the License.
- *
- * You can obtain a copy of the License at
- * http://forgerock.org/license/CDDLv1.0.html
- * See the License for the specific language governing
- * permission and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * Header Notice in each file and include the License file
- * at http://forgerock.org/license/CDDLv1.0.html
- * If applicable, add the following below the CDDL Header,
- * with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- */
-
-MUST BE REMOVED: Copyright (c) 2012 ForgeRock AS. All rights reserved.
-EXPECTED OUTPUT: Copyright (c) 2012-YEAR ForgeRock AS. All rights reserved.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-3.txt b/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-3.txt
deleted file mode 100644
index 20a378fc6..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-3.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- *
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the License). You may not use this file except in
- * compliance with the License.
- *
- * You can obtain a copy of the License at
- * http://forgerock.org/license/CDDLv1.0.html
- * See the License for the specific language governing
- * permission and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * Header Notice in each file and include the License file
- * at http://forgerock.org/license/CDDLv1.0.html
- * If applicable, add the following below the CDDL Header,
- * with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- */
-
-EXPECTED OUTPUT: Copyright (c) YEAR ForgeRock AS. All rights reserved.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-4.txt b/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-4.txt
deleted file mode 100644
index 5f5a5150c..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-4.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2010-2011 Old Copyright Owner.
- *
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the License). You may not use this file except in
- * compliance with the License.
- *
- * You can obtain a copy of the License at
- * http://forgerock.org/license/CDDLv1.0.html
- * See the License for the specific language governing
- * permission and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * Header Notice in each file and include the License file
- * at http://forgerock.org/license/CDDLv1.0.html
- * If applicable, add the following below the CDDL Header,
- * with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- */
-
- EXPECTED OUTPUT: Portions Copyrighted YEAR ForgeRock AS. All rights reserved.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-5.txt b/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-5.txt
deleted file mode 100644
index 2e8c5d980..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-5.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2010-2011 Very Old Copyright Owner.
- * Copyright (c) 2012-2013 Old Copyright Owner.
- *
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the License). You may not use this file except in
- * compliance with the License.
- *
- * You can obtain a copy of the License at
- * http://forgerock.org/license/CDDLv1.0.html
- * See the License for the specific language governing
- * permission and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * Header Notice in each file and include the License file
- * at http://forgerock.org/license/CDDLv1.0.html
- * If applicable, add the following below the CDDL Header,
- * with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- */
-
- EXPECTED OUTPUT: Portions Copyrighted YEAR ForgeRock AS. All rights reserved.
\ No newline at end of file
diff --git a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-6.txt b/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-6.txt
deleted file mode 100644
index e05d576e6..000000000
--- a/opendj-copyright-maven-plugin/src/test/resources/files/openidm-copyrights/openidm-bad-copyright-6.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2010-2011 Very Old Copyright Owner.
- * Portions Copyrighted 2012-2013 Old Copyright Owner.
- * Portions Copyrighted 2013-2014 ForgeRock AS. All rights reserved.
- *
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the License). You may not use this file except in
- * compliance with the License.
- *
- * You can obtain a copy of the License at
- * http://forgerock.org/license/CDDLv1.0.html
- * See the License for the specific language governing
- * permission and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * Header Notice in each file and include the License file
- * at http://forgerock.org/license/CDDLv1.0.html
- * If applicable, add the following below the CDDL Header,
- * with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- */
-
-MUST BE REMOVED: Portions Copyrighted 2013-2014 ForgeRock AS. All rights reserved.
-EXPECTED OUTPUT: Portions Copyrighted 2013-YEAR ForgeRock AS. All rights reserved.
\ No newline at end of file
diff --git a/opendj-core/clirr-ignored-api-changes.xml b/opendj-core/clirr-ignored-api-changes.xml
deleted file mode 100644
index 69380923c..000000000
--- a/opendj-core/clirr-ignored-api-changes.xml
+++ /dev/null
@@ -1,590 +0,0 @@
-
-
-
-
-
- org/forgerock/opendj/ldap/LDAPConnectionFactory
- 7002
- LDAPConnectionFactory(java.net.SocketAddress)
- Moving from inetSocketAddress to host+port constructors
-
-
- org/forgerock/opendj/ldap/LDAPConnectionFactory
- 7002
- LDAPConnectionFactory(java.net.SocketAddress, org.forgerock.opendj.ldap.LDAPOptions)
- Moving from inetSocketAddress to host+port constructors
-
-
- org/forgerock/opendj/ldap/LDAPConnectionFactory
- 7002
- java.net.InetAddress getAddress()
- Moving from inetSocketAddress to host+port constructors
-
-
- org/forgerock/opendj/ldap/LDAPConnectionFactory
- 7002
- java.net.SocketAddress getSocketAddress()
- Moving from inetSocketAddress to host+port constructors
-
-
-
- org/forgerock/opendj/ldap/CoreMessages
- 8001
- Incorrectly reported because it is automatically generated
-
-
-
- org/forgerock/opendj/ldap/Connections
- 7005
- %regex[org\.forgerock\.opendj\.ldap\.ConnectionFactory newHeartBeatConnectionFactory\(org\.forgerock\.opendj\.ldap\.ConnectionFactory, long, java\.util\.concurrent\.TimeUnit, org\.forgerock\.opendj\.ldap\.requests\.SearchRequest(, java\.util\.concurrent\.ScheduledExecutorService)?\)]
- %regex[org\.forgerock\.opendj\.ldap\.ConnectionFactory newHeartBeatConnectionFactory\(org\.forgerock\.opendj\.ldap\.ConnectionFactory,\s*long,\s*long,\s*java\.util\.concurrent\.TimeUnit(,\s*org\.forgerock\.opendj\.ldap\.requests\.SearchRequest(,\s*java\.util\.concurrent\.ScheduledExecutorService)?)?\)]
- OPENDJ-1058: Added a timeout parameter to actively shutdown dead connections
-
-
- org/forgerock/opendj/ldap/Connections
- 7004
- org.forgerock.opendj.ldap.ConnectionFactory newHeartBeatConnectionFactory(org.forgerock.opendj.ldap.ConnectionFactory, long, java.util.concurrent.TimeUnit)
- OPENDJ-1058: Added a timeout parameter to actively shutdown dead connections
-
-
- org/forgerock/opendj/ldap/ErrorResultException
- 7005
- %regex[org\.forgerock\.opendj\.ldap\.ErrorResultException newErrorResult\(org\.forgerock\.opendj\.ldap\.ResultCode, java\.lang\.String(, java\.lang\.Throwable)?\)]
- %regex[org\.forgerock\.opendj\.ldap\.ErrorResultException newErrorResult\(org\.forgerock\.opendj\.ldap\.ResultCode, java\.lang\.CharSequence(, java\.lang\.Throwable)?\)]
- OPENDJ-1058: Broadened the API by accepting java.lang.CharSequence while retaining source compatibility
-
-
- %regex[org/forgerock/opendj/ldap/(LDAPConnectionFactory|LDAPListener)]
- 7002
- java.lang.String getHostname()
- OPENDJ-1270: Renamed LDAP{ConnectionFactory|Listener}.getHostname() to getHostName()
-
-
- %regex[org/forgerock/opendj/ldap/(LDAPConnectionFactory|LDAPListener)]
- 7006
- java.net.SocketAddress getSocketAddress()
- java.net.InetSocketAddress
- OPENDJ-1270: Changed LDAP{ConnectionFactory|Listener}.getAddress() to return InetSocketAddresses
-
-
- org/forgerock/opendj/ldap/LDAPConnectionFactory
- 7005
- %regex[LDAPConnectionFactory\(java\.lang\.String(.)*(org\.forgerock\.opendj\.ldap\.LDAPOptions)\)]
- %regex[LDAPConnectionFactory\(java\.lang\.String(.)*(org\.forgerock\.util\.Options)\)]
- OPENDJ-1654: LDAPOptions should be converted in a SchemaOptions style API
-
-
- org/forgerock/opendj/ldap/LDAPListener
- 7005
- %regex[LDAPListener\((.*), org\.forgerock\.opendj\.ldap\.ServerConnectionFactory(,\s*org\.forgerock\.opendj\.ldap\.LDAPListenerOptions)?\)]
- %regex[LDAPListener\((.*)\s*org\.forgerock\.opendj\.ldap\.ServerConnectionFactory(,\s*org\.forgerock\.util\.Options)?\)]
- OPENDJ-1654: LDAPOptions should be converted in a SchemaOptions style API
-
-
-
- %regex[org/forgerock/opendj/ldap/(LDAPOptions|LDAPListenerOptions)]
- 7002
- %regex[org\.glassfish\.grizzly\.nio\.transport\.TCPNIOTransport getTCPNIOTransport\(\)]
- OPENDJ-346: Decoupled opendj-ldap-sdk from grizzly-framework
-
-
- %regex[org/forgerock/opendj/ldap/(LDAPOptions|LDAPListenerOptions)]
- 7002
- %regex[org\.forgerock\.opendj\.ldap\.(LDAPOptions|LDAPListenerOptions) setTCPNIOTransport\(org\.glassfish\.grizzly\.nio\.transport\.TCPNIOTransport\)]
- OPENDJ-346: Decoupled opendj-ldap-sdk from grizzly-framework
-
-
-
- %regex[org/forgerock/opendj/asn1/[^/]*]
- 8001
- OPENDJ-175: Moved all classes from org.forgerock.opendj.asn1 package to org.forgerock.opendj.io package
-
-
- org/forgerock/opendj/ldap/ByteSequence
- 7012
- boolean isEmpty()
- OPENDJ-701: Added method isEmpty() to interface ByteSequence
-
-
- org/forgerock/opendj/ldap/requests/SearchRequest
- 7012
- boolean isSingleEntrySearch()
- OPENDJ-972: Added method isSingleEntrySearch() to interface SearchRequest
-
-
-
- org/forgerock/opendj/ldap/schema/MatchingRule
- 7002
- %regex[org\.forgerock\.opendj\.ldap\.Assertion getAssertion\(org\.forgerock\.opendj\.ldap\.ByteSequence, java\.util\.List, org\.forgerock\.opendj\.ldap\.ByteSequence\)]
- Renamed getAssertion() to getSubstringAssertion()
-
-
- org/forgerock/opendj/ldap/schema/MatchingRuleImpl
- 7002
- %regex[org\.forgerock\.opendj\.ldap\.Assertion getAssertion\(org\.forgerock\.opendj\.ldap\.schema\.Schema, org\.forgerock\.opendj\.ldap\.ByteSequence, java\.util\.List, org\.forgerock\.opendj\.ldap\.ByteSequence\)]
- Renamed getAssertion() to getSubstringAssertion()
-
-
- org/forgerock/opendj/ldap/schema/MatchingRuleImpl
- 7012
- %regex[org\.forgerock\.opendj\.ldap\.Assertion getSubstringAssertion\(org\.forgerock\.opendj\.ldap\.schema\.Schema, org\.forgerock\.opendj\.ldap\.ByteSequence, java\.util\.List, org\.forgerock\.opendj\.ldap\.ByteSequence\)]
- Renamed getAssertion() to getSubstringAssertion()
-
-
-
- org/forgerock/opendj/ldap/schema/SchemaValidationPolicy
- 7006
- %regex[org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$Policy (checkAttributeValues|checkAttributesAndObjectClasses|checkDITContentRules|checkDITStructureRules|checkNameForms|requireSingleStructuralObjectClass)\(\)]
- %regex[org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$Action]
- Renamed SchemaValidationPolicy.Policy to SchemaValidationPolicy.Action
-
-
- org/forgerock/opendj/ldap/schema/SchemaValidationPolicy
- 7005
- %regex[org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy (checkAttributeValues|checkAttributesAndObjectClasses|checkDITContentRules|checkDITStructureRules|checkNameForms|requireSingleStructuralObjectClass)\(org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$Policy(, org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$EntryResolver)?\)]
- %regex[org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy (checkAttributeValues|checkAttributesAndObjectClasses|checkDITContentRules|checkDITStructureRules|checkNameForms|requireSingleStructuralObjectClass)\(org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$Action(,\s*org\.forgerock\.opendj\.ldap\.schema\.SchemaValidationPolicy\$EntryResolver)?\)]
- Renamed SchemaValidationPolicy.Policy to SchemaValidationPolicy.Action
-
-
- org/forgerock/opendj/ldap/schema/SchemaValidationPolicy$Policy
- 8001
- Renamed SchemaValidationPolicy.Policy to SchemaValidationPolicy.Action
-
-
-
- org/forgerock/opendj/ldap/LDAPListenerOptions
- 7002
- org.forgerock.opendj.ldap.LDAPListenerOptions setDecodeOptions(org.forgerock.opendj.ldap.DecodeOptions)
- OPENDJ-1197: Method return type has changed due to reification
-
-
- org/forgerock/opendj/ldap/LDAPOptions
- 7002
- org.forgerock.opendj.ldap.LDAPOptions setDecodeOptions(org.forgerock.opendj.ldap.DecodeOptions)
- OPENDJ-1197: Method return type has changed due to reification
-
-
-
- org/forgerock/opendj/ldap/Assertion
- 7012
- java.lang.Object createIndexQuery(org.forgerock.opendj.ldap.spi.IndexQueryFactory)
- OPENDJ-1308 Migrate schema support: allows decoupling indexing from a specific backend
-
-
- org/forgerock/opendj/ldap/schema/MatchingRuleImpl
- 7012
- java.util.Collection getIndexers()
- OPENDJ-1308 Migrate schema support: allows decoupling indexing from a specific backend
-
-
- org/forgerock/opendj/ldap/schema/MatchingRuleImpl
- 7012
- boolean isIndexingSupported()
- OPENDJ-1308 Migrate schema support: allows decoupling indexing from a specific backend
-
-
- org/forgerock/opendj/ldap/*Connection*
- 7004
- org.forgerock.opendj.ldap.FutureResult *Async(*org.forgerock.opendj.ldap.ResultHandler)
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- org/forgerock/opendj/ldap/schema/Schema
- 7004
- org.forgerock.opendj.ldap.FutureResult readSchema*Async*(org.forgerock.opendj.ldap.Connection, org.forgerock.opendj.ldap.DN, org.forgerock.opendj.ldap.ResultHandler)
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- org/forgerock/opendj/ldap/*Connection*
- 7006
- org.forgerock.opendj.ldap.FutureResult *Async(*org.forgerock.opendj.ldap.ResultHandler)
- org.forgerock.util.promise.Promise
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- org/forgerock/opendj/ldap/Connection
- 7012
- org.forgerock.opendj.ldap.FutureResult *Async(org.forgerock.opendj.*)
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- %regex[org/forgerock/opendj/ldap/(RequestHandler|MemoryBackend)]
- 7004
- *handleSearch(*)
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- org/forgerock/opendj/ldap/ResultHandler
- 7012
- *handleError(org.forgerock.opendj.ldap.ErrorResultException)
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- org/forgerock/opendj/ldap/ResultHandler
- 7002
- *handleErrorResult(org.forgerock.opendj.ldap.ErrorResultException)
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- org/forgerock/opendj/ldap/SearchResultHandler
- 4001
- org/forgerock/opendj/ldap/ResultHandler
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- org/forgerock/opendj/ldap/schema/SchemaBuilder
- 7004
- org.forgerock.opendj.ldap.FutureResult addSchema*Async(*)
- OPENDJ-1285 Migrate SDK from Futures to Promises
-
-
- org/forgerock/opendj/ldap/*Exception
- 5001
- org/forgerock/opendj/ldap/ErrorResultException
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/*Exception
- 5001
- java/util/concurrent/ExecutionException
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/ConnectionEventListener
- 7005
- *handleConnectionError(boolean, org.forgerock.opendj.ldap.ErrorResultException)
- *handleConnectionError(boolean, org.forgerock.opendj.ldap.LdapException)
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/ResultHandler
- 7012
- *handleError(org.forgerock.opendj.ldap.LdapException)
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/ErrorResult*Exception
- 8001
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/*Connection*
- 7006
- *Async*
- org.forgerock.opendj.ldap.LdapPromise
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/RootDSE
- 7006
- *Async*
- org.forgerock.opendj.ldap.LdapPromise
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/schema/Schema*
- 7006
- *Async*
- org.forgerock.opendj.ldap.LdapPromise
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/Connection
- 7012
- org.forgerock.opendj.ldap.LdapPromise *Async(*)
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/FutureResult
- 8001
- OPENDJ-1536 Rename FutureResult and ErrorResultException classes hierarchy in the SDK to enhance code consistency
-
-
- org/forgerock/opendj/ldap/Functions
- 7002
- *composeFirstP(*)
- OPENDJ-1550 Replace SDK Function with Function from forgerock-util
-
-
- org/forgerock/opendj/ldap/Functions
- 7002
- *composeSecondP(*)
- OPENDJ-1550 Replace SDK Function with Function from forgerock-util
-
-
- org/forgerock/opendj/ldap/Functions
- 7002
- *fixedFunction(*)
- OPENDJ-1550 Replace SDK Function with Function from forgerock-util
-
-
- org/forgerock/opendj/ldap/Function
- 8001
- OPENDJ-1550 Replace SDK Function with Function from forgerock-util
-
-
- org/forgerock/opendj/ldap/AttributeParser
- 7005
- *as*(org.forgerock.opendj.ldap.Function*)
- *as*(org.forgerock.util.Function*)
-
- OPENDJ-1550 Replace SDK Function with Function from forgerock-util
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
-
- org/forgerock/opendj/ldap/Functions
- 7005
- *compose(org.forgerock.opendj.ldap.Function, org.forgerock.opendj.ldap.Function)
- *compose(org.forgerock.util.Function, org.forgerock.util.Function)
-
- OPENDJ-1550 Replace SDK Function with Function from forgerock-util
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
-
- org/forgerock/opendj/ldap/Functions
- 7006
- *
- org.forgerock.util.promise.Function
- OPENDJ-1550 Replace SDK Function with Function from forgerock-util
-
-
- org/forgerock/opendj/ldap/DN
- 7002
- *toNormalizedString()
- *toIrreversibleNormalizedByteString()
- OPENDJ-1585 Function has been renamed to avoid abuse
-
-
- %regex[org/forgerock/opendj/ldap/schema/Schema(Builder)?]
- 7002
- %regex[(boolean|org.forgerock.opendj.ldap.schema.SchemaBuilder) allow(.)*\((boolean)?\)]
- OPENDJ-1478 Make it easier to add compatibility options to schemas
-
-
- org/forgerock/opendj/ldap/ByteSequence
- 7012
- java.nio.ByteBuffer copyTo(java.nio.ByteBuffer)
- Added new utility method copyTo() for a byte buffer
-
-
- org/forgerock/opendj/ldap/ByteSequence
- 7012
- boolean copyTo(java.nio.CharBuffer, java.nio.charset.CharsetDecoder)
- OPENDJ-1585: Added new utility method copyTo for a char buffer
-
-
- org/forgerock/opendj/ldap/schema/MatchingRule
- 7002
- java.util.Comparator comparator()
- OPENDJ-1689 method has been removed because all matching rules should support the default comparator
-
-
- org/forgerock/opendj/ldap/schema/MatchingRuleImpl
- 7002
- java.util.Comparator comparator(org.forgerock.opendj.ldap.schema.Schema)
- OPENDJ-1689 method has been removed because all matching rules should support the default comparator
-
-
- org/forgerock/opendj/ldap/schema/MatchingRuleImpl
- 7012
- java.util.Collection createIndexers(org.forgerock.opendj.ldap.spi.IndexingOptions)
- Doesn't really seem correct to call createKeys() with different options each time.
-
-
- org/forgerock/opendj/ldap/ByteSequence
- 7012
- boolean startsWith(org.forgerock.opendj.ldap.ByteSequence)
- Lack of startsWith() forced to re-implement it multiple times at different location
-
-
- org/forgerock/opendj/ldap/ByteString
- 7005
- org.forgerock.opendj.ldap.ByteString valueOf(java.lang.String)
- org.forgerock.opendj.ldap.ByteString valueOf(java.lang.String)
- org.forgerock.opendj.ldap.ByteString valueOf(java.lang.CharSequence)
- Using CharSequence instead of String allows to reduce memory copy.
-
-
-
-
- org/forgerock/opendj/ldap/Functions
- 7006
- *
- org.forgerock.util.Function
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
- org/forgerock/opendj/ldap/LdapResultHandler
- 8000
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
- %regex[org/forgerock/opendj/ldap/(RequestHandler|MemoryBackend)]
- 7005
- %regex[(.)* handle*(.)*org\.forgerock\.opendj\.ldap\.ResultHandler(.)*]
- %regex[(.)* handle*(.)*org\.forgerock\.opendj\.ldap\.LdapResultHandler(.)*]
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
- %regex[org/forgerock/opendj/ldap/responses/(Abstract)?ExtendedResultDecoder]
- 7006
- org.forgerock.opendj.ldap.ResultHandler adaptExtendedResultHandler(org.forgerock.opendj.ldap.requests.ExtendedRequest, org.forgerock.opendj.ldap.ResultHandler, org.forgerock.opendj.ldap.DecodeOptions)
- org.forgerock.opendj.ldap.LdapResultHandler
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
- %regex[org/forgerock/opendj/ldap/responses/(Abstract)?ExtendedResultDecoder]
- 7005
- org.forgerock.opendj.ldap.ResultHandler adaptExtendedResultHandler(org.forgerock.opendj.ldap.requests.ExtendedRequest, org.forgerock.opendj.ldap.ResultHandler, org.forgerock.opendj.ldap.DecodeOptions)
- org.forgerock.opendj.ldap.ResultHandler adaptExtendedResultHandler(org.forgerock.opendj.ldap.requests.ExtendedRequest, org.forgerock.opendj.ldap.LdapResultHandler, org.forgerock.opendj.ldap.DecodeOptions)
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
- org/forgerock/opendj/ldap/RootDSE
- 7005
- *readRootDSEAsync(org.forgerock.opendj.ldap.Connection, org.forgerock.opendj.ldap.ResultHandler)
- *readRootDSEAsync(org.forgerock.opendj.ldap.Connection, org.forgerock.opendj.ldap.LdapResultHandler)
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
- org/forgerock/opendj/ldap/AuthenticatedConnectionFactory$AuthenticatedConnection
- 7005
- *bindAsync(org.forgerock.opendj.ldap.requests.BindRequest, org.forgerock.opendj.ldap.IntermediateResponseHandler, org.forgerock.opendj.ldap.ResultHandler)
- *bindAsync(org.forgerock.opendj.ldap.requests.BindRequest*org.forgerock.opendj.ldap.IntermediateResponseHandler*org.forgerock.opendj.ldap.LdapResultHandler)
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
- org/forgerock/opendj/ldap/ResultHandler
- 8001
- OPENDJ-1666 Update sdk to forgerock-util 2.0.0
-
-
- org/forgerock/opendj/ldap/LDAPListenerOptions
- 8001
- OPENDJ-1654: LDAPOptions should be converted in a SchemaOptions style API
-
-
- org/forgerock/opendj/ldap/LDAPOptions
- 8001
- OPENDJ-1654: LDAPOptions should be converted in a SchemaOptions style API
-
-
- org/forgerock/opendj/ldap/ByteStringBuilder
- 7002
- %regex[(org\.forgerock\.opendj\.ldap\.ByteStringBuilder|int) append\(.*\)]
- OPENDJ-1802 ByteStringBuilder.append() => appendByte(), appendShort(), appendInt(), appendLong(), appendBytes(), appendObject()
-
-
- org/forgerock/opendj/ldap/ByteStringBuilder
- 7004
- org.forgerock.opendj.ldap.ByteStringBuilder append(byte)
- org.forgerock.opendj.ldap.ByteStringBuilder appendByte(int)
- OPENDJ-1802 Consider making ByteString / ByteStringBuilder methods more intentional
-
-
- org/forgerock/opendj/ldap/ByteStringBuilder
- 7006
- org.forgerock.opendj.ldap.ByteStringBuilder append(byte)
- void
- OPENDJ-1802 Consider making ByteString / ByteStringBuilder methods more intentional
-
-
- org/forgerock/opendj/ldap/ByteSequenceReader
- 7002
- %regex[(\w|\.)+ get\w*\([^)]*\)]
- OPENDJ-1802 ByteSequenceReader.get*() => readByte(), readBytes() and read*()
-
-
- org/forgerock/opendj/ldap/ByteString
- 7002
- %regex[org\.forgerock\.opendj\.ldap\.ByteString valueOf\([^)]+\)]
- OPENDJ-1802 ByteString.valueOf() => valueOfInt(), valueOfLong(), valueOfUtf8(), valueOfBytes(), valueOfObject()
-
-
- org/forgerock/opendj/ldap/Connections
- 7002
- *newAuthenticatedConnectionFactory*
- OPENDJ-1607: merge authenticated and heart-beat connection factories into
- LDAPConnectionFactory. Pre-authenticated connection support is now part of
- LDAPConnectionFactory and can be enabled by specifying the AUTHN_BIND_REQUEST option.
-
-
- org/forgerock/opendj/ldap/Connections
- 7002
- *newHeartBeatConnectionFactory*
- OPENDJ-1607: merge authenticated and heart-beat connection factories into
- LDAPConnectionFactory. Heart-beat support is now part of
- LDAPConnectionFactory and can be configured using the HEARTBEAT_* options.
-
-
- org/forgerock/opendj/ldap/AuthenticatedConnectionFactory*
- 8001
- OPENDJ-1607: merge authenticated and heart-beat connection factories into
- LDAPConnectionFactory. Pre-authenticated connection support is now part of
- LDAPConnectionFactory and can be enabled by specifying the AUTHN_BIND_REQUEST option.
-
-
- org/forgerock/opendj/ldap/requests/StartTLSExtendedRequest
- 7012
- *addEnabled*(java.util.Collection)
- OPENDJ-1607: added Collection based addEnabled* methods
-
-
- org/forgerock/opendj/ldap/AttributeParser
- 7014
- java.util.Set asSetOf(org.forgerock.opendj.ldap.Function, java.lang.Object[])
- Method needs to be final in order to use SafeVarArgs annotation
-
-
- org/forgerock/opendj/ldap/FailoverLoadBalancingAlgorithm
- 1001
- Class instances are now created using Connections.newFailoverLoadBalancer
-
-
- org/forgerock/opendj/ldap/RoundRobinLoadBalancingAlgorithm
- 1001
- Class instances are now created using Connections.newRoundRobinLoadBalancer
-
-
diff --git a/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/package-info.java b/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/package-info.java
deleted file mode 100644
index df1bafb8c..000000000
--- a/opendj-core/src/main/java/com/forgerock/opendj/ldap/controls/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-/**
- * Classes implementing Sun proprietary LDAP controls.
- */
-package com.forgerock.opendj.ldap.controls;
-
diff --git a/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/PasswordPolicyStateOperation.java b/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/PasswordPolicyStateOperation.java
deleted file mode 100644
index f965c18cd..000000000
--- a/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/PasswordPolicyStateOperation.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package com.forgerock.opendj.ldap.extensions;
-
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * Password policy state operation.
- */
-public interface PasswordPolicyStateOperation {
- /**
- * Returns the type of operation.
- *
- * @return The type of operation.
- */
- PasswordPolicyStateOperationType getOperationType();
-
- /**
- * Returns the operation values.
- *
- * @return The operation values.
- */
- Iterable getValues();
-}
diff --git a/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/package-info.java b/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/package-info.java
deleted file mode 100644
index 7bc9d5652..000000000
--- a/opendj-core/src/main/java/com/forgerock/opendj/ldap/extensions/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-/**
- * Classes implementing Sun proprietary LDAP extended operations.
- */
-package com.forgerock.opendj.ldap.extensions;
-
diff --git a/opendj-core/src/main/java/com/forgerock/opendj/util/package-info.java b/opendj-core/src/main/java/com/forgerock/opendj/util/package-info.java
deleted file mode 100644
index 8626357f7..000000000
--- a/opendj-core/src/main/java/com/forgerock/opendj/util/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-/**
- * Classes providing utility functionality.
- */
-package com.forgerock.opendj.util;
-
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/io/package-info.java b/opendj-core/src/main/java/org/forgerock/opendj/io/package-info.java
deleted file mode 100644
index ad6a68111..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/io/package-info.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2013 ForgeRock AS.
- */
-
-/**
- * Classes and interfaces providing I/O functionality.
- *
- * It includes facilities for encoding and decoding ASN.1 data streams, as
- * well as LDAP protocol messages.
- *
- * Note that this particular implementation is limited to the subset of elements
- * that are typically used by LDAP clients. As such, it does not include all
- * ASN.1 element types, particularly elements like OIDs, bit strings, and
- * timestamp values.
- */
-package org.forgerock.opendj.io;
-
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AssertionFailureException.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AssertionFailureException.java
deleted file mode 100644
index a653cef42..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AssertionFailureException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
- */
-
-package org.forgerock.opendj.ldap;
-
-import org.forgerock.opendj.ldap.responses.Result;
-
-/**
- * Thrown when the result code returned in a Result indicates that the Request
- * failed because the filter contained in an assertion control failed to match
- * the target entry. More specifically, this exception is used for the
- * {@link ResultCode#ASSERTION_FAILED ASSERTION_FAILED} result code.
- */
-@SuppressWarnings("serial")
-public class AssertionFailureException extends LdapException {
- AssertionFailureException(final Result result) {
- super(result);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeFactory.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeFactory.java
deleted file mode 100644
index 04aff9557..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/AttributeFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap;
-
-/**
- * Attribute factories are included with a set of {@code DecodeOptions} in order
- * to allow application to control how {@code Attribute} instances are created
- * when decoding requests and responses.
- *
- * @see Attribute
- * @see DecodeOptions
- */
-public interface AttributeFactory {
- /**
- * Creates an attribute using the provided attribute description and no
- * values.
- *
- * @param attributeDescription
- * The attribute description.
- * @return The new attribute.
- * @throws NullPointerException
- * If {@code attributeDescription} was {@code null}.
- */
- Attribute newAttribute(AttributeDescription attributeDescription);
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/CancelledResultException.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/CancelledResultException.java
deleted file mode 100644
index 08ae43da0..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/CancelledResultException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009-2010 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
- */
-
-package org.forgerock.opendj.ldap;
-
-import org.forgerock.opendj.ldap.responses.Result;
-
-/**
- * Thrown when the result code returned in a Result indicates that the Request
- * was cancelled. More specifically, this exception is used for the following
- * error result codes:
- *
- * - {@link ResultCode#CANCELLED CANCELLED} - the requested operation was
- * cancelled.
- *
- {@link ResultCode#CLIENT_SIDE_USER_CANCELLED CLIENT_SIDE_USER_CANCELLED}
- * - the requested operation was cancelled by the user.
- *
- */
-@SuppressWarnings("serial")
-public class CancelledResultException extends LdapException {
- CancelledResultException(final Result result) {
- super(result);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/ConnectionException.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/ConnectionException.java
deleted file mode 100644
index 95d407400..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/ConnectionException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
- */
-
-package org.forgerock.opendj.ldap;
-
-import org.forgerock.opendj.ldap.responses.Result;
-
-/**
- * Thrown when the result code returned in a Result indicates that the Request
- * was unsuccessful because of a connection failure.
- */
-@SuppressWarnings("serial")
-public class ConnectionException extends LdapException {
- ConnectionException(final Result result) {
- super(result);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/EntryFactory.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/EntryFactory.java
deleted file mode 100644
index ef94ccc95..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/EntryFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap;
-
-/**
- * Entry factories are included with a set of {@code DecodeOptions} in order to
- * allow application to control how {@code Entry} instances are created when
- * decoding requests and responses.
- *
- * @see Entry
- * @see DecodeOptions
- */
-public interface EntryFactory {
- /**
- * Creates an empty entry using the provided distinguished name and no
- * attributes.
- *
- * @param name
- * The distinguished name of the entry to be created.
- * @return The new entry.
- * @throws NullPointerException
- * If {@code name} was {@code null}.
- */
- Entry newEntry(DN name);
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/FailoverLoadBalancingAlgorithm.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/FailoverLoadBalancingAlgorithm.java
deleted file mode 100644
index 7290b01ad..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/FailoverLoadBalancingAlgorithm.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2013-2015 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap;
-
-import java.util.Collection;
-
-import org.forgerock.util.Options;
-
-/**
- * A fail-over load balancing algorithm provides fault tolerance across multiple
- * underlying connection factories.
- */
-final class FailoverLoadBalancingAlgorithm extends AbstractLoadBalancingAlgorithm {
- FailoverLoadBalancingAlgorithm(final Collection extends ConnectionFactory> factories, final Options options) {
- super(factories, options);
- }
-
- @Override
- String getAlgorithmName() {
- return "Failover";
- }
-
- @Override
- int getInitialConnectionFactoryIndex() {
- // Always start with the first connection factory.
- return 0;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LoadBalancer.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/LoadBalancer.java
deleted file mode 100644
index 90e89c25b..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LoadBalancer.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions Copyright 2011-2014 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap;
-
-import org.forgerock.util.Reject;
-import org.forgerock.util.promise.Promise;
-
-import static org.forgerock.util.promise.Promises.*;
-
-/**
- * A load balancing connection factory allocates connections using the provided
- * algorithm.
- */
-final class LoadBalancer implements ConnectionFactory {
- private final LoadBalancingAlgorithm algorithm;
-
- LoadBalancer(final LoadBalancingAlgorithm algorithm) {
- Reject.ifNull(algorithm);
- this.algorithm = algorithm;
- }
-
- @Override
- public void close() {
- // Delegate to the algorithm.
- algorithm.close();
- }
-
- @Override
- public Connection getConnection() throws LdapException {
- return algorithm.getConnectionFactory().getConnection();
- }
-
- @Override
- public Promise getConnectionAsync() {
- final ConnectionFactory factory;
-
- try {
- factory = algorithm.getConnectionFactory();
- } catch (final LdapException e) {
- return newExceptionPromise(e);
- }
-
- return factory.getConnectionAsync();
- }
-
- @Override
- public String toString() {
- final StringBuilder builder = new StringBuilder();
- builder.append("LoadBalancer(");
- builder.append(algorithm);
- builder.append(')');
- return builder.toString();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LoadBalancingAlgorithm.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/LoadBalancingAlgorithm.java
deleted file mode 100644
index eebdead5e..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/LoadBalancingAlgorithm.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions Copyright 2013-2015 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap;
-
-import static org.forgerock.util.time.Duration.duration;
-
-import java.io.Closeable;
-import java.util.concurrent.ScheduledExecutorService;
-
-import org.forgerock.util.Option;
-import org.forgerock.util.time.Duration;
-
-/**
- * A load balancing algorithm distributes connection requests across one or more underlying connection factories in an
- * implementation defined manner.
- *
- * @see Connections#newLoadBalancer(LoadBalancingAlgorithm)
- */
-public interface LoadBalancingAlgorithm extends Closeable {
- /**
- * Specifies the interval between successive attempts to reconnect to offline load-balanced connection factories.
- * The default configuration is to attempt to reconnect every second.
- */
- Option LOAD_BALANCER_MONITORING_INTERVAL = Option.withDefault(duration("1 seconds"));
-
- /**
- * Specifies the event listener which should be notified whenever a load-balanced connection factory changes state
- * from online to offline or vice-versa. By default events will be logged to the {@code LoadBalancingAlgorithm}
- * logger using the {@link LoadBalancerEventListener#LOG_EVENTS} listener.
- */
- Option LOAD_BALANCER_EVENT_LISTENER =
- Option.of(LoadBalancerEventListener.class, LoadBalancerEventListener.LOG_EVENTS);
-
- /**
- * Specifies the scheduler which will be used for periodically reconnecting to offline connection factories. A
- * system-wide scheduler will be used by default.
- */
- Option LOAD_BALANCER_SCHEDULER = Option.of(ScheduledExecutorService.class, null);
-
- /**
- * Releases any resources associated with this algorithm, including any associated connection factories.
- */
- @Override
- void close();
-
- /**
- * Returns a connection factory which should be used in order to satisfy the next connection request.
- *
- * @return The connection factory.
- * @throws LdapException
- * If no connection factories are available for use.
- */
- ConnectionFactory getConnectionFactory() throws LdapException;
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/MultipleEntriesFoundException.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/MultipleEntriesFoundException.java
deleted file mode 100644
index abc265ef2..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/MultipleEntriesFoundException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009-2010 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
- */
-
-package org.forgerock.opendj.ldap;
-
-import org.forgerock.opendj.ldap.responses.Result;
-
-/**
- * Thrown when the result code returned in a Result indicates that the requested
- * single entry search operation or read operation failed because the Directory
- * Server returned multiple matching entries (or search references) when only a
- * single matching entry was expected. More specifically, this exception is used
- * for the {@link ResultCode#CLIENT_SIDE_UNEXPECTED_RESULTS_RETURNED
- * CLIENT_SIDE_UNEXPECTED_RESULTS_RETURNED} error result codes.
- */
-@SuppressWarnings("serial")
-public class MultipleEntriesFoundException extends LdapException {
- MultipleEntriesFoundException(final Result result) {
- super(result);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/ReferralException.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/ReferralException.java
deleted file mode 100644
index 37df786c9..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/ReferralException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009-2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap;
-
-import org.forgerock.opendj.ldap.responses.Result;
-
-/**
- * Thrown when the result code returned in a Result indicates that the Request
- * could not be processed by the Directory Server because the target entry is
- * located on another server. More specifically, this exception is used for the
- * {@link ResultCode#REFERRAL REFERRAL} result code.
- */
-@SuppressWarnings("serial")
-public class ReferralException extends EntryNotFoundException {
- ReferralException(final Result result) {
- super(result);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/RoundRobinLoadBalancingAlgorithm.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/RoundRobinLoadBalancingAlgorithm.java
deleted file mode 100644
index 997fdaf7d..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/RoundRobinLoadBalancingAlgorithm.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2013-2015 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap;
-
-import java.util.Collection;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.forgerock.util.Options;
-
-/**
- * A round robin load balancing algorithm distributes connection requests across a list of
- * connection factories one at a time. When the end of the list is reached, the algorithm starts again from the
- * beginning.
- */
-final class RoundRobinLoadBalancingAlgorithm extends AbstractLoadBalancingAlgorithm {
- private final int maxIndex;
- private final AtomicInteger nextIndex = new AtomicInteger(-1);
-
- RoundRobinLoadBalancingAlgorithm(final Collection extends ConnectionFactory> factories, final Options options) {
- super(factories, options);
- this.maxIndex = factories.size();
- }
-
- @Override
- String getAlgorithmName() {
- return "RoundRobin";
- }
-
- @Override
- int getInitialConnectionFactoryIndex() {
- // A round robin pool of one connection factories is unlikely in
- // practice and requires special treatment.
- if (maxIndex == 1) {
- return 0;
- }
-
- // Determine the next factory to use: avoid blocking algorithm.
- int oldNextIndex;
- int newNextIndex;
- do {
- oldNextIndex = nextIndex.get();
- newNextIndex = oldNextIndex + 1;
- if (newNextIndex == maxIndex) {
- newNextIndex = 0;
- }
- } while (!nextIndex.compareAndSet(oldNextIndex, newNextIndex));
-
- // There's a potential, but benign, race condition here: other threads
- // could jump in and rotate through the list before we return the
- // connection factory.
- return newNextIndex;
- }
-
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/TimeoutResultException.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/TimeoutResultException.java
deleted file mode 100644
index 86e4d3eac..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/TimeoutResultException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
- */
-
-package org.forgerock.opendj.ldap;
-
-import org.forgerock.opendj.ldap.responses.Result;
-
-/**
- * Thrown when the result code returned in a Result indicates that the Request
- * was aborted because it did not complete in the required time out period.
- */
-@SuppressWarnings("serial")
-public class TimeoutResultException extends LdapException {
- TimeoutResultException(final Result result) {
- super(result);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/package-info.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/package-info.java
deleted file mode 100755
index bbffb97f2..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/controls/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009-2010 Sun Microsystems, Inc.
- */
-
-/**
- * Classes and interfaces for common LDAP controls.
- */
-package org.forgerock.opendj.ldap.controls;
-
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/package-info.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/package-info.java
deleted file mode 100755
index 40d6bd0ce..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/package-info.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009-2010 Sun Microsystems, Inc.
- */
-
-/**
- * Classes and interfaces for core types including connections, entries, and
- * attributes.
- */
-package org.forgerock.opendj.ldap;
-
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractBindRequest.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractBindRequest.java
deleted file mode 100644
index e310a3deb..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractBindRequest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-/**
- * An abstract Bind request which can be used as the basis for implementing new
- * authentication methods.
- *
- * @param
- * The type of Bind request.
- */
-abstract class AbstractBindRequest extends AbstractRequestImpl implements
- BindRequest {
-
- AbstractBindRequest() {
- // Nothing to do.
- }
-
- AbstractBindRequest(final BindRequest bindRequest) {
- super(bindRequest);
- }
-
- @Override
- public abstract String getName();
-
- @Override
- @SuppressWarnings("unchecked")
- final R getThis() {
- return (R) this;
- }
-
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractSASLBindRequest.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractSASLBindRequest.java
deleted file mode 100644
index 4e6bfe1f2..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractSASLBindRequest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-import org.forgerock.opendj.io.LDAP;
-
-/**
- * An abstract SASL Bind request which can be used as the basis for implementing
- * new SASL authentication methods.
- *
- * @param
- * The type of SASL Bind request.
- */
-abstract class AbstractSASLBindRequest extends AbstractBindRequest
- implements SASLBindRequest {
-
- AbstractSASLBindRequest() {
-
- }
-
- AbstractSASLBindRequest(final SASLBindRequest saslBindRequest) {
- super(saslBindRequest);
- }
-
- @Override
- public final byte getAuthenticationType() {
- return LDAP.TYPE_AUTHENTICATION_SASL;
- }
-
- @Override
- public final String getName() {
- return "".intern();
- }
-
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableBindRequest.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableBindRequest.java
deleted file mode 100644
index 172023030..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableBindRequest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions Copyright 2014 ForgeRock AS
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-import org.forgerock.opendj.ldap.LdapException;
-
-/**
- * An abstract unmodifiable Bind request which can be used as the basis for
- * implementing new unmodifiable authentication methods.
- *
- * @param
- * The type of Bind request.
- */
-abstract class AbstractUnmodifiableBindRequest extends
- AbstractUnmodifiableRequest implements BindRequest {
-
- AbstractUnmodifiableBindRequest(final R impl) {
- super(impl);
- }
-
- @Override
- public BindClient createBindClient(final String serverName) throws LdapException {
- return impl.createBindClient(serverName);
- }
-
- @Override
- public byte getAuthenticationType() {
- return impl.getAuthenticationType();
- }
-
- @Override
- public String getName() {
- return impl.getName();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableSASLBindRequest.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableSASLBindRequest.java
deleted file mode 100644
index d821452ec..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/AbstractUnmodifiableSASLBindRequest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-/**
- * An abstract unmodifiable SASL Bind request which can be used as the basis for
- * implementing new unmodifiable SASL authentication methods.
- *
- * @param
- * The type of SASL Bind request.
- */
-abstract class AbstractUnmodifiableSASLBindRequest extends
- AbstractUnmodifiableBindRequest implements SASLBindRequest {
-
- AbstractUnmodifiableSASLBindRequest(final R impl) {
- super(impl);
- }
-
- @Override
- public String getSASLMechanism() {
- return impl.getSASLMechanism();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnbindRequest.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnbindRequest.java
deleted file mode 100644
index d138eda50..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnbindRequest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-import java.util.List;
-
-import org.forgerock.opendj.ldap.DecodeException;
-import org.forgerock.opendj.ldap.DecodeOptions;
-import org.forgerock.opendj.ldap.controls.Control;
-import org.forgerock.opendj.ldap.controls.ControlDecoder;
-
-/**
- * The Unbind operation allows a client to terminate an LDAP session.
- */
-public interface UnbindRequest extends Request {
-
- @Override
- UnbindRequest addControl(Control control);
-
- @Override
- C getControl(ControlDecoder decoder, DecodeOptions options)
- throws DecodeException;
-
- @Override
- List getControls();
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnbindRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnbindRequestImpl.java
deleted file mode 100644
index 92efdb607..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnbindRequestImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-/**
- * Unbind request implementation.
- */
-final class UnbindRequestImpl extends AbstractRequestImpl implements UnbindRequest {
-
- UnbindRequestImpl() {
- // Do nothing.
- }
-
- UnbindRequestImpl(final UnbindRequest unbindRequest) {
- super(unbindRequest);
- }
-
- @Override
- public String toString() {
- final StringBuilder builder = new StringBuilder();
- builder.append("UnbindRequest(controls=");
- builder.append(getControls());
- builder.append(")");
- return builder.toString();
- }
-
- @Override
- UnbindRequest getThis() {
- return this;
- }
-
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableAbandonRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableAbandonRequestImpl.java
deleted file mode 100644
index 591bcca8d..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableAbandonRequestImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-/**
- * Unmodifiable abandon request implementation.
- */
-final class UnmodifiableAbandonRequestImpl extends AbstractUnmodifiableRequest
- implements AbandonRequest {
- UnmodifiableAbandonRequestImpl(final AbandonRequest request) {
- super(request);
- }
-
- @Override
- public int getRequestID() {
- return impl.getRequestID();
- }
-
- @Override
- public AbandonRequest setRequestID(final int id) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableAnonymousSASLBindRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableAnonymousSASLBindRequestImpl.java
deleted file mode 100644
index 626dbbdba..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableAnonymousSASLBindRequestImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-/**
- * Unmodifiable anonymous SASL bind request implementation.
- */
-final class UnmodifiableAnonymousSASLBindRequestImpl extends
- AbstractUnmodifiableSASLBindRequest implements
- AnonymousSASLBindRequest {
- UnmodifiableAnonymousSASLBindRequestImpl(final AnonymousSASLBindRequest impl) {
- super(impl);
- }
-
- @Override
- public String getTraceString() {
- return impl.getTraceString();
- }
-
- @Override
- public AnonymousSASLBindRequest setTraceString(final String traceString) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableCancelExtendedRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableCancelExtendedRequestImpl.java
deleted file mode 100644
index 10f2bc459..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableCancelExtendedRequestImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-import org.forgerock.opendj.ldap.responses.ExtendedResult;
-
-/**
- * Unmodifiable cancel extended request implementation.
- */
-final class UnmodifiableCancelExtendedRequestImpl extends
- AbstractUnmodifiableExtendedRequest implements
- CancelExtendedRequest {
- UnmodifiableCancelExtendedRequestImpl(final CancelExtendedRequest impl) {
- super(impl);
- }
-
- @Override
- public int getRequestID() {
- return impl.getRequestID();
- }
-
- @Override
- public CancelExtendedRequest setRequestID(final int id) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableDeleteRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableDeleteRequestImpl.java
deleted file mode 100644
index 3625e66db..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableDeleteRequestImpl.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-import org.forgerock.opendj.ldap.DN;
-import org.forgerock.opendj.ldif.ChangeRecordVisitor;
-
-/**
- * Unmodifiable delete request implementation.
- */
-final class UnmodifiableDeleteRequestImpl extends AbstractUnmodifiableRequest
- implements DeleteRequest {
- UnmodifiableDeleteRequestImpl(final DeleteRequest impl) {
- super(impl);
- }
-
- @Override
- public R accept(final ChangeRecordVisitor v, final P p) {
- return v.visitChangeRecord(p, this);
- }
-
- @Override
- public DN getName() {
- return impl.getName();
- }
-
- @Override
- public DeleteRequest setName(final DN dn) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public DeleteRequest setName(final String dn) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableExternalSASLBindRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableExternalSASLBindRequestImpl.java
deleted file mode 100644
index b61fecb72..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableExternalSASLBindRequestImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-/**
- * Unmodifiable external SASL bind request implementation.
- */
-final class UnmodifiableExternalSASLBindRequestImpl extends
- AbstractUnmodifiableSASLBindRequest implements
- ExternalSASLBindRequest {
- UnmodifiableExternalSASLBindRequestImpl(final ExternalSASLBindRequest impl) {
- super(impl);
- }
-
- @Override
- public String getAuthorizationID() {
- return impl.getAuthorizationID();
- }
-
- @Override
- public ExternalSASLBindRequest setAuthorizationID(final String authorizationID) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableGenericExtendedRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableGenericExtendedRequestImpl.java
deleted file mode 100644
index 4ec7bc65f..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableGenericExtendedRequestImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-import org.forgerock.opendj.ldap.responses.GenericExtendedResult;
-
-/**
- * Unmodifiable generic extended request implementation.
- */
-final class UnmodifiableGenericExtendedRequestImpl extends
- AbstractUnmodifiableExtendedRequest
- implements GenericExtendedRequest {
- UnmodifiableGenericExtendedRequestImpl(final GenericExtendedRequest impl) {
- super(impl);
- }
-
- @Override
- public GenericExtendedRequest setOID(final String oid) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public GenericExtendedRequest setValue(final Object value) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableUnbindRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableUnbindRequestImpl.java
deleted file mode 100644
index 43b5c3591..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableUnbindRequestImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-/**
- * Unmodifiable unbind request implementation.
- */
-final class UnmodifiableUnbindRequestImpl extends AbstractUnmodifiableRequest
- implements UnbindRequest {
- UnmodifiableUnbindRequestImpl(final UnbindRequest impl) {
- super(impl);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableWhoAmIExtendedRequestImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableWhoAmIExtendedRequestImpl.java
deleted file mode 100644
index e990af49c..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/UnmodifiableWhoAmIExtendedRequestImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-import org.forgerock.opendj.ldap.responses.WhoAmIExtendedResult;
-
-/**
- * Unmodifiable Who Am I extended request implementation.
- */
-final class UnmodifiableWhoAmIExtendedRequestImpl extends
- AbstractUnmodifiableExtendedRequest implements
- WhoAmIExtendedRequest {
- UnmodifiableWhoAmIExtendedRequestImpl(final WhoAmIExtendedRequest impl) {
- super(impl);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/package-info.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/package-info.java
deleted file mode 100755
index 8805522b5..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/requests/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-/**
- * Classes and interfaces for core LDAP requests.
- */
-package org.forgerock.opendj.ldap.requests;
-
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableExtendedResultImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableExtendedResultImpl.java
deleted file mode 100644
index 100cd8385..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableExtendedResultImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * An abstract unmodifiable Extended result which can be used as the basis for
- * implementing new unmodifiable Extended operations.
- *
- * @param
- * The type of Extended result.
- */
-abstract class AbstractUnmodifiableExtendedResultImpl extends
- AbstractUnmodifiableResultImpl implements ExtendedResult {
- AbstractUnmodifiableExtendedResultImpl(final S impl) {
- super(impl);
- }
-
- @Override
- public String getOID() {
- return impl.getOID();
- }
-
- @Override
- public ByteString getValue() {
- return impl.getValue();
- }
-
- @Override
- public boolean hasValue() {
- return impl.hasValue();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableIntermediateResponseImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableIntermediateResponseImpl.java
deleted file mode 100644
index dc98f24d7..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/AbstractUnmodifiableIntermediateResponseImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * An abstract unmodifiable Intermediate response which can be used as the basis
- * for implementing new unmodifiable Intermediate responses.
- *
- * @param
- * The type of Intermediate response.
- */
-abstract class AbstractUnmodifiableIntermediateResponseImpl extends
- AbstractUnmodifiableResponseImpl implements IntermediateResponse {
- AbstractUnmodifiableIntermediateResponseImpl(final S impl) {
- super(impl);
- }
-
- @Override
- public String getOID() {
- return impl.getOID();
- }
-
- @Override
- public ByteString getValue() {
- return impl.getValue();
- }
-
- @Override
- public boolean hasValue() {
- return impl.hasValue();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableBindResultImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableBindResultImpl.java
deleted file mode 100644
index 14ef66650..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableBindResultImpl.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * Unmodifiable Bind result implementation.
- */
-class UnmodifiableBindResultImpl extends AbstractUnmodifiableResultImpl implements
- BindResult {
- UnmodifiableBindResultImpl(final BindResult impl) {
- super(impl);
- }
-
- @Override
- public ByteString getServerSASLCredentials() {
- return impl.getServerSASLCredentials();
- }
-
- @Override
- public boolean isSASLBindInProgress() {
- return impl.isSASLBindInProgress();
- }
-
- @Override
- public BindResult setServerSASLCredentials(final ByteString credentials) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableCompareResultImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableCompareResultImpl.java
deleted file mode 100644
index 021776a84..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableCompareResultImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-/**
- * Unmodifiable Compare result implementation.
- */
-class UnmodifiableCompareResultImpl extends AbstractUnmodifiableResultImpl implements
- CompareResult {
- UnmodifiableCompareResultImpl(final CompareResult impl) {
- super(impl);
- }
-
- @Override
- public boolean matched() {
- return impl.matched();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableGenericExtendedResultImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableGenericExtendedResultImpl.java
deleted file mode 100644
index d5b815607..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableGenericExtendedResultImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-/**
- * Unmodifiable Generic extended result implementation.
- */
-class UnmodifiableGenericExtendedResultImpl extends
- AbstractUnmodifiableExtendedResultImpl implements ExtendedResult,
- GenericExtendedResult {
- UnmodifiableGenericExtendedResultImpl(final GenericExtendedResult impl) {
- super(impl);
- }
-
- @Override
- public GenericExtendedResult setOID(final String oid) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public GenericExtendedResult setValue(final Object value) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableGenericIntermediateResponseImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableGenericIntermediateResponseImpl.java
deleted file mode 100644
index fb1e5799d..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableGenericIntermediateResponseImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-/**
- * Unmodifiable Generic extended result implementation.
- */
-class UnmodifiableGenericIntermediateResponseImpl extends
- AbstractUnmodifiableIntermediateResponseImpl implements
- GenericIntermediateResponse {
- UnmodifiableGenericIntermediateResponseImpl(final GenericIntermediateResponse impl) {
- super(impl);
- }
-
- @Override
- public GenericIntermediateResponse setOID(final String oid) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public GenericIntermediateResponse setValue(final Object value) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiablePasswordModifyExtendedResultImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiablePasswordModifyExtendedResultImpl.java
deleted file mode 100644
index f7960ed6d..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiablePasswordModifyExtendedResultImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-/**
- * Unmodifiable Password modify extended result implementation.
- */
-class UnmodifiablePasswordModifyExtendedResultImpl extends
- AbstractUnmodifiableExtendedResultImpl implements
- PasswordModifyExtendedResult {
- UnmodifiablePasswordModifyExtendedResultImpl(final PasswordModifyExtendedResult impl) {
- super(impl);
- }
-
- @Override
- public byte[] getGeneratedPassword() {
- return impl.getGeneratedPassword();
- }
-
- @Override
- public PasswordModifyExtendedResult setGeneratedPassword(final byte[] password) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public PasswordModifyExtendedResult setGeneratedPassword(final char[] password) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableResultImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableResultImpl.java
deleted file mode 100644
index 8bd82bfbc..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableResultImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-/**
- * A unmodifiable generic result indicates the final status of an operation.
- */
-class UnmodifiableResultImpl extends AbstractUnmodifiableResultImpl implements Result {
- UnmodifiableResultImpl(final Result impl) {
- super(impl);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableSearchResultReferenceImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableSearchResultReferenceImpl.java
deleted file mode 100644
index 6fb4116f8..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableSearchResultReferenceImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-import java.util.List;
-
-/**
- * Unmodifiable Search result reference implementation.
- */
-class UnmodifiableSearchResultReferenceImpl extends
- AbstractUnmodifiableResponseImpl implements SearchResultReference {
- UnmodifiableSearchResultReferenceImpl(final SearchResultReference impl) {
- super(impl);
- }
-
- @Override
- public SearchResultReference addURI(final String uri) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public List getURIs() {
- return impl.getURIs();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableWhoAmIExtendedResultImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableWhoAmIExtendedResultImpl.java
deleted file mode 100644
index d4339327b..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/UnmodifiableWhoAmIExtendedResultImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-/**
- * Unmodifiable Who Am I extended result implementation.
- */
-class UnmodifiableWhoAmIExtendedResultImpl extends
- AbstractUnmodifiableExtendedResultImpl implements
- WhoAmIExtendedResult {
- UnmodifiableWhoAmIExtendedResultImpl(final WhoAmIExtendedResult impl) {
- super(impl);
- }
-
- @Override
- public String getAuthorizationID() {
- return impl.getAuthorizationID();
- }
-
- @Override
- public WhoAmIExtendedResult setAuthorizationID(final String authorizationID) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/package-info.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/package-info.java
deleted file mode 100755
index 721ed0de0..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/responses/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-/**
- * Classes and interfaces for core LDAP responses.
- */
-package org.forgerock.opendj.ldap.responses;
-
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSyntaxImpl.java
deleted file mode 100644
index 7fefd8653..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSyntaxImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-/**
- * This class defines the set of methods and structures that must be implemented
- * to define a new attribute syntax.
- */
-abstract class AbstractSyntaxImpl implements SyntaxImpl {
- AbstractSyntaxImpl() {
- // Nothing to do.
- }
-
- public String getApproximateMatchingRule() {
- return null;
- }
-
- public String getEqualityMatchingRule() {
- return null;
- }
-
- public String getOrderingMatchingRule() {
- return null;
- }
-
- public String getSubstringMatchingRule() {
- return null;
- }
-
- public boolean isBEREncodingRequired() {
- return false;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/BinarySyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/BinarySyntaxImpl.java
deleted file mode 100644
index 03941283c..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/BinarySyntaxImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.OMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_BINARY_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class defines the binary attribute syntax, which is essentially a byte
- * array using very strict matching. Equality, ordering, and substring matching
- * will be allowed by default.
- */
-final class BinarySyntaxImpl extends AbstractSyntaxImpl {
- @Override
- public String getEqualityMatchingRule() {
- return EMR_OCTET_STRING_OID;
- }
-
- public String getName() {
- return SYNTAX_BINARY_NAME;
- }
-
- @Override
- public String getOrderingMatchingRule() {
- return OMR_OCTET_STRING_OID;
- }
-
- public boolean isHumanReadable() {
- return false;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // All values will be acceptable for the binary syntax.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/BooleanSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/BooleanSyntaxImpl.java
deleted file mode 100644
index 4e59cc1fa..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/BooleanSyntaxImpl.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static com.forgerock.opendj.ldap.CoreMessages.WARN_ATTR_SYNTAX_ILLEGAL_BOOLEAN;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_BOOLEAN_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_BOOLEAN_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class defines the Boolean attribute syntax, which only allows values of
- * "TRUE" or "FALSE" (although this implementation is more flexible and will
- * also allow "YES", "ON", or "1" instead of "TRUE", or "NO", "OFF", or "0"
- * instead of "FALSE"). Only equality matching is allowed by default for this
- * syntax.
- */
-final class BooleanSyntaxImpl extends AbstractSyntaxImpl {
- @Override
- public String getEqualityMatchingRule() {
- return EMR_BOOLEAN_OID;
- }
-
- public String getName() {
- return SYNTAX_BOOLEAN_NAME;
- }
-
- public boolean isHumanReadable() {
- return true;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- final String valueString = value.toString().toUpperCase();
-
- if (!"TRUE".equals(valueString) && !"YES".equals(valueString)
- && !"ON".equals(valueString) && !"1".equals(valueString)
- && !"FALSE".equals(valueString) && !"NO".equals(valueString)
- && !"OFF".equals(valueString) && !"0".equals(valueString)) {
- invalidReason.append(WARN_ATTR_SYNTAX_ILLEGAL_BOOLEAN.get(value.toString()));
- }
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseExactEqualityMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseExactEqualityMatchingRuleImpl.java
deleted file mode 100644
index c1838469c..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseExactEqualityMatchingRuleImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-import static com.forgerock.opendj.util.StringPrepProfile.*;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-/**
- * This class defines the caseExactMatch matching rule defined in X.520 and
- * referenced in RFC 4519.
- */
-final class CaseExactEqualityMatchingRuleImpl extends AbstractEqualityMatchingRuleImpl {
-
- CaseExactEqualityMatchingRuleImpl() {
- super(EMR_CASE_EXACT_NAME);
- }
-
- @Override
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return SchemaUtils.normalizeStringAttributeValue(value, TRIM, NO_CASE_FOLD);
- }
-
- @Override
- public String keyToHumanReadableString(ByteSequence key) {
- return key.toString();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseExactOrderingMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseExactOrderingMatchingRuleImpl.java
deleted file mode 100644
index ea7084d51..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseExactOrderingMatchingRuleImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-import static com.forgerock.opendj.util.StringPrepProfile.*;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-/**
- * This class defines the caseExactOrderingMatch matching rule defined in X.520
- * and referenced in RFC 4519.
- */
-final class CaseExactOrderingMatchingRuleImpl extends AbstractOrderingMatchingRuleImpl {
-
- public CaseExactOrderingMatchingRuleImpl() {
- // Reusing equality index since OPENDJ-1864
- super(EMR_CASE_EXACT_NAME);
- }
-
- @Override
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return SchemaUtils.normalizeStringAttributeValue(value, TRIM, NO_CASE_FOLD);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreEqualityMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreEqualityMatchingRuleImpl.java
deleted file mode 100644
index 271e48392..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreEqualityMatchingRuleImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static com.forgerock.opendj.util.StringPrepProfile.*;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * This class defines the caseIgnoreMatch matching rule defined in X.520 and
- * referenced in RFC 2252.
- */
-final class CaseIgnoreEqualityMatchingRuleImpl extends AbstractEqualityMatchingRuleImpl {
-
- CaseIgnoreEqualityMatchingRuleImpl() {
- super(EMR_CASE_IGNORE_NAME);
- }
-
- @Override
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return SchemaUtils.normalizeStringAttributeValue(value, TRIM, CASE_FOLD);
- }
-
- @Override
- public String keyToHumanReadableString(ByteSequence key) {
- return key.toString();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreListEqualityMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreListEqualityMatchingRuleImpl.java
deleted file mode 100644
index fbec64405..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreListEqualityMatchingRuleImpl.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static com.forgerock.opendj.util.StringPrepProfile.CASE_FOLD;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-import static com.forgerock.opendj.util.StringPrepProfile.*;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-/**
- * This class implements the caseIgnoreListMatch matching rule defined in X.520
- * and referenced in RFC 2252.
- */
-final class CaseIgnoreListEqualityMatchingRuleImpl extends AbstractEqualityMatchingRuleImpl {
-
- CaseIgnoreListEqualityMatchingRuleImpl() {
- super(EMR_CASE_IGNORE_LIST_NAME);
- }
-
- @Override
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return SchemaUtils.normalizeStringListAttributeValue(value, TRIM, CASE_FOLD);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreOrderingMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreOrderingMatchingRuleImpl.java
deleted file mode 100644
index dae024d95..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CaseIgnoreOrderingMatchingRuleImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-import static com.forgerock.opendj.util.StringPrepProfile.*;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-/**
- * This class defines the caseIgnoreOrderingMatch matching rule defined in X.520
- * and referenced in RFC 2252.
- */
-final class CaseIgnoreOrderingMatchingRuleImpl extends AbstractOrderingMatchingRuleImpl {
-
- public CaseIgnoreOrderingMatchingRuleImpl() {
- // Reusing equality index since OPENDJ-1864
- super(EMR_CASE_IGNORE_NAME);
- }
-
- @Override
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return SchemaUtils.normalizeStringAttributeValue(value, TRIM, CASE_FOLD);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificateExactAssertionSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificateExactAssertionSyntaxImpl.java
deleted file mode 100644
index c16179933..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificateExactAssertionSyntaxImpl.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions Copyright 2014 Manuel Gaupp
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_CERTIFICATE_EXACT_ASSERTION_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class defines the Certificate Exact Assertion attribute syntax, which
- * contains components for matching X.509 certificates.
- */
-final class CertificateExactAssertionSyntaxImpl extends AbstractSyntaxImpl {
-
- /** {@inheritDoc} */
- public String getName() {
- return SYNTAX_CERTIFICATE_EXACT_ASSERTION_NAME;
- }
-
- /** {@inheritDoc} */
- @Override
- public boolean isBEREncodingRequired() {
- return false;
- }
-
- /** {@inheritDoc} */
- public boolean isHumanReadable() {
- return true;
- }
-
- /** {@inheritDoc} */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // This method will never be called because this syntax is only used
- // within assertions.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificateListSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificateListSyntaxImpl.java
deleted file mode 100644
index a5af1f8ea..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificateListSyntaxImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.OMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_CERTLIST_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class implements the certificate list attribute syntax. This should be
- * restricted to holding only X.509 certificate lists, but we will accept any
- * set of bytes. It will be treated much like the octet string attribute syntax.
- */
-final class CertificateListSyntaxImpl extends AbstractSyntaxImpl {
-
- @Override
- public String getEqualityMatchingRule() {
- return EMR_OCTET_STRING_OID;
- }
-
- public String getName() {
- return SYNTAX_CERTLIST_NAME;
- }
-
- @Override
- public String getOrderingMatchingRule() {
- return OMR_OCTET_STRING_OID;
- }
-
- @Override
- public boolean isBEREncodingRequired() {
- return true;
- }
-
- public boolean isHumanReadable() {
- return false;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // All values will be acceptable for the certificate list syntax.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificatePairSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificatePairSyntaxImpl.java
deleted file mode 100644
index 91f91e8b1..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/CertificatePairSyntaxImpl.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.OMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_CERTPAIR_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class implements the certificate pair attribute syntax. This should be
- * restricted to holding only X.509 certificate pairs, but we will accept any
- * set of bytes. It will be treated much like the octet string attribute syntax.
- */
-final class CertificatePairSyntaxImpl extends AbstractSyntaxImpl {
- @Override
- public String getEqualityMatchingRule() {
- return EMR_OCTET_STRING_OID;
- }
-
- public String getName() {
- return SYNTAX_CERTPAIR_NAME;
- }
-
- @Override
- public String getOrderingMatchingRule() {
- return OMR_OCTET_STRING_OID;
- }
-
- @Override
- public boolean isBEREncodingRequired() {
- return true;
- }
-
- public boolean isHumanReadable() {
- return false;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // All values will be acceptable for the certificate pair syntax.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ConflictingSchemaElementException.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ConflictingSchemaElementException.java
deleted file mode 100644
index deb526ae5..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ConflictingSchemaElementException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizedIllegalArgumentException;
-
-/**
- * Thrown when addition of a schema element to a schema builder fails because
- * the OID of the schema element conflicts with an existing schema element and
- * the caller explicitly requested not to override existing schema elements.
- */
-@SuppressWarnings("serial")
-public class ConflictingSchemaElementException extends LocalizedIllegalArgumentException {
- /**
- * Creates a new conflicting schema element exception with the provided
- * message.
- *
- * @param message
- * The message that explains the problem that occurred.
- */
- public ConflictingSchemaElementException(final LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DelayedSchema.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DelayedSchema.java
deleted file mode 100644
index 30ae44a97..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DelayedSchema.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2011-2014 ForgeRock AS
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-/**
- * This class is used to maintain a reference to the global schemas and avoids
- * having to reference the core schema in the {@link Schema} class since this
- * can cause initialization errors because the CoreSchema depends on Schema.
- */
-final class DelayedSchema {
- static final Schema EMPTY_SCHEMA = new SchemaBuilder("Empty Schema").toSchema().asNonStrictSchema();
- static volatile Schema defaultSchema = Schema.getCoreSchema();
-
- private DelayedSchema() {
- // Prevent instantiation.
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/FaxSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/FaxSyntaxImpl.java
deleted file mode 100644
index 58460c395..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/FaxSyntaxImpl.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.OMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_FAX_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class implements the fax attribute syntax. This should be restricted to
- * holding only fax message contents, but we will accept any set of bytes. It
- * will be treated much like the octet string attribute syntax.
- */
-final class FaxSyntaxImpl extends AbstractSyntaxImpl {
-
- @Override
- public String getEqualityMatchingRule() {
- return EMR_OCTET_STRING_OID;
- }
-
- public String getName() {
- return SYNTAX_FAX_NAME;
- }
-
- @Override
- public String getOrderingMatchingRule() {
- return OMR_OCTET_STRING_OID;
- }
-
- public boolean isHumanReadable() {
- return false;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // All values will be acceptable for the fax syntax.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/GeneralizedTimeOrderingMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/GeneralizedTimeOrderingMatchingRuleImpl.java
deleted file mode 100644
index 3107ae036..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/GeneralizedTimeOrderingMatchingRuleImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2012-2015 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-import org.forgerock.opendj.ldap.DecodeException;
-
-/**
- * This class defines the generalizedTimeOrderingMatch matching rule defined in
- * X.520 and referenced in RFC 2252.
- */
-final class GeneralizedTimeOrderingMatchingRuleImpl extends AbstractOrderingMatchingRuleImpl {
-
- GeneralizedTimeOrderingMatchingRuleImpl() {
- // Reusing equality index since OPENDJ-1864
- super(EMR_GENERALIZED_TIME_NAME);
- }
-
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) throws DecodeException {
- return GeneralizedTimeEqualityMatchingRuleImpl.normalizeAttributeValue(value);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/GenerateCoreSchema.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/GenerateCoreSchema.java
deleted file mode 100644
index 71ed13d7b..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/GenerateCoreSchema.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions Copyright 2014 Manuel Gaupp
- * Portions Copyright 2015 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-/**
- * Tool for generating CoreSchema.java.
- */
-final class GenerateCoreSchema {
- private static final Set ABBREVIATIONS = new HashSet<>(Arrays.asList("SASL",
- "LDAP", "DN", "DIT", "RDN", "JPEG", "OID", "UUID", "IA5", "UID", "UTC", "X500", "X121",
- "C", "CN", "O", "OU", "L", "DC", "ISDN", "SN", "ST"));
-
- /**
- * Tool for generating CoreSchema.java.
- *
- * @param args
- * The command line arguments (none required).
- */
- public static void main(final String[] args) {
- testSplitNameIntoWords();
-
- final Schema schema = Schema.getCoreSchema();
-
- final SortedMap syntaxes = new TreeMap<>();
- for (final Syntax syntax : schema.getSyntaxes()) {
- if (isOpenDSOID(syntax.getOID())) {
- continue;
- }
-
- final String name = syntax.getDescription().replaceAll(" Syntax$", "");
- final String fieldName = name.replace(" ", "_").replaceAll("[.-]", "")
- .toUpperCase(Locale.ENGLISH).concat("_SYNTAX");
- syntaxes.put(fieldName, syntax);
- }
-
- final SortedMap matchingRules = new TreeMap<>();
- for (final MatchingRule matchingRule : schema.getMatchingRules()) {
- if (isOpenDSOID(matchingRule.getOID()) || isCollationMatchingRule(matchingRule.getOID())) {
- continue;
- }
-
- final String name = matchingRule.getNameOrOID().replaceAll("Match$", "");
- final String fieldName = splitNameIntoWords(name).concat("_MATCHING_RULE");
- matchingRules.put(fieldName, matchingRule);
- }
-
- final SortedMap attributeTypes = new TreeMap<>();
- for (final AttributeType attributeType : schema.getAttributeTypes()) {
- if (isOpenDSOID(attributeType.getOID())) {
- continue;
- }
- final String name = attributeType.getNameOrOID();
- final String fieldName = splitNameIntoWords(name).concat("_ATTRIBUTE_TYPE");
- attributeTypes.put(fieldName, attributeType);
- }
-
- final SortedMap objectClasses = new TreeMap<>();
- for (final ObjectClass objectClass : schema.getObjectClasses()) {
- if (isOpenDSOID(objectClass.getOID())) {
- continue;
- }
- final String name = objectClass.getNameOrOID();
- final String fieldName = splitNameIntoWords(name.replace("-", "")).concat("_OBJECT_CLASS");
-
- objectClasses.put(fieldName, objectClass);
- }
-
- System.out.println("/*");
- System.out.println(" * CDDL HEADER START");
- System.out.println(" *");
- System.out.println(" * The contents of this file are subject to the terms of the");
- System.out.println(" * Common Development and Distribution License, Version 1.0 only");
- System.out.println(" * (the \"License\"). You may not use this file except in compliance");
- System.out.println(" * with the License.");
- System.out.println(" *");
- System.out.println(" * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt");
- System.out.println(" * or http://forgerock.org/license/CDDLv1.0.html.");
- System.out.println(" * See the License for the specific language governing permissions");
- System.out.println(" * and limitations under the License.");
- System.out.println(" *");
- System.out.println(" * When distributing Covered Code, include this CDDL HEADER in each");
- System.out.println(" * file and include the License file at legal-notices/CDDLv1_0.txt.");
- System.out.println(" * If applicable, add the following below this CDDL HEADER, with the");
- System.out.println(" * fields enclosed by brackets \"[]\" replaced with your own identifying");
- System.out.println(" * information:");
- System.out.println(" * Portions Copyright [yyyy] [name of copyright owner]");
- System.out.println(" *");
- System.out.println(" * CDDL HEADER END");
- System.out.println(" *");
- System.out.println(" *");
- System.out.println(" * Copyright 2009 Sun Microsystems, Inc.");
- final int year = Calendar.getInstance().get(Calendar.YEAR);
- System.out.println(" * Portions copyright 2014" + (year > 2014 ? "-" + year : "") + " ForgeRock AS");
- System.out.println(" */");
- System.out.println("package org.forgerock.opendj.ldap.schema;");
- System.out.println();
- System.out.println();
- System.out.println("// DON'T EDIT THIS FILE!");
- System.out.println("// It is automatically generated using GenerateCoreSchema class.");
- System.out.println();
- System.out.println("/**");
- System.out.println(" * The OpenDJ SDK core schema contains standard LDAP "
- + "RFC schema elements. These include:");
- System.out.println(" * ");
- System.out.println(" * ");
- System.out.println(" * The core schema is non-strict: attempts to retrieve");
- System.out.println(" * non-existent Attribute Types will return a temporary");
- System.out.println(" * Attribute Type having the Octet String syntax.");
- System.out.println(" */");
- System.out.println("public final class CoreSchema {");
-
- System.out.println(" // Core Syntaxes");
- for (final Map.Entry syntax : syntaxes.entrySet()) {
- System.out.println(" private static final Syntax " + syntax.getKey() + " =");
- System.out.println(" CoreSchemaImpl.getInstance().getSyntax(\""
- + syntax.getValue().getOID() + "\");");
- }
-
- System.out.println();
- System.out.println(" // Core Matching Rules");
- for (final Map.Entry matchingRule : matchingRules.entrySet()) {
- System.out.println(" private static final MatchingRule " + matchingRule.getKey()
- + " =");
- System.out.println(" CoreSchemaImpl.getInstance().getMatchingRule(\""
- + matchingRule.getValue().getOID() + "\");");
- }
-
- System.out.println();
- System.out.println(" // Core Attribute Types");
- for (final Map.Entry attributeType : attributeTypes.entrySet()) {
- System.out.println(" private static final AttributeType " + attributeType.getKey()
- + " =");
- System.out.println(" CoreSchemaImpl.getInstance().getAttributeType(\""
- + attributeType.getValue().getOID() + "\");");
- }
-
- System.out.println();
- System.out.println(" // Core Object Classes");
- for (final Map.Entry objectClass : objectClasses.entrySet()) {
- System.out.println(" private static final ObjectClass " + objectClass.getKey() + " =");
- System.out.println(" CoreSchemaImpl.getInstance().getObjectClass(\""
- + objectClass.getValue().getOID() + "\");");
- }
-
- System.out.println();
- System.out.println(" // Prevent instantiation");
- System.out.println(" private CoreSchema() {");
- System.out.println(" // Nothing to do.");
- System.out.println(" }");
-
- System.out.println();
- System.out.println(" /**");
- System.out.println(" * Returns a reference to the singleton core schema.");
- System.out.println(" *");
- System.out.println(" * @return The core schema.");
- System.out.println(" */");
- System.out.println(" public static Schema getInstance() {");
- System.out.println(" return CoreSchemaImpl.getInstance();");
- System.out.println(" }");
-
- for (final Map.Entry syntax : syntaxes.entrySet()) {
- System.out.println();
-
- final String description =
- toCodeJavaDoc(syntax.getValue().getDescription().replaceAll(" Syntax$", "")
- + " Syntax");
- System.out.println(" /**");
- System.out.println(" * Returns a reference to the " + description);
- System.out.println(" * which has the OID "
- + toCodeJavaDoc(syntax.getValue().getOID()) + ".");
- System.out.println(" *");
- System.out.println(" * @return A reference to the " + description + ".");
-
- System.out.println(" */");
- System.out.println(" public static Syntax get" + toJavaName(syntax.getKey()) + "() {");
- System.out.println(" return " + syntax.getKey() + ";");
- System.out.println(" }");
- }
-
- for (final Map.Entry matchingRule : matchingRules.entrySet()) {
- System.out.println();
-
- final String description = toCodeJavaDoc(matchingRule.getValue().getNameOrOID());
- System.out.println(" /**");
- System.out.println(" * Returns a reference to the " + description + " Matching Rule");
- System.out.println(" * which has the OID "
- + toCodeJavaDoc(matchingRule.getValue().getOID()) + ".");
- System.out.println(" *");
- System.out.println(" * @return A reference to the " + description + " Matching Rule.");
-
- System.out.println(" */");
- System.out.println(" public static MatchingRule get" + toJavaName(matchingRule.getKey()) + "() {");
- System.out.println(" return " + matchingRule.getKey() + ";");
- System.out.println(" }");
- }
-
- for (final Map.Entry attributeType : attributeTypes.entrySet()) {
- System.out.println();
-
- final String description = toCodeJavaDoc(attributeType.getValue().getNameOrOID());
- System.out.println(" /**");
- System.out.println(" * Returns a reference to the " + description + " Attribute Type");
- System.out.println(" * which has the OID "
- + toCodeJavaDoc(attributeType.getValue().getOID()) + ".");
- System.out.println(" *");
- System.out.println(" * @return A reference to the " + description + " Attribute Type.");
-
- System.out.println(" */");
- System.out.println(" public static AttributeType get"
- + toJavaName(attributeType.getKey()) + "() {");
- System.out.println(" return " + attributeType.getKey() + ";");
- System.out.println(" }");
- }
-
- for (final Map.Entry objectClass : objectClasses.entrySet()) {
- System.out.println();
-
- final String description = toCodeJavaDoc(objectClass.getValue().getNameOrOID());
- System.out.println(" /**");
- System.out.println(" * Returns a reference to the " + description + " Object Class");
- System.out.println(" * which has the OID "
- + toCodeJavaDoc(objectClass.getValue().getOID()) + ".");
- System.out.println(" *");
- System.out.println(" * @return A reference to the " + description + " Object Class.");
-
- System.out.println(" */");
- System.out.println(" public static ObjectClass get" + toJavaName(objectClass.getKey())
- + "() {");
- System.out.println(" return " + objectClass.getKey() + ";");
- System.out.println(" }");
- }
-
- System.out.println("}");
- }
-
- private static boolean isOpenDSOID(final String oid) {
- return oid.startsWith(SchemaConstants.OID_OPENDS_SERVER_BASE + ".");
- }
-
- private static boolean isCollationMatchingRule(final String oid) {
- return oid.startsWith("1.3.6.1.4.1.42.2.27.9.4.");
- }
-
- private static String splitNameIntoWords(final String name) {
- String splitName = name.replaceAll("([A-Z][a-z])", "_$1");
- splitName = splitName.replaceAll("([a-z])([A-Z])", "$1_$2");
- splitName = splitName.replaceAll("[-.]", "");
-
- return splitName.toUpperCase(Locale.ENGLISH);
- }
-
- private static void testSplitNameIntoWords() {
- final String[][] values =
- new String[][] { { "oneTwoThree", "ONE_TWO_THREE" },
- { "oneTWOThree", "ONE_TWO_THREE" }, { "oneX500Three", "ONE_X500_THREE" },
- { "oneTwoX500", "ONE_TWO_X500" }, { "oneTwoX500", "ONE_TWO_X500" },
- { "x500TwoThree", "X500_TWO_THREE" }, };
-
- for (final String[] test : values) {
- final String actual = splitNameIntoWords(test[0]);
- final String expected = test[1];
- if (!actual.equals(expected)) {
- System.out.println("Test Split Failure: " + test[0] + " -> " + actual + " != "
- + expected);
- }
- }
- }
-
- private static String toCodeJavaDoc(final String text) {
- return String.format("{@code %s}", text);
- }
-
- private static String toJavaName(final String splitName) {
- final StringBuilder builder = new StringBuilder();
- for (final String word : splitName.split("_")) {
- if (ABBREVIATIONS.contains(word)) {
- builder.append(word);
- } else {
- builder.append(word.charAt(0));
- if (word.length() > 1) {
- builder.append(word.substring(1).toLowerCase(Locale.ENGLISH));
- }
- }
- }
- return builder.toString();
- }
-
- private GenerateCoreSchema() {
- // Prevent instantiation.
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringEqualityMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringEqualityMatchingRuleImpl.java
deleted file mode 100644
index dcc75fcb1..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringEqualityMatchingRuleImpl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * This class implements the numericStringMatch matching rule defined in X.520
- * and referenced in RFC 2252. It allows for values with numeric digits and
- * spaces, but ignores spaces when performing matching.
- */
-final class NumericStringEqualityMatchingRuleImpl extends AbstractEqualityMatchingRuleImpl {
-
- NumericStringEqualityMatchingRuleImpl() {
- super(EMR_NUMERIC_STRING_NAME);
- }
-
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return SchemaUtils.normalizeNumericStringAttributeValue(value);
- }
-
- @Override
- public String keyToHumanReadableString(ByteSequence key) {
- return key.toString();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringOrderingMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringOrderingMatchingRuleImpl.java
deleted file mode 100644
index 2b9bc3f9f..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringOrderingMatchingRuleImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * This implements defines the numericStringOrderingMatch matching rule defined
- * in X.520 and referenced in RFC 2252.
- */
-final class NumericStringOrderingMatchingRuleImpl extends AbstractOrderingMatchingRuleImpl {
-
- NumericStringOrderingMatchingRuleImpl() {
- // Reusing equality index since OPENDJ-1864
- super(EMR_NUMERIC_STRING_NAME);
- }
-
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return SchemaUtils.normalizeNumericStringAttributeValue(value);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringSubstringMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringSubstringMatchingRuleImpl.java
deleted file mode 100644
index 2d06bf492..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NumericStringSubstringMatchingRuleImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * This class implements the numericStringSubstringsMatch matching rule defined
- * in X.520 and referenced in RFC 2252.
- */
-final class NumericStringSubstringMatchingRuleImpl extends AbstractSubstringMatchingRuleImpl {
-
- NumericStringSubstringMatchingRuleImpl() {
- super(SMR_NUMERIC_STRING_NAME, EMR_NUMERIC_STRING_NAME);
- }
-
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return SchemaUtils.normalizeNumericStringAttributeValue(value);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringEqualityMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringEqualityMatchingRuleImpl.java
deleted file mode 100644
index 5e0e02a52..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringEqualityMatchingRuleImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * This class defines the octetStringMatch matching rule defined in X.520. It
- * will be used as the default equality matching rule for the binary and octet
- * string syntaxes.
- */
-final class OctetStringEqualityMatchingRuleImpl extends AbstractEqualityMatchingRuleImpl {
-
- OctetStringEqualityMatchingRuleImpl() {
- super(EMR_OCTET_STRING_NAME);
- }
-
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return value.toByteString();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringOrderingMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringOrderingMatchingRuleImpl.java
deleted file mode 100644
index f0e9c9f9c..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringOrderingMatchingRuleImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2015 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * This class defines the octetStringOrderingMatch matching rule defined in
- * X.520. This will be the default ordering matching rule for the binary and
- * octet string syntaxes.
- */
-final class OctetStringOrderingMatchingRuleImpl extends AbstractOrderingMatchingRuleImpl {
-
- OctetStringOrderingMatchingRuleImpl() {
- // Reusing equality index since OPENDJ-1864
- super(EMR_OCTET_STRING_NAME);
- }
-
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return value.toByteString();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringSubstringMatchingRuleImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringSubstringMatchingRuleImpl.java
deleted file mode 100644
index 12d9fee19..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringSubstringMatchingRuleImpl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions Copyright 2015 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.opendj.ldap.ByteSequence;
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * This class defines the octetStringSubstringsMatch matching rule defined in
- * X.520. It will be used as the default substring matching rule for the binary
- * and octet string syntaxes.
- */
-final class OctetStringSubstringMatchingRuleImpl extends AbstractSubstringMatchingRuleImpl {
-
- OctetStringSubstringMatchingRuleImpl() {
- super(SMR_OCTET_STRING_NAME, EMR_OCTET_STRING_NAME);
- }
-
- public ByteString normalizeAttributeValue(final Schema schema, final ByteSequence value) {
- return value.toByteString();
- }
-
- @Override
- String keyToHumanReadableString(ByteSequence key) {
- return key.toByteString().toHexString();
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringSyntaxImpl.java
deleted file mode 100644
index d378b70ec..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/OctetStringSyntaxImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.OMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_OCTET_STRING_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class implements the octet string attribute syntax, which is equivalent
- * to the binary syntax and should be considered a replacement for it. Equality,
- * ordering, and substring matching will be allowed by default.
- */
-final class OctetStringSyntaxImpl extends AbstractSyntaxImpl {
- @Override
- public String getEqualityMatchingRule() {
- return EMR_OCTET_STRING_OID;
- }
-
- public String getName() {
- return SYNTAX_OCTET_STRING_NAME;
- }
-
- @Override
- public String getOrderingMatchingRule() {
- return OMR_OCTET_STRING_OID;
- }
-
- public boolean isHumanReadable() {
- return true;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // All values will be acceptable for the octet string syntax.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/PostalAddressSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/PostalAddressSyntaxImpl.java
deleted file mode 100644
index 4a9b15e62..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/PostalAddressSyntaxImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_CASE_IGNORE_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SMR_CASE_IGNORE_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_POSTAL_ADDRESS_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class implements the postal address attribute syntax, which is a list of
- * UCS (Universal Character Set, as defined in the ISO 10646 specification and
- * includes UTF-8 and UTF-16) strings separated by dollar signs. By default,
- * they will be treated in a case-insensitive manner, and equality and substring
- * matching will be allowed.
- */
-final class PostalAddressSyntaxImpl extends AbstractSyntaxImpl {
-
- @Override
- public String getEqualityMatchingRule() {
- return EMR_CASE_IGNORE_OID;
- }
-
- public String getName() {
- return SYNTAX_POSTAL_ADDRESS_NAME;
- }
-
- @Override
- public String getSubstringMatchingRule() {
- return SMR_CASE_IGNORE_OID;
- }
-
- public boolean isHumanReadable() {
- return true;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // We'll allow any value.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/PresentationAddressSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/PresentationAddressSyntaxImpl.java
deleted file mode 100644
index e708a2064..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/PresentationAddressSyntaxImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class implements the presentation address attribute syntax, which is
- * defined in RFC 1278. However, because this LDAP syntax is being deprecated,
- * this implementation behaves exactly like the directory string syntax.
- */
-final class PresentationAddressSyntaxImpl extends AbstractSyntaxImpl {
- @Override
- public String getApproximateMatchingRule() {
- return AMR_DOUBLE_METAPHONE_OID;
- }
-
- @Override
- public String getEqualityMatchingRule() {
- return EMR_CASE_IGNORE_OID;
- }
-
- public String getName() {
- return SYNTAX_PRESENTATION_ADDRESS_NAME;
- }
-
- @Override
- public String getOrderingMatchingRule() {
- return OMR_CASE_IGNORE_OID;
- }
-
- @Override
- public String getSubstringMatchingRule() {
- return SMR_CASE_IGNORE_OID;
- }
-
- public boolean isHumanReadable() {
- return true;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // We will accept any value for this syntax.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ProtocolInformationSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ProtocolInformationSyntaxImpl.java
deleted file mode 100644
index 7a5b2b0e1..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ProtocolInformationSyntaxImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.*;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class implements the protocol information attribute syntax, which is
- * being deprecated. As such, this implementation behaves exactly like the
- * directory string syntax.
- */
-final class ProtocolInformationSyntaxImpl extends AbstractSyntaxImpl {
-
- @Override
- public String getApproximateMatchingRule() {
- return AMR_DOUBLE_METAPHONE_OID;
- }
-
- @Override
- public String getEqualityMatchingRule() {
- return EMR_CASE_IGNORE_OID;
- }
-
- public String getName() {
- return SYNTAX_PROTOCOL_INFORMATION_NAME;
- }
-
- @Override
- public String getOrderingMatchingRule() {
- return OMR_CASE_IGNORE_OID;
- }
-
- @Override
- public String getSubstringMatchingRule() {
- return SMR_CASE_IGNORE_OID;
- }
-
- public boolean isHumanReadable() {
- return true;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // We will accept any value for this syntax.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SupportedAlgorithmSyntaxImpl.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SupportedAlgorithmSyntaxImpl.java
deleted file mode 100644
index dbe0ffcfd..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/SupportedAlgorithmSyntaxImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.OMR_OCTET_STRING_OID;
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_SUPPORTED_ALGORITHM_NAME;
-
-import org.forgerock.i18n.LocalizableMessageBuilder;
-import org.forgerock.opendj.ldap.ByteSequence;
-
-/**
- * This class implements the supported algorithm attribute syntax. This should
- * be restricted to holding only X.509 supported algorithms, but we will accept
- * any set of bytes. It will be treated much like the octet string attribute
- * syntax.
- */
-final class SupportedAlgorithmSyntaxImpl extends AbstractSyntaxImpl {
-
- @Override
- public String getEqualityMatchingRule() {
- return EMR_OCTET_STRING_OID;
- }
-
- public String getName() {
- return SYNTAX_SUPPORTED_ALGORITHM_NAME;
- }
-
- @Override
- public String getOrderingMatchingRule() {
- return OMR_OCTET_STRING_OID;
- }
-
- @Override
- public boolean isBEREncodingRequired() {
- return true;
- }
-
- public boolean isHumanReadable() {
- return false;
- }
-
- /**
- * Indicates whether the provided value is acceptable for use in an
- * attribute with this syntax. If it is not, then the reason may be appended
- * to the provided buffer.
- *
- * @param schema
- * The schema in which this syntax is defined.
- * @param value
- * The value for which to make the determination.
- * @param invalidReason
- * The buffer to which the invalid reason should be appended.
- * @return true
if the provided value is acceptable for use
- * with this syntax, or false
if not.
- */
- public boolean valueIsAcceptable(final Schema schema, final ByteSequence value,
- final LocalizableMessageBuilder invalidReason) {
- // All values will be acceptable for the supported algorithm syntax.
- return true;
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/UnknownSchemaElementException.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/UnknownSchemaElementException.java
deleted file mode 100644
index fd9ee3866..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/UnknownSchemaElementException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.schema;
-
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.LocalizedIllegalArgumentException;
-
-/**
- * Thrown when a schema query fails because the requested schema element could
- * not be found or is ambiguous.
- */
-@SuppressWarnings("serial")
-public class UnknownSchemaElementException extends LocalizedIllegalArgumentException {
- /**
- * Creates a new unknown schema element exception with the provided message.
- *
- * @param message
- * The message that explains the problem that occurred.
- */
- public UnknownSchemaElementException(final LocalizableMessage message) {
- super(message);
- }
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/package-info.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/package-info.java
deleted file mode 100755
index 9c4234386..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-/**
- * Classes and interfaces for constructing and querying LDAP schemas.
- */
-package org.forgerock.opendj.ldap.schema;
-
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/IndexingOptions.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/IndexingOptions.java
deleted file mode 100644
index ac8d64f9b..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/IndexingOptions.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2014 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.spi;
-
-/**
- * Contains options indicating how indexing must be performed.
- */
-public interface IndexingOptions {
-
- /**
- * Returns the maximum size to use when building the keys for the
- * "substring" index.
- *
- * @return the maximum size to use when building the keys for the
- * "substring" index.
- */
- int substringKeySize();
-
-
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/Provider.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/Provider.java
deleted file mode 100644
index 2c0487edd..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/Provider.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2013 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.spi;
-
-/**
- * Interface for providers, which provide an implementation of one or more interfaces.
- *
- * A provider must be declared in the provider-configuration file
- * {@code META-INF/services/org.forgerock.opendj.ldap.spi.}
- * in order to allow automatic loading of the implementation classes using the
- * {@code java.util.ServiceLoader} facility.
- */
-public interface Provider {
-
- /**
- * Returns the name of this provider.
- *
- * @return name of provider
- */
- String getName();
-
-}
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/package-info.java b/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/package-info.java
deleted file mode 100644
index b59caf05e..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldap/spi/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2013 ForgeRock AS.
- */
-
-/**
- * Interfaces and classes for service providers.
- */
-package org.forgerock.opendj.ldap.spi;
-
diff --git a/opendj-core/src/main/java/org/forgerock/opendj/ldif/package-info.java b/opendj-core/src/main/java/org/forgerock/opendj/ldif/package-info.java
deleted file mode 100755
index 82f3c53ba..000000000
--- a/opendj-core/src/main/java/org/forgerock/opendj/ldif/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-
-/**
- * Classes and interfaces for reading and writing LDIF.
- */
-package org.forgerock.opendj.ldif;
-
diff --git a/opendj-core/src/test/java/com/forgerock/opendj/util/UtilTestCase.java b/opendj-core/src/test/java/com/forgerock/opendj/util/UtilTestCase.java
deleted file mode 100644
index 3cb63ede2..000000000
--- a/opendj-core/src/test/java/com/forgerock/opendj/util/UtilTestCase.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package com.forgerock.opendj.util;
-
-import org.forgerock.testng.ForgeRockTestCase;
-import org.testng.annotations.Test;
-
-/**
- * An abstract class that all util unit tests should extend. Util represents the
- * classes found directly under the package org.forgerock.opendj.ldap.util.
- */
-@Test(groups = { "precommit", "util", "sdk" })
-public abstract class UtilTestCase extends ForgeRockTestCase {
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1ByteSequenceReaderTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1ByteSequenceReaderTestCase.java
deleted file mode 100644
index 30f416e72..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1ByteSequenceReaderTestCase.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS
- */
-
-package org.forgerock.opendj.io;
-
-import org.forgerock.opendj.ldap.ByteSequenceReader;
-import org.forgerock.opendj.ldap.ByteString;
-
-/**
- * Test class for ASN1ByteSequenceReaderTestCase.
- */
-public class ASN1ByteSequenceReaderTestCase extends ASN1ReaderTestCase {
- @Override
- protected ASN1Reader getReader(final byte[] b, final int maxElementSize) {
- final ByteSequenceReader reader = ByteString.wrap(b).asReader();
- return ASN1.getReader(reader, maxElementSize);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1InputStreamReaderTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1InputStreamReaderTestCase.java
deleted file mode 100644
index 406819bf8..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1InputStreamReaderTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS
- */
-package org.forgerock.opendj.io;
-
-import java.io.ByteArrayInputStream;
-
-/**
- * Test class for ASN1InputStreamReader.
- */
-public class ASN1InputStreamReaderTestCase extends ASN1ReaderTestCase {
- @Override
- protected ASN1Reader getReader(final byte[] b, final int maxElementSize) {
- final ByteArrayInputStream inStream = new ByteArrayInputStream(b);
- return new ASN1InputStreamReader(inStream, maxElementSize);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1OutputStreamWriterTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1OutputStreamWriterTestCase.java
deleted file mode 100644
index 8b260de4c..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/io/ASN1OutputStreamWriterTestCase.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2013 ForgeRock AS
- */
-package org.forgerock.opendj.io;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-
-/**
- * Test class for ASN1OutputStreamWriter.
- */
-public class ASN1OutputStreamWriterTestCase extends ASN1WriterTestCase {
- private final ByteArrayOutputStream outStream = new ByteArrayOutputStream();
- private final ASN1Writer writer = new ASN1OutputStreamWriter(outStream, 1);
-
- @Override
- protected byte[] getEncodedBytes() {
- return outStream.toByteArray();
- }
-
- @Override
- protected ASN1Reader getReader(final byte[] encodedBytes) {
- final ByteArrayInputStream inStream = new ByteArrayInputStream(encodedBytes);
- return new ASN1InputStreamReader(inStream, 0);
- }
-
- @Override
- protected ASN1Writer getWriter() {
- outStream.reset();
- return writer;
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/AttributeDescriptionTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/AttributeDescriptionTestCase.java
deleted file mode 100644
index 58e0fb6da..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/AttributeDescriptionTestCase.java
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009-2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertSame;
-import static org.testng.Assert.assertTrue;
-
-import java.util.Iterator;
-
-import org.forgerock.i18n.LocalizedIllegalArgumentException;
-import org.forgerock.opendj.ldap.schema.Schema;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Test {@code AttributeDescription}.
- */
-@SuppressWarnings("javadoc")
-public final class AttributeDescriptionTestCase extends SdkTestCase {
- @DataProvider(name = "dataForCompareCoreSchema")
- public Object[][] dataForCompareCoreSchema() {
- // AD1, AD2, compare result, isSubtype, isSuperType
- return new Object[][] { { "cn", "cn", 0, true, true },
- { "cn", "commonName", 0, true, true }, { " cn", "commonName ", 0, true, true },
- { "commonName", "cn", 0, true, true }, { "commonName", "commonName", 0, true, true },
- { "cn", "objectClass", 1, false, false }, { "objectClass", "cn", -1, false, false },
- { "name", "cn", 1, false, true }, { "cn", "name", -1, true, false },
- { "name;foo", "cn", 1, false, false }, { "cn;foo", "name", -1, true, false },
- { "name", "cn;foo", 1, false, true }, { "cn", "name;foo", -1, false, false }, };
- }
-
- @DataProvider(name = "dataForCompareNoSchema")
- public Object[][] dataForCompareNoSchema() {
- // AD1, AD2, compare result, isSubtype, isSuperType
- return new Object[][] { { "cn", "cn", 0, true, true }, { "cn", "CN", 0, true, true },
- { "CN", "cn", 0, true, true }, { "CN", "CN", 0, true, true },
- { "cn", "commonName", -1, false, false }, { "commonName", "cn", 1, false, false },
- { "commonName", "commonName", 0, true, true }, { "cn", "cn;foo", -1, false, true },
- { "cn;foo", "cn", 1, true, false }, { "cn;foo", "cn;foo", 0, true, true },
- { "CN;FOO", "cn;foo", 0, true, true }, { "cn;foo", "CN;FOO", 0, true, true },
- { "CN;FOO", "CN;FOO", 0, true, true }, { "cn;foo", "cn;bar", 1, false, false },
- { "cn;bar", "cn;foo", -1, false, false },
-
- { "cn;xxx;yyy", "cn", 1, true, false }, { "cn;xxx;yyy", "cn;yyy", 1, true, false },
- { "cn;xxx;yyy", "cn;xxx", 1, true, false },
- { "cn;xxx;yyy", "cn;xxx;yyy", 0, true, true },
- { "cn;xxx;yyy", "cn;yyy;xxx", 0, true, true },
-
- { "cn", "cn;xxx;yyy", -1, false, true }, { "cn;yyy", "cn;xxx;yyy", -1, false, true },
- { "cn;xxx", "cn;xxx;yyy", -1, false, true },
- { "cn;xxx;yyy", "cn;xxx;yyy", 0, true, true },
- { "cn;yyy;xxx", "cn;xxx;yyy", 0, true, true }, };
- }
-
- @DataProvider(name = "dataForValueOfCoreSchema")
- public Object[][] dataForValueOfCoreSchema() {
- // Value, type, isObjectClass
- return new Object[][] { { "cn", "cn", false }, { "CN", "cn", false },
- { "commonName", "cn", false }, { "objectclass", "objectClass", true }, };
- }
-
- @DataProvider(name = "dataForValueOfInvalidAttributeDescriptions")
- public Object[][] dataForValueOfInvalidAttributeDescriptions() {
- return new Object[][] { { "" }, { " " }, { ";" }, { " ; " }, { "0cn" }, { "cn+" },
- { "cn;foo+bar" }, { "cn;foo;foo+bar" }, { ";foo" }, { "cn;" }, { "cn;;foo" },
- { "cn; ;foo" }, { "cn;foo;" }, { "cn;foo; " }, { "cn;foo;;bar" }, { "cn;foo; ;bar" },
- { "cn;foo;bar;;" }, { "1a" }, { "1.a" }, { "1-" }, { "1.1a" }, { "1.1.a" }, };
- }
-
- @DataProvider(name = "dataForValueOfNoSchema")
- public Object[][] dataForValueOfNoSchema() {
- // Value, type, options, containsOptions("foo")
- return new Object[][] { { "cn", "cn", new String[0], false },
- { " cn ", "cn", new String[0], false }, { " cn ", "cn", new String[0], false },
- { "CN", "CN", new String[0], false }, { "1", "1", new String[0], false },
- { "1.2", "1.2", new String[0], false }, { "1.2.3", "1.2.3", new String[0], false },
- { "111.222.333", "111.222.333", new String[0], false },
- { "objectClass", "objectClass", new String[0], false },
- { "cn;foo", "cn", new String[] { "foo" }, true },
- { "cn;FOO", "cn", new String[] { "FOO" }, true },
- { "cn;bar", "cn", new String[] { "bar" }, false },
- { "cn;BAR", "cn", new String[] { "BAR" }, false },
- { "cn;foo;bar", "cn", new String[] { "foo", "bar" }, true },
- { "cn;FOO;bar", "cn", new String[] { "FOO", "bar" }, true },
- { "cn;foo;BAR", "cn", new String[] { "foo", "BAR" }, true },
- { "cn;FOO;BAR", "cn", new String[] { "FOO", "BAR" }, true },
- { "cn;bar;FOO", "cn", new String[] { "bar", "FOO" }, true },
- { "cn;BAR;foo", "cn", new String[] { "BAR", "foo" }, true },
- { "cn;bar;FOO", "cn", new String[] { "bar", "FOO" }, true },
- { "cn;BAR;FOO", "cn", new String[] { "BAR", "FOO" }, true },
- { " cn;BAR;FOO ", "cn", new String[] { "BAR", "FOO" }, true },
- { " cn;BAR;FOO ", "cn", new String[] { "BAR", "FOO" }, true },
- { "cn;xxx;yyy;zzz", "cn", new String[] { "xxx", "yyy", "zzz" }, false },
- { "cn;zzz;YYY;xxx", "cn", new String[] { "zzz", "YYY", "xxx" }, false }, };
- }
-
- @Test(dataProvider = "dataForCompareCoreSchema")
- public void testCompareCoreSchema(final String ad1, final String ad2, final int compare,
- final boolean isSubType, final boolean isSuperType) {
- final AttributeDescription attributeDescription1 =
- AttributeDescription.valueOf(ad1, Schema.getCoreSchema());
-
- final AttributeDescription attributeDescription2 =
- AttributeDescription.valueOf(ad2, Schema.getCoreSchema());
-
- // Identity.
- assertTrue(attributeDescription1.equals(attributeDescription1));
- assertTrue(attributeDescription1.compareTo(attributeDescription1) == 0);
- assertTrue(attributeDescription1.isSubTypeOf(attributeDescription1));
- assertTrue(attributeDescription1.isSuperTypeOf(attributeDescription1));
-
- if (compare == 0) {
- assertTrue(attributeDescription1.equals(attributeDescription2));
- assertTrue(attributeDescription2.equals(attributeDescription1));
- assertTrue(attributeDescription1.compareTo(attributeDescription2) == 0);
- assertTrue(attributeDescription2.compareTo(attributeDescription1) == 0);
-
- assertTrue(attributeDescription1.isSubTypeOf(attributeDescription2));
- assertTrue(attributeDescription1.isSuperTypeOf(attributeDescription2));
- assertTrue(attributeDescription2.isSubTypeOf(attributeDescription1));
- assertTrue(attributeDescription2.isSuperTypeOf(attributeDescription1));
- } else {
- assertFalse(attributeDescription1.equals(attributeDescription2));
- assertFalse(attributeDescription2.equals(attributeDescription1));
-
- if (compare < 0) {
- assertTrue(attributeDescription1.compareTo(attributeDescription2) < 0);
- assertTrue(attributeDescription2.compareTo(attributeDescription1) > 0);
- } else {
- assertTrue(attributeDescription1.compareTo(attributeDescription2) > 0);
- assertTrue(attributeDescription2.compareTo(attributeDescription1) < 0);
- }
-
- assertEquals(attributeDescription1.isSubTypeOf(attributeDescription2), isSubType);
-
- assertEquals(attributeDescription1.isSuperTypeOf(attributeDescription2), isSuperType);
- }
- }
-
- @Test(dataProvider = "dataForCompareNoSchema")
- public void testCompareNoSchema(final String ad1, final String ad2, final int compare,
- final boolean isSubType, final boolean isSuperType) {
- final AttributeDescription attributeDescription1 =
- AttributeDescription.valueOf(ad1, Schema.getEmptySchema());
-
- final AttributeDescription attributeDescription2 =
- AttributeDescription.valueOf(ad2, Schema.getEmptySchema());
-
- // Identity.
- assertTrue(attributeDescription1.equals(attributeDescription1));
- assertTrue(attributeDescription1.compareTo(attributeDescription1) == 0);
- assertTrue(attributeDescription1.isSubTypeOf(attributeDescription1));
- assertTrue(attributeDescription1.isSuperTypeOf(attributeDescription1));
-
- if (compare == 0) {
- assertTrue(attributeDescription1.equals(attributeDescription2));
- assertTrue(attributeDescription2.equals(attributeDescription1));
- assertTrue(attributeDescription1.compareTo(attributeDescription2) == 0);
- assertTrue(attributeDescription2.compareTo(attributeDescription1) == 0);
-
- assertTrue(attributeDescription1.isSubTypeOf(attributeDescription2));
- assertTrue(attributeDescription1.isSuperTypeOf(attributeDescription2));
- assertTrue(attributeDescription2.isSubTypeOf(attributeDescription1));
- assertTrue(attributeDescription2.isSuperTypeOf(attributeDescription1));
- } else {
- assertFalse(attributeDescription1.equals(attributeDescription2));
- assertFalse(attributeDescription2.equals(attributeDescription1));
-
- if (compare < 0) {
- assertTrue(attributeDescription1.compareTo(attributeDescription2) < 0);
- assertTrue(attributeDescription2.compareTo(attributeDescription1) > 0);
- } else {
- assertTrue(attributeDescription1.compareTo(attributeDescription2) > 0);
- assertTrue(attributeDescription2.compareTo(attributeDescription1) < 0);
- }
-
- assertEquals(attributeDescription1.isSubTypeOf(attributeDescription2), isSubType);
-
- assertEquals(attributeDescription1.isSuperTypeOf(attributeDescription2), isSuperType);
- }
- }
-
- @Test(dataProvider = "dataForValueOfCoreSchema")
- public void testValueOfCoreSchema(final String ad, final String at, final boolean isObjectClass) {
- final AttributeDescription attributeDescription =
- AttributeDescription.valueOf(ad, Schema.getCoreSchema());
-
- assertEquals(attributeDescription.toString(), ad);
-
- assertEquals(attributeDescription.getAttributeType().getNameOrOID(), at);
-
- assertEquals(attributeDescription.isObjectClass(), isObjectClass);
-
- assertFalse(attributeDescription.hasOptions());
- assertFalse(attributeDescription.hasOption("dummy"));
-
- final Iterator iterator = attributeDescription.getOptions().iterator();
- assertFalse(iterator.hasNext());
- }
-
- /** FIXME: none of these pass! The valueOf method is far to lenient. */
- @Test(dataProvider = "dataForValueOfInvalidAttributeDescriptions",
- expectedExceptions = LocalizedIllegalArgumentException.class)
- public void testValueOfInvalidAttributeDescriptions(final String ad) {
- AttributeDescription.valueOf(ad, Schema.getEmptySchema());
- }
-
- @Test(dataProvider = "dataForValueOfNoSchema")
- public void testValueOfNoSchema(final String ad, final String at, final String[] options,
- final boolean containsFoo) {
- final AttributeDescription attributeDescription =
- AttributeDescription.valueOf(ad, Schema.getEmptySchema());
-
- assertEquals(attributeDescription.toString(), ad);
-
- assertEquals(attributeDescription.getAttributeType().getNameOrOID(), at);
-
- assertFalse(attributeDescription.isObjectClass());
-
- if (options.length == 0) {
- assertFalse(attributeDescription.hasOptions());
- } else {
- assertTrue(attributeDescription.hasOptions());
- }
-
- assertFalse(attributeDescription.hasOption("dummy"));
- if (containsFoo) {
- assertTrue(attributeDescription.hasOption("foo"));
- assertTrue(attributeDescription.hasOption("FOO"));
- assertTrue(attributeDescription.hasOption("FoO"));
- } else {
- assertFalse(attributeDescription.hasOption("foo"));
- assertFalse(attributeDescription.hasOption("FOO"));
- assertFalse(attributeDescription.hasOption("FoO"));
- }
-
- for (final String option : options) {
- assertTrue(attributeDescription.hasOption(option));
- }
-
- final Iterator iterator = attributeDescription.getOptions().iterator();
- for (final String option : options) {
- assertTrue(iterator.hasNext());
- assertEquals(iterator.next(), option);
- }
- assertFalse(iterator.hasNext());
- }
-
- @Test
- public void testWithOptionAddFirstOption() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn");
- AttributeDescription ad2 = ad1.withOption("test");
- assertTrue(ad2.hasOptions());
- assertTrue(ad2.hasOption("test"));
- assertFalse(ad2.hasOption("dummy"));
- assertEquals(ad2.toString(), "cn;test");
- assertEquals(ad2.getOptions().iterator().next(), "test");
- }
-
- @Test
- public void testWithOptionAddExistingFirstOption() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test");
- AttributeDescription ad2 = ad1.withOption("test");
- assertSame(ad1, ad2);
- }
-
- @Test
- public void testWithOptionAddSecondOption() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1");
- AttributeDescription ad2 = ad1.withOption("test2");
- assertTrue(ad2.hasOptions());
- assertTrue(ad2.hasOption("test1"));
- assertTrue(ad2.hasOption("test2"));
- assertFalse(ad2.hasOption("dummy"));
- assertEquals(ad2.toString(), "cn;test1;test2");
- Iterator i = ad2.getOptions().iterator();
- assertEquals(i.next(), "test1");
- assertEquals(i.next(), "test2");
- }
-
- @Test
- public void testWithOptionAddExistingSecondOption() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1;test2");
- AttributeDescription ad2 = ad1.withOption("test1");
- AttributeDescription ad3 = ad1.withOption("test2");
- assertSame(ad1, ad2);
- assertSame(ad1, ad3);
- }
-
- @Test
- public void testWithoutOptionEmpty() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn");
- AttributeDescription ad2 = ad1.withoutOption("test");
- assertSame(ad1, ad2);
- }
-
- @Test
- public void testWithoutOptionFirstOption() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test");
- AttributeDescription ad2 = ad1.withoutOption("test");
- assertFalse(ad2.hasOptions());
- assertFalse(ad2.hasOption("test"));
- assertEquals(ad2.toString(), "cn");
- assertFalse(ad2.getOptions().iterator().hasNext());
- }
-
- @Test
- public void testWithoutOptionFirstOptionMissing() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test");
- AttributeDescription ad2 = ad1.withoutOption("dummy");
- assertSame(ad1, ad2);
- }
-
- @Test
- public void testWithoutOptionSecondOption1() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1;test2");
- AttributeDescription ad2 = ad1.withoutOption("test1");
- assertTrue(ad2.hasOptions());
- assertFalse(ad2.hasOption("test1"));
- assertTrue(ad2.hasOption("test2"));
- assertEquals(ad2.toString(), "cn;test2");
- assertEquals(ad2.getOptions().iterator().next(), "test2");
- }
-
- @Test
- public void testWithoutOptionSecondOption2() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1;test2");
- AttributeDescription ad2 = ad1.withoutOption("test2");
- assertTrue(ad2.hasOptions());
- assertTrue(ad2.hasOption("test1"));
- assertFalse(ad2.hasOption("test2"));
- assertEquals(ad2.toString(), "cn;test1");
- assertEquals(ad2.getOptions().iterator().next(), "test1");
- }
-
- @Test
- public void testWithoutOptionSecondOptionMissing() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1;test2");
- AttributeDescription ad2 = ad1.withoutOption("dummy");
- assertSame(ad1, ad2);
- }
-
- @Test
- public void testWithoutOptionThirdOption1() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1;test2;test3");
- AttributeDescription ad2 = ad1.withoutOption("test1");
- assertTrue(ad2.hasOptions());
- assertFalse(ad2.hasOption("test1"));
- assertTrue(ad2.hasOption("test2"));
- assertTrue(ad2.hasOption("test3"));
- assertEquals(ad2.toString(), "cn;test2;test3");
- Iterator i = ad2.getOptions().iterator();
- assertEquals(i.next(), "test2");
- assertEquals(i.next(), "test3");
- }
-
- @Test
- public void testWithoutOptionThirdOption2() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1;test2;test3");
- AttributeDescription ad2 = ad1.withoutOption("test2");
- assertTrue(ad2.hasOptions());
- assertTrue(ad2.hasOption("test1"));
- assertFalse(ad2.hasOption("test2"));
- assertTrue(ad2.hasOption("test3"));
- assertEquals(ad2.toString(), "cn;test1;test3");
- Iterator i = ad2.getOptions().iterator();
- assertEquals(i.next(), "test1");
- assertEquals(i.next(), "test3");
- }
-
- @Test
- public void testWithoutOptionThirdOption3() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1;test2;test3");
- AttributeDescription ad2 = ad1.withoutOption("test3");
- assertTrue(ad2.hasOptions());
- assertTrue(ad2.hasOption("test1"));
- assertTrue(ad2.hasOption("test2"));
- assertFalse(ad2.hasOption("test3"));
- assertEquals(ad2.toString(), "cn;test1;test2");
- Iterator i = ad2.getOptions().iterator();
- assertEquals(i.next(), "test1");
- assertEquals(i.next(), "test2");
- }
-
- @Test
- public void testWithoutOptionThirdOptionMissing() {
- AttributeDescription ad1 = AttributeDescription.valueOf("cn;test1;test2;test3");
- AttributeDescription ad2 = ad1.withoutOption("dummy");
- assertSame(ad1, ad2);
- }
-
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/ConnectionsTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/ConnectionsTestCase.java
deleted file mode 100644
index ff164c2b9..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/ConnectionsTestCase.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2013 ForgeRock AS
- */
-package org.forgerock.opendj.ldap;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
-
-import org.testng.annotations.Test;
-
-@SuppressWarnings("javadoc")
-public class ConnectionsTestCase extends SdkTestCase {
-
- @Test
- public void testUncloseableConnectionClose() throws Exception {
- final Connection connection = mock(Connection.class);
- final Connection uncloseable = Connections.uncloseable(connection);
- uncloseable.close();
- verifyZeroInteractions(connection);
- }
-
- @Test
- public void testUncloseableConnectionNotClose() throws Exception {
- final Connection connection = mock(Connection.class);
- final Connection uncloseable = Connections.uncloseable(connection);
- uncloseable.applyChange(null);
- verify(connection).applyChange(null);
- }
-
- @Test
- public void testUncloseableConnectionUnbind() throws Exception {
- final Connection connection = mock(Connection.class);
- final Connection uncloseable = Connections.uncloseable(connection);
- uncloseable.close(null, null);
- verifyZeroInteractions(connection);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/SdkTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/SdkTestCase.java
deleted file mode 100644
index e13003f74..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/SdkTestCase.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012-2013 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap;
-
-import org.forgerock.testng.ForgeRockTestCase;
-import org.testng.annotations.Test;
-
-/**
- * An abstract class that all types unit tests should extend. A type represents
- * the classes found directly under the package org.forgerock.opendj.ldap.
- */
-@Test(groups = { "precommit", "types", "sdk" })
-public abstract class SdkTestCase extends ForgeRockTestCase {
-
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/TestCaseUtilsTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/TestCaseUtilsTestCase.java
deleted file mode 100644
index ba4df8781..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/TestCaseUtilsTestCase.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2013 ForgeRock AS
- */
-package org.forgerock.opendj.ldap;
-
-import static org.fest.assertions.Assertions.assertThat;
-import static org.forgerock.opendj.ldap.TestCaseUtils.mockTimeService;
-
-import org.testng.annotations.Test;
-
-import org.forgerock.util.time.TimeService;
-
-@SuppressWarnings("javadoc")
-public class TestCaseUtilsTestCase extends SdkTestCase {
-
- /**
- * Test for {@link #mockTimeSource(long...)}.
- */
- @Test
- public void testMockTimeSource() {
- final TimeService mock1 = mockTimeService(10);
- assertThat(mock1.now()).isEqualTo(10);
- assertThat(mock1.now()).isEqualTo(10);
-
- final TimeService mock2 = mockTimeService(10, 20, 30);
- assertThat(mock2.now()).isEqualTo(10);
- assertThat(mock2.now()).isEqualTo(20);
- assertThat(mock2.now()).isEqualTo(30);
- assertThat(mock2.now()).isEqualTo(30);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/controls/ControlsTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/controls/ControlsTestCase.java
deleted file mode 100644
index a15090700..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/controls/ControlsTestCase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.controls;
-
-import org.forgerock.opendj.ldap.TestCaseUtils;
-import org.forgerock.testng.ForgeRockTestCase;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * An abstract class that all controls unit tests should extend. A control
- * represents the classes found directly under the package
- * org.forgerock.opendj.ldap.controls.
- */
-
-@Test(groups = { "precommit", "controls", "sdk" })
-public abstract class ControlsTestCase extends ForgeRockTestCase {
- /**
- * Set up the environment for performing the tests in this suite.
- *
- * @throws Exception
- * If the environment could not be set up.
- */
- @BeforeClass
- public void setUp() throws Exception {
- // This test suite depends on having the schema available.
- TestCaseUtils.startServer();
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/requests/ExtendedRequestTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/requests/ExtendedRequestTestCase.java
deleted file mode 100644
index 49593dbc7..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/requests/ExtendedRequestTestCase.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- */
-
-package org.forgerock.opendj.ldap.requests;
-
-import static org.testng.Assert.assertNotNull;
-
-import org.forgerock.opendj.ldap.responses.ExtendedResultDecoder;
-import org.testng.annotations.Test;
-
-/**
- * Tests various extended requests.
- */
-@SuppressWarnings("javadoc")
-public abstract class ExtendedRequestTestCase extends RequestsTestCase {
-
- @Test(dataProvider = "ExtendedRequests")
- public void testDecoder(final ExtendedRequest> request) throws Exception {
- final ExtendedResultDecoder> decoder = request.getResultDecoder();
- assertNotNull(decoder);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/responses/ResponsesTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/responses/ResponsesTestCase.java
deleted file mode 100644
index e1690018b..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/responses/ResponsesTestCase.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.responses;
-
-import org.forgerock.testng.ForgeRockTestCase;
-import org.testng.annotations.Test;
-
-/**
- * An abstract class that all responses unit tests should extend. Responses
- * represents the classes found directly under the package
- * org.forgerock.opendj.ldap.responses.
- */
-
-@Test(groups = { "precommit", "responses", "sdk" })
-public abstract class ResponsesTestCase extends ForgeRockTestCase {
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/AbstractSchemaTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/AbstractSchemaTestCase.java
deleted file mode 100644
index 9f9a833ee..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/AbstractSchemaTestCase.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import org.forgerock.testng.ForgeRockTestCase;
-import org.testng.annotations.Test;
-
-/**
- * An abstract class that all schema unit test should extend.
- */
-@Test(groups = { "precommit", "schema", "sdk" })
-public abstract class AbstractSchemaTestCase extends ForgeRockTestCase {
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/BitStringSyntaxTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/BitStringSyntaxTest.java
deleted file mode 100644
index e0eab345f..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/BitStringSyntaxTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_BIT_STRING_OID;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/** Bit string syntax tests. */
-@Test
-public class BitStringSyntaxTest extends AbstractSyntaxTestCase {
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "acceptableValues")
- public Object[][] createAcceptableValues() {
- return new Object[][] {
- { "'0101'B", true },
- { "'1'B", true },
- { "'0'B", true },
- { "invalid", false },
- { "1", false },
- { "'010100000111111010101000'B", true },
- };
- }
-
- /** {@inheritDoc} */
- @Override
- protected Syntax getRule() {
- return Schema.getCoreSchema().getSyntax(SYNTAX_BIT_STRING_OID);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseExactOrderingMatchingRuleTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseExactOrderingMatchingRuleTest.java
deleted file mode 100644
index b2f0d5ac4..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CaseExactOrderingMatchingRuleTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.OMR_CASE_EXACT_OID;
-
-import org.testng.annotations.DataProvider;
-
-/**
- * Test the CaseExactOrderingMatchingRule.
- */
-public class CaseExactOrderingMatchingRuleTest extends OrderingMatchingRuleTest {
-
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "OrderingMatchingRuleInvalidValues")
- public Object[][] createOrderingMatchingRuleInvalidValues() {
- return new Object[][] {};
- }
-
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "Orderingmatchingrules")
- public Object[][] createOrderingMatchingRuleTestData() {
- return new Object[][] {
- { "12345678", "02345678", 1 },
- { "abcdef", "bcdefa", -1 },
- { "abcdef", "abcdef", 0 }, };
- }
-
- /** {@inheritDoc} */
- @Override
- protected MatchingRule getRule() {
- return Schema.getCoreSchema().getMatchingRule(OMR_CASE_EXACT_OID);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CoreSchemaTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CoreSchemaTest.java
deleted file mode 100644
index 0f6ae1929..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CoreSchemaTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-/**
- * Core schema tests.
- */
-@SuppressWarnings("javadoc")
-public class CoreSchemaTest extends AbstractSchemaTestCase {
- @Test
- public final void testCoreSchemaWarnings() {
- // Make sure core schema doesn't have any warnings.
- Assert.assertTrue(Schema.getCoreSchema().getWarnings().isEmpty());
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CountryStringSyntaxTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CountryStringSyntaxTest.java
deleted file mode 100644
index 0a009d1d1..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/CountryStringSyntaxTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions Copyright 2012 Manuel Gaupp
- * Portions copyright 2014 ForgeRock AS.
- *
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_COUNTRY_STRING_OID;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Country String syntax tests.
- */
-@Test
-public class CountryStringSyntaxTest extends AbstractSyntaxTestCase {
- @Override
- @DataProvider(name = "acceptableValues")
- public Object[][] createAcceptableValues() {
- return new Object[][] {
- // tests for the Country String syntax.
- { "DE", true },
- { "de", false },
- { "SX", true },
- { "12", false },
- { "UK", true },
- { "Xf", false },
- { "ÖÄ", false }, // "\u00D6\u00C4"
- };
- }
-
- /** {@inheritDoc} */
- @Override
- protected Syntax getRule() {
- return Schema.getCoreSchema().getSyntax(SYNTAX_COUNTRY_STRING_OID);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IA5StringSyntaxTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IA5StringSyntaxTest.java
deleted file mode 100644
index 732e9ad79..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IA5StringSyntaxTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_IA5_STRING_OID;
-
-import org.testng.annotations.DataProvider;
-
-/**
- * IA5 string syntax tests.
- */
-public class IA5StringSyntaxTest extends AbstractSyntaxTestCase {
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "acceptableValues")
- public Object[][] createAcceptableValues() {
- return new Object[][] { { "12345678", true }, { "12345678\u2163", false }, };
- }
-
- /** {@inheritDoc} */
- @Override
- protected Syntax getRule() {
- return Schema.getCoreSchema().getSyntax(SYNTAX_IA5_STRING_OID);
- }
-
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IntegerSyntaxTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IntegerSyntaxTest.java
deleted file mode 100644
index 71c6b5900..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/IntegerSyntaxTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_INTEGER_OID;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Integer syntax tests.
- */
-@Test
-public class IntegerSyntaxTest extends AbstractSyntaxTestCase {
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "acceptableValues")
- public Object[][] createAcceptableValues() {
- return new Object [][] {
- {"123", true},
- {"987654321", true},
- {"-1", true},
- {"10001", true},
- {"001", false},
- {"-01", false},
- {"12345678\u2163", false},
- {" 123", false},
- {"123 ", false}
- };
- }
-
- /** {@inheritDoc} */
- @Override
- protected Syntax getRule() {
- return Schema.getCoreSchema().getSyntax(SYNTAX_INTEGER_OID);
- }
-
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/OtherMailboxSyntaxTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/OtherMailboxSyntaxTest.java
deleted file mode 100644
index dffd71482..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/OtherMailboxSyntaxTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_OTHER_MAILBOX_OID;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Other mailbox syntax tests.
- */
-@Test
-public class OtherMailboxSyntaxTest extends AbstractSyntaxTestCase {
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "acceptableValues")
- public Object[][] createAcceptableValues() {
- return new Object[][] { { "MyMail$Mymailbox", true }, { "MyMailMymailbox", false }, };
- }
-
- /** {@inheritDoc} */
- @Override
- protected Syntax getRule() {
- return Schema.getCoreSchema().getSyntax(SYNTAX_OTHER_MAILBOX_OID);
- }
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/TelexSyntaxTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/TelexSyntaxTest.java
deleted file mode 100644
index 7026accca..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/TelexSyntaxTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2009 Sun Microsystems, Inc.
- * Portions copyright 2014-2015 ForgeRock AS.
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_TELEX_OID;
-
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-/**
- * Telex syntax tests.
- */
-@Test
-public class TelexSyntaxTest extends AbstractSyntaxTestCase {
-
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "acceptableValues")
- public Object[][] createAcceptableValues() {
- return new Object[][] {
- { "123$france$456", true },
- { "abcdefghijk$lmnopqr$stuvwxyz", true },
- { "12345$67890$()+,-./:? ", true }, };
- }
-
- /** {@inheritDoc} */
- @Override
- protected Syntax getRule() {
- return Schema.getCoreSchema().getSyntax(SYNTAX_TELEX_OID);
- }
-
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UserPasswordExactEqualityMatchingRuleTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UserPasswordExactEqualityMatchingRuleTest.java
deleted file mode 100644
index ab7ab535d..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/UserPasswordExactEqualityMatchingRuleTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2014 ForgeRock AS
- */
-package org.forgerock.opendj.ldap.schema;
-
-import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_USER_PASSWORD_EXACT_OID;
-
-import org.testng.annotations.DataProvider;
-
-/**
- * Test the UserPasswordExactEqualityMatchingRule.
- */
-public class UserPasswordExactEqualityMatchingRuleTest extends MatchingRuleTest {
-
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "matchingRuleInvalidAttributeValues")
- public Object[][] createMatchingRuleInvalidAttributeValues() {
- return new Object[][] {
-
- };
- }
-
- /** {@inheritDoc} */
- @Override
- @DataProvider(name = "matchingrules")
- public Object[][] createMatchingRuleTest() {
- return new Object[][] {
-
- };
- }
-
- /** {@inheritDoc} */
- @Override
- protected MatchingRule getRule() {
- return Schema.getCoreSchema().getMatchingRule(EMR_USER_PASSWORD_EXACT_OID);
- }
-
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/spi/LDAPTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/spi/LDAPTestCase.java
deleted file mode 100644
index eb94928d5..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/spi/LDAPTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-
-package org.forgerock.opendj.ldap.spi;
-
-import org.forgerock.testng.ForgeRockTestCase;
-import org.testng.annotations.Test;
-
-/**
- * An abstract class that all ldap unit tests should extend. Ldap represents the
- * classes found directly under the package com.forgerock.opendj.ldap.ldap.
- */
-
-@Test(groups = { "precommit", "ldap", "sdk" })
-public abstract class LDAPTestCase extends ForgeRockTestCase {
-}
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldif/AbstractLDIFTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldif/AbstractLDIFTestCase.java
deleted file mode 100644
index 35ddf669e..000000000
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldif/AbstractLDIFTestCase.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
- */
-package org.forgerock.opendj.ldif;
-
-import org.forgerock.opendj.ldap.SdkTestCase;
-import org.testng.annotations.Test;
-
-/**
- * An abstract class that all LDIF unit tests should extend. LDIF represents the
- * classes found directly under the package org.forgerock.opendj.ldif.
- */
-
-@Test(groups = { "precommit", "types", "sdk" })
-public abstract class AbstractLDIFTestCase extends SdkTestCase {
-}
-
-
-
-
diff --git a/opendj-core/src/test/resources/META-INF/services/org.forgerock.opendj.ldap.spi.TransportProvider b/opendj-core/src/test/resources/META-INF/services/org.forgerock.opendj.ldap.spi.TransportProvider
deleted file mode 100644
index 8e5ad9880..000000000
--- a/opendj-core/src/test/resources/META-INF/services/org.forgerock.opendj.ldap.spi.TransportProvider
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-# or http://forgerock.org/license/CDDLv1.0.html.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at legal-notices/CDDLv1_0.txt.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information:
-# Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2013 ForgeRock AS.
-#
-org.forgerock.opendj.ldap.spi.BasicTransportProvider
\ No newline at end of file
diff --git a/opendj-doc-maven-plugin/pom.xml b/opendj-doc-maven-plugin/pom.xml
index ec089001a..54b400bcb 100644
--- a/opendj-doc-maven-plugin/pom.xml
+++ b/opendj-doc-maven-plugin/pom.xml
@@ -1,28 +1,18 @@
4.0.0
@@ -30,8 +20,7 @@
opendj-sdk-parent
org.forgerock.opendj
- 3.0.0-SNAPSHOT
- ../opendj-sdk-parent/pom.xml
+ 4.0.0-SNAPSHOT
opendj-doc-maven-plugin
@@ -47,7 +36,7 @@
org.forgerock.opendj
- opendj-core
+ opendj-sdk-core
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/CommandLineTool.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/CommandLineTool.java
index 711020b84..dc76e60e4 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/CommandLineTool.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/CommandLineTool.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015 ForgeRock AS.
*/
package org.forgerock.opendj.maven.doc;
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java
index 1498ae5d2..a035a20c6 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateConfigurationReferenceMojo.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015-2016 ForgeRock AS.
*/
package org.forgerock.opendj.maven.doc;
@@ -54,7 +44,7 @@ public class GenerateConfigurationReferenceMojo extends AbstractMojo {
/**
* The path to the directory where the configuration reference should be written.
- * This path must be under {@code ${project.build.directory} }.
+ * This path must be under ${project.build.directory}
.
*/
@Parameter(defaultValue = "${project.build.directory}/site/configref")
private String outputDirectory;
@@ -77,7 +67,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
/**
* Creates the output directory where the configuration reference is written.
- * @throws MojoExecutionException The output directory is not under {@code ${project.build.directory} }
+ * @throws MojoExecutionException The output directory is not under ${project.build.directory}
* or could not be created.
*/
private void createOutputDirectory() throws MojoExecutionException {
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java
index 67e0c2f77..346a6f0fb 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateGlobalAcisTableMojo.java
@@ -1,26 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015-2016 ForgeRock AS.
*/
package org.forgerock.opendj.maven.doc;
@@ -67,9 +58,6 @@ public class GenerateGlobalAcisTableMojo extends AbstractMojo {
@Parameter(defaultValue = "${project.build.directory}/docbkx-sources/shared")
private File outputDirectory;
- /** Holds descriptions for ACIs. */
- private Map descriptions;
-
/** Holds documentation for an ACI. */
private class Aci {
String name;
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
index c0a036fcf..363e71937 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateMessageFileMojo.java
@@ -1,34 +1,23 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2008-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011-2015 ForgeRock AS.
+ * Copyright 2008-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2011-2016 ForgeRock AS.
*/
package org.forgerock.opendj.maven.doc;
import static org.apache.maven.plugins.annotations.LifecyclePhase.*;
import static org.forgerock.opendj.maven.doc.DocsMessages.*;
-import static org.forgerock.util.Utils.*;
import java.io.File;
import java.io.FileInputStream;
@@ -58,27 +47,16 @@
import org.apache.maven.project.MavenProject;
import org.forgerock.i18n.LocalizableMessage;
-/**
- * Generates an XML file of log messages found in properties files.
- */
+/** Generates an XML file of log messages found in properties files. */
@Mojo(name = "generate-xml-messages-doc", defaultPhase = PRE_SITE)
public class GenerateMessageFileMojo extends AbstractMojo {
-
- /**
- * The Maven Project.
- */
+ /** The Maven Project. */
@Parameter(property = "project", readonly = true, required = true)
private MavenProject project;
-
- /**
- * The tag of the locale for which to generate the documentation.
- */
+ /** The tag of the locale for which to generate the documentation. */
@Parameter(defaultValue = "en")
private String locale;
-
- /**
- * The path to the directory containing the message properties files.
- */
+ /** The path to the directory containing the message properties files. */
@Parameter(required = true)
private String messagesDirectory;
@@ -89,16 +67,11 @@ public class GenerateMessageFileMojo extends AbstractMojo {
@Parameter(required = true)
private String outputDirectory;
- /**
- * A list which contains all file names, the extension is not needed.
- */
+ /** A list which contains all file names, the extension is not needed. */
@Parameter(required = true)
private List messageFileNames;
-
- /**
- * One-line descriptions for log reference categories.
- */
- private static final HashMap CATEGORY_DESCRIPTIONS = new HashMap<>();
+ /** One-line descriptions for log reference categories. */
+ private static final Map CATEGORY_DESCRIPTIONS = new HashMap<>();
static {
CATEGORY_DESCRIPTIONS.put("ACCESS_CONTROL", CATEGORY_ACCESS_CONTROL.get());
CATEGORY_DESCRIPTIONS.put("ADMIN", CATEGORY_ADMIN.get());
@@ -127,7 +100,6 @@ public class GenerateMessageFileMojo extends AbstractMojo {
/** Message giving formatting rules for string keys. */
public static final String KEY_FORM_MSG = ".\n\nOpenDJ message property keys must be of the form\n\n"
+ "\t\'[CATEGORY]_[SEVERITY]_[DESCRIPTION]_[ORDINAL]\'\n\n";
-
private static final String ERROR_SEVERITY_IDENTIFIER_STRING = "ERR_";
/** FreeMarker template configuration. */
@@ -157,26 +129,18 @@ private void writeLogRef(final File file, final String template, final Map {
private Integer ordinal;
private String xmlId;
private String formatString;
- /**
- * Build log reference entry for an log message.
- */
+ /** Build log reference entry for an log message. */
public MessageRefEntry(final String msgPropKey, final Integer ordinal, final String formatString) {
this.formatString = formatString;
this.ordinal = ordinal;
@@ -298,7 +262,6 @@ public Integer getOrdinal() {
return this.ordinal;
}
- /** {@inheritDoc} */
@Override
public String toString() {
if (ordinal != null) {
@@ -307,13 +270,14 @@ public String toString() {
return description;
}
- /** {@inheritDoc} */
@Override
public int compareTo(MessagePropertyKey k) {
if (ordinal == k.ordinal) {
return description.compareTo(k.description);
- } else {
+ } else if (ordinal != null && k.ordinal != null) {
return ordinal.compareTo(k.ordinal);
+ } else {
+ return 0;
}
}
}
@@ -361,10 +325,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
private void createOutputDirectory() throws IOException {
File outputDir = new File(outputDirectory);
- if (outputDir != null && !outputDir.exists()) {
- if (!outputDir.mkdirs()) {
- throw new IOException("Failed to create output directory.");
- }
+ if (!outputDir.exists() && !outputDir.mkdirs()) {
+ throw new IOException("Failed to create output directory.");
}
}
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java
index 39e77028e..9747a9b6f 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateRefEntriesMojo.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015 ForgeRock AS.
*/
package org.forgerock.opendj.maven.doc;
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateResultCodeDocMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateResultCodeDocMojo.java
index 134a053df..dfe0be0b4 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateResultCodeDocMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateResultCodeDocMojo.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015 ForgeRock AS.
*/
package org.forgerock.opendj.maven.doc;
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateSchemaDocMojo.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateSchemaDocMojo.java
index a5b8195f4..1d65b3f03 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateSchemaDocMojo.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/GenerateSchemaDocMojo.java
@@ -1,26 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015 ForgeRock AS.
*/
package org.forgerock.opendj.maven.doc;
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java
index 7db7c5ffc..be8a961f9 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/Utils.java
@@ -1,27 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015 ForgeRock AS.
*/
package org.forgerock.opendj.maven.doc;
@@ -124,9 +114,9 @@ static void copyInputStreamToFile(InputStream original, File copy) throws IOExce
*/
static void writeStringToFile(final String string, final File file) throws IOException {
createFile(file);
- PrintWriter printWriter = new PrintWriter(file);
- printWriter.print(string);
- printWriter.close();
+ try (PrintWriter printWriter = new PrintWriter(file)) {
+ printWriter.print(string);
+ }
}
/**
diff --git a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/package-info.java b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/package-info.java
index 8b4302359..0daf7e27f 100644
--- a/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/package-info.java
+++ b/opendj-doc-maven-plugin/src/main/java/org/forgerock/opendj/maven/doc/package-info.java
@@ -1,26 +1,17 @@
/*
- * CDDL HEADER START
+ * The contents of this file are subject to the terms of the Common Development and
+ * Distribution License (the License). You may not use this file except in compliance with the
+ * License.
*
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+ * specific language governing permission and limitations under the License.
*
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
+ * When distributing Covered Software, include this CDDL Header Notice in each file and include
+ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+ * Header, with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyright [year] [name of copyright owner]".
*
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- * Copyright 2015 ForgeRock AS.
+ * Copyright 2015 ForgeRock AS.
*/
/**
diff --git a/opendj-doc-maven-plugin/src/main/resources/org/forgerock/opendj/maven/doc/docs.properties b/opendj-doc-maven-plugin/src/main/resources/org/forgerock/opendj/maven/doc/docs.properties
index 8a41989af..c7fd1d076 100644
--- a/opendj-doc-maven-plugin/src/main/resources/org/forgerock/opendj/maven/doc/docs.properties
+++ b/opendj-doc-maven-plugin/src/main/resources/org/forgerock/opendj/maven/doc/docs.properties
@@ -1,28 +1,18 @@
#
-# CDDL HEADER START
+# The contents of this file are subject to the terms of the Common Development and
+# Distribution License (the License). You may not use this file except in compliance with the
+# License.
#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
+# specific language governing permission and limitations under the License.
#
-# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-# or http://forgerock.org/license/CDDLv1.0.html.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at legal-notices/CDDLv1_0.txt.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information:
-# Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2015 ForgeRock AS.
+# When distributing Covered Software, include this CDDL Header Notice in each file and include
+# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
+# Header, with the fields enclosed by brackets [] replaced by your own identifying
+# information: "Portions Copyright [year] [name of copyright owner]".
#
+# Copyright 2015 ForgeRock AS.
+
#
# Documentation messages
#
diff --git a/opendj-doc-maven-plugin/src/main/resources/templates/appendix-ldap-result-codes.ftl b/opendj-doc-maven-plugin/src/main/resources/templates/appendix-ldap-result-codes.ftl
index 3e531276c..158c532cf 100644
--- a/opendj-doc-maven-plugin/src/main/resources/templates/appendix-ldap-result-codes.ftl
+++ b/opendj-doc-maven-plugin/src/main/resources/templates/appendix-ldap-result-codes.ftl
@@ -1,28 +1,18 @@
<#-- Comment text comes from the Javadoc, so the language is English. -->
- * To be used, this implementation must be declared in the
- * provider-configuration file
- * {@code META-INF/services/org.forgerock.opendj.ldap.spi.TransportProvider}
- * with this single line:
- *
- *
- * com.forgerock.opendj.ldap.GrizzlyTransportProvider
- *
- *
- * To require that this implementation is used, you must set the transport
- * provider to "Grizzly" using {@code LDAPOptions#setTransportProvider()}
- * method if requesting a {@code LDAPConnectionFactory} or
- * {@code LDAPListenerOptions#setTransportProvider()} method if requesting a
- * {@code LDAPListener}. Otherwise there is no guarantee that this
- * implementation will be used.
- */
-package org.forgerock.opendj.grizzly;
-
diff --git a/opendj-grizzly/src/main/resources/META-INF/services/org.forgerock.opendj.ldap.spi.TransportProvider b/opendj-grizzly/src/main/resources/META-INF/services/org.forgerock.opendj.ldap.spi.TransportProvider
deleted file mode 100644
index d273aa2e1..000000000
--- a/opendj-grizzly/src/main/resources/META-INF/services/org.forgerock.opendj.ldap.spi.TransportProvider
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-# or http://forgerock.org/license/CDDLv1.0.html.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at legal-notices/CDDLv1_0.txt.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information:
-# Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2013 ForgeRock AS.
-#
-com.forgerock.opendj.grizzly.GrizzlyTransportProvider
\ No newline at end of file
diff --git a/opendj-grizzly/src/main/resources/com/forgerock/opendj/grizzly/grizzly.properties b/opendj-grizzly/src/main/resources/com/forgerock/opendj/grizzly/grizzly.properties
deleted file mode 100755
index c0b3cbbf1..000000000
--- a/opendj-grizzly/src/main/resources/com/forgerock/opendj/grizzly/grizzly.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
-# or http://forgerock.org/license/CDDLv1.0.html.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at legal-notices/CDDLv1_0.txt.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information:
-# Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2013-2014 ForgeRock AS.
-#
-LDAP_CONNECTION_REQUEST_TIMEOUT=The request has failed because no response \
- was received from the server within the %d ms timeout
-LDAP_CONNECTION_CONNECT_TIMEOUT=The connection attempt to server %s has failed \
- because the connection timeout period of %d ms was exceeded
-LDAP_CONNECTION_BIND_OR_START_TLS_REQUEST_TIMEOUT=The bind or StartTLS request \
- has failed because no response was received from the server within the %d ms \
- timeout. The LDAP connection is now in an invalid state and can no longer be used
-LDAP_CONNECTION_BIND_OR_START_TLS_CONNECTION_TIMEOUT=The LDAP connection has \
- failed because no bind or StartTLS response was received from the server \
- within the %d ms timeout
diff --git a/opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/ASN1BufferReaderTestCase.java b/opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/ASN1BufferReaderTestCase.java
deleted file mode 100644
index 97de2ec94..000000000
--- a/opendj-grizzly/src/test/java/org/forgerock/opendj/grizzly/ASN1BufferReaderTestCase.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
- * or http://forgerock.org/license/CDDLv1.0.html.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at legal-notices/CDDLv1_0.txt.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Copyright 2010 Sun Microsystems, Inc.
- * Portions copyright 2011-2013 ForgeRock AS
- */
-
-package org.forgerock.opendj.grizzly;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.forgerock.opendj.io.ASN1Reader;
-import org.forgerock.opendj.io.ASN1ReaderTestCase;
-import org.glassfish.grizzly.memory.ByteBufferWrapper;
-import org.glassfish.grizzly.memory.MemoryManager;
-
-/**
- * This class provides test cases for ASN1BufferReader.
- */
-public class ASN1BufferReaderTestCase extends ASN1ReaderTestCase {
- @Override
- protected ASN1Reader getReader(final byte[] b, final int maxElementSize) throws IOException {
- final ByteBufferWrapper buffer = new ByteBufferWrapper(ByteBuffer.wrap(b));
- final ASN1BufferReader reader =
- new ASN1BufferReader(maxElementSize, MemoryManager.DEFAULT_MEMORY_MANAGER);
- reader.appendBytesRead(buffer);
- return reader;
- }
-}
diff --git a/opendj-ldap-sdk-examples/pom.xml b/opendj-ldap-sdk-examples/pom.xml
index a86f7009f..e2b65fce6 100644
--- a/opendj-ldap-sdk-examples/pom.xml
+++ b/opendj-ldap-sdk-examples/pom.xml
@@ -1,28 +1,18 @@
4.0.0
@@ -30,8 +20,7 @@
opendj-sdk-parent
org.forgerock.opendj
- 3.0.0-SNAPSHOT
- ../opendj-sdk-parent/pom.xml
+ 4.0.0-SNAPSHOT
opendj-ldap-sdk-examples
@@ -41,12 +30,12 @@
org.forgerock.opendj
- opendj-core
+ opendj-sdk-core
org.forgerock.opendj
- opendj-grizzly
+ opendj-sdk-grizzly
diff --git a/opendj-ldap-sdk-examples/src/main/assembly/examples.xml b/opendj-ldap-sdk-examples/src/main/assembly/examples.xml
index 22f76f7d7..56f4c548f 100644
--- a/opendj-ldap-sdk-examples/src/main/assembly/examples.xml
+++ b/opendj-ldap-sdk-examples/src/main/assembly/examples.xml
@@ -1,28 +1,18 @@
- * {@code
- * [ ...]}
+ * {@code [--load-balancer ]
+ * [ ...]}
*
+ *
+ * Where {@code } is one of "round-robin", "fail-over", or "sharded". The default is round-robin.
*/
public final class Proxy {
/**
* Main method.
*
* @param args
- * The command line arguments: listen address, listen port,
+ * The command line arguments: [--load-balancer