opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AttributeType.java
@@ -98,7 +98,7 @@ } /** * Adds this attribute type to the schema, throwing an * Adds this attribute type to the schema, throwing a * {@code ConflictingSchemaElementException} if there is an existing * attribute type with the same numeric OID. * opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITContentRule.java
@@ -81,7 +81,7 @@ } /** * Adds this DIT content rule to the schema, throwing an * Adds this DIT content rule to the schema, throwing a * {@code ConflictingSchemaElementException} if there is an existing DIT * content rule with the same structural object class OID. * opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/DITStructureRule.java
@@ -75,17 +75,7 @@ } /** * Adds this DIT structure rule to the schema overwriting any existing * DIT structure rule with the same numeric ID. * * @return The parent schema builder. */ public SchemaBuilder addToSchemaOverwrite() { return getSchemaBuilder().addDITStructureRule(new DITStructureRule(this), true); } /** * Adds this DIT structure rule to the schema, throwing an * Adds this DIT structure rule to the schema, throwing a * {@code ConflictingSchemaElementException} if there is an existing DIT * structure rule with the same numeric ID. * @@ -98,6 +88,16 @@ return getSchemaBuilder().addDITStructureRule(new DITStructureRule(this), false); } /** * Adds this DIT structure rule to the schema overwriting any existing * DIT structure rule with the same numeric ID. * * @return The parent schema builder. */ public SchemaBuilder addToSchemaOverwrite() { return getSchemaBuilder().addDITStructureRule(new DITStructureRule(this), true); } @Override public Builder description(final String description) { return description0(description); opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java
@@ -59,9 +59,8 @@ * or via the {@link #toString()} methods. */ public final class MatchingRule extends SchemaElement { /** * A fluent API for incrementally constructing matching rules. */ /** A fluent API for incrementally constructing matching rules. */ public static final class Builder extends SchemaElementBuilder<Builder> { private String oid; private final List<String> names = new LinkedList<String>(); @@ -84,6 +83,20 @@ } /** * Adds this matching rule to the schema, throwing a * {@code ConflictingSchemaElementException} if there is an existing * matching rule with the same numeric OID. * * @return The parent schema builder. * @throws ConflictingSchemaElementException * If there is an existing matching rule with the same * numeric OID. */ public SchemaBuilder addToSchema() { return getSchemaBuilder().addMatchingRule(new MatchingRule(this), false); } /** * Adds this matching rule to the schema overwriting any existing matching rule with the same numeric OID. * * @return The parent schema builder. @@ -92,18 +105,6 @@ return getSchemaBuilder().addMatchingRule(new MatchingRule(this), true); } /** * Adds this matching rule to the schema, throwing an {@code ConflictingSchemaElementException} if there is an * existing matching rule with the same numeric OID. * * @return The parent schema builder. * @throws ConflictingSchemaElementException * If there is an existing matching rule with the same numeric OID. */ public SchemaBuilder addToSchema() { return getSchemaBuilder().addMatchingRule(new MatchingRule(this), false); } @Override public Builder description(final String description) { return description0(description); opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/NameForm.java
@@ -51,9 +51,8 @@ * RDN of an entry with a given structural objectclass. */ public final class NameForm extends SchemaElement { /** * A fluent API for incrementally constructing name forms. */ /** A fluent API for incrementally constructing name forms. */ public static final class Builder extends SchemaElementBuilder<Builder> { private boolean isObsolete; private final List<String> names = new LinkedList<String>(); @@ -78,18 +77,8 @@ } /** * Adds this name form to the schema overwriting any existing name form * with the same numeric OID. * * @return The parent schema builder. */ public SchemaBuilder addToSchemaOverwrite() { return getSchemaBuilder().addNameForm(new NameForm(this), true); } /** * Adds this name form to the schema, throwing an * {@code ConflictingSchemaElementException} if there is an existing * Adds this name form to the schema, throwing a * {@code ConflictingSchemaElementException} if there is an existing * name form with the same numeric OID. * * @return The parent schema builder. @@ -101,6 +90,16 @@ return getSchemaBuilder().addNameForm(new NameForm(this), false); } /** * Adds this name form to the schema overwriting any existing name form * with the same numeric OID. * * @return The parent schema builder. */ public SchemaBuilder addToSchemaOverwrite() { return getSchemaBuilder().addNameForm(new NameForm(this), true); } @Override public Builder description(final String description) { return description0(description); opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/ObjectClass.java
@@ -86,18 +86,8 @@ } /** * Adds this object class to the schema overwriting any existing object class * with the same numeric OID. * * @return The parent schema builder. */ public SchemaBuilder addToSchemaOverwrite() { return getSchemaBuilder().addObjectClass(new ObjectClass(this), true); } /** * Adds this object class to the schema, throwing an * {@code ConflictingSchemaElementException} if there is an existing * Adds this object class to the schema, throwing a * {@code ConflictingSchemaElementException} if there is an existing * object class with the same numeric OID. * * @return The parent schema builder. @@ -109,6 +99,16 @@ return getSchemaBuilder().addObjectClass(new ObjectClass(this), false); } /** * Adds this object class to the schema overwriting any existing object class * with the same numeric OID. * * @return The parent schema builder. */ public SchemaBuilder addToSchemaOverwrite() { return getSchemaBuilder().addObjectClass(new ObjectClass(this), true); } @Override public Builder description(final String description) { return description0(description); opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/Syntax.java
@@ -55,9 +55,7 @@ */ public final class Syntax extends SchemaElement { /** * A fluent API for incrementally constructing syntaxes. */ /** A fluent API for incrementally constructing syntaxes. */ public static final class Builder extends SchemaElementBuilder<Builder> { private String oid; @@ -75,17 +73,9 @@ } /** * Adds this syntax to the schema overwriting any existing syntax with the same numeric OID. * * @return The parent schema builder. */ public SchemaBuilder addToSchemaOverwrite() { return getSchemaBuilder().addSyntax(new Syntax(this), true); } /** * Adds this syntax to the schema, throwing an {@code ConflictingSchemaElementException} * if there is an existing syntax with the same numeric OID. * Adds this syntax to the schema, throwing a * {@code ConflictingSchemaElementException} if there is an existing * syntax with the same numeric OID. * * @return The parent schema builder. * @throws ConflictingSchemaElementException @@ -96,6 +86,15 @@ } /** * Adds this syntax to the schema overwriting any existing syntax with the same numeric OID. * * @return The parent schema builder. */ public SchemaBuilder addToSchemaOverwrite() { return getSchemaBuilder().addSyntax(new Syntax(this), true); } /** * Adds this syntax to the schema - overwriting any existing syntax with the same numeric OID * if the overwrite parameter is set to {@code true}. *