You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2019/01/17 22:40:57 UTC
[directory-ldap-api] branch master updated: Removed the Mutable
classes (AttributeType, ObjectClass, MatchingRule)
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git
The following commit(s) were added to refs/heads/master by this push:
new 8d24139 Removed the Mutable classes (AttributeType, ObjectClass, MatchingRule)
8d24139 is described below
commit 8d241399d81dea6dca0ccab18bfca303ce23ea59
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Jan 17 23:40:55 2019 +0100
Removed the Mutable classes (AttributeType, ObjectClass, MatchingRule)
---
.../directory/api/ldap/entry/TestEntryUtils.java | 14 +-
.../directory/api/ldap/model/ldif/LdifReader.java | 5 +-
.../api/ldap/model/schema/AttributeType.java | 290 ++++++++++-
.../api/ldap/model/schema/MatchingRule.java | 87 +++-
.../ldap/model/schema/MutableAttributeType.java | 556 ---------------------
.../api/ldap/model/schema/MutableMatchingRule.java | 222 --------
.../api/ldap/model/schema/MutableObjectClass.java | 439 ----------------
.../api/ldap/model/schema/ObjectClass.java | 282 +++++++++++
.../model/schema/parsers/OpenLdapSchemaParser.java | 29 +-
.../ldap/model/schema/registries/Registries.java | 6 +-
.../registries/helper/AttributeTypeHelper.java | 19 +-
.../registries/helper/MatchingRuleHelper.java | 3 +-
.../model/entry/BinaryValueAttributeTypeTest.java | 11 +-
.../api/ldap/model/entry/BinaryValueTest.java | 9 +-
.../directory/api/ldap/model/entry/EntryUtils.java | 23 +-
.../api/ldap/model/schema/AttributeTypeTest.java | 4 +-
.../api/ldap/model/schema/MatchingRuleTest.java | 4 +-
.../api/ldap/model/schema/ObjectClassTest.java | 4 +-
.../model/schema/SchemaObjectRendererTest.java | 20 +-
.../ldap/model/schema/SchemaObjectSorterTest.java | 4 +-
.../api/ldap/model/schema/SchemaUtilsTest.java | 22 +-
.../parsers/FastOpenLdapSchemaParserTest.java | 23 +-
.../schema/parsers/OpenLdapSchemaParserTest.java | 23 +-
.../registries/AttributeTypeRegistryTest.java | 6 +-
.../ldap/schema/loader/SchemaEntityFactory.java | 11 +-
.../ldap/schema/loader/SchemaManagerAddTest.java | 91 ++--
.../ldap/schema/loader/SchemaManagerDelTest.java | 11 +-
27 files changed, 814 insertions(+), 1404 deletions(-)
diff --git a/integ/src/test/java/org/apache/directory/api/ldap/entry/TestEntryUtils.java b/integ/src/test/java/org/apache/directory/api/ldap/entry/TestEntryUtils.java
index 11b243b..ce3c6bd 100644
--- a/integ/src/test/java/org/apache/directory/api/ldap/entry/TestEntryUtils.java
+++ b/integ/src/test/java/org/apache/directory/api/ldap/entry/TestEntryUtils.java
@@ -25,8 +25,6 @@ import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.LdapComparator;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.PrepareString;
import org.apache.directory.api.ldap.model.schema.PrepareString.AssertionType;
@@ -108,7 +106,7 @@ public final class TestEntryUtils
/* no protection*/
static AttributeType getCaseIgnoringAttributeNoNumbersType()
{
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.3.1" );
+ AttributeType attributeType = new AttributeType( "1.1.3.1" );
LdapSyntax syntax = new LdapSyntax( "1.1.1.1", "", true );
syntax.setSyntaxChecker( new SyntaxChecker( "1.1.2.1" )
@@ -137,7 +135,7 @@ public final class TestEntryUtils
}
} );
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.2.1" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.2.1" );
matchingRule.setSyntax( syntax );
matchingRule.setLdapComparator( new LdapComparator<String>( matchingRule.getOid() )
@@ -181,7 +179,7 @@ public final class TestEntryUtils
/* no protection*/static AttributeType getIA5StringAttributeType()
{
- MutableAttributeType attributeType = new MutableAttributeType( "1.1" );
+ AttributeType attributeType = new AttributeType( "1.1" );
attributeType.addName( "1.1" );
LdapSyntax syntax = new LdapSyntax( "1.1.1", "", true );
@@ -199,7 +197,7 @@ public final class TestEntryUtils
}
} );
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.2" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.2" );
matchingRule.setSyntax( syntax );
matchingRule.setLdapComparator( new LdapComparator<String>( matchingRule.getOid() )
@@ -225,7 +223,7 @@ public final class TestEntryUtils
/* No protection */static AttributeType getBytesAttributeType()
{
- MutableAttributeType attributeType = new MutableAttributeType( "1.2" );
+ AttributeType attributeType = new AttributeType( "1.2" );
LdapSyntax syntax = new LdapSyntax( "1.2.1", "", true );
syntax.setSyntaxChecker( new SyntaxChecker( "1.2.1" )
@@ -240,7 +238,7 @@ public final class TestEntryUtils
}
} );
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.2.2" );
+ MatchingRule matchingRule = new MatchingRule( "1.2.2" );
matchingRule.setSyntax( syntax );
matchingRule.setLdapComparator( new ByteArrayComparator( "1.2.2" ) );
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
index 720765a..697cc7c 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
@@ -54,7 +54,6 @@ import org.apache.directory.api.ldap.model.name.Ava;
import org.apache.directory.api.ldap.model.name.Dn;
import org.apache.directory.api.ldap.model.name.Rdn;
import org.apache.directory.api.ldap.model.schema.AttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
import org.apache.directory.api.ldap.model.schema.SchemaManager;
import org.apache.directory.api.util.Base64;
import org.apache.directory.api.util.Chars;
@@ -1027,7 +1026,7 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
// The attribute does not exist already, create a fake one
if ( ( schemaManager != null ) && schemaManager.isRelaxed() )
{
- MutableAttributeType newAttributeType = new MutableAttributeType( "1.3.6.1.4.1.18060.0.9999." + oidCounter++ );
+ AttributeType newAttributeType = new AttributeType( "1.3.6.1.4.1.18060.0.9999." + oidCounter++ );
newAttributeType.setNames( attributeType );
newAttributeType.setSyntax( schemaManager.getLdapSyntaxRegistry().get( SchemaConstants.DIRECTORY_STRING_SYNTAX ) );
schemaManager.add( newAttributeType );
@@ -1449,7 +1448,7 @@ public class LdifReader implements Iterable<LdifEntry>, Closeable
&& schemaManager.isRelaxed() )
{
// Not found : create a new one
- MutableAttributeType newAttributeType = new MutableAttributeType( "1.3.6.1.4.1.18060.0.9999." + oidCounter++ );
+ AttributeType newAttributeType = new AttributeType( "1.3.6.1.4.1.18060.0.9999." + oidCounter++ );
newAttributeType.setNames( ava.getType() );
newAttributeType.setSyntax( schemaManager.getLdapSyntaxRegistry().get( SchemaConstants.DIRECTORY_STRING_SYNTAX ) );
schemaManager.add( newAttributeType );
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeType.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeType.java
index 70edf57..faca048 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeType.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/AttributeType.java
@@ -19,6 +19,7 @@
*/
package org.apache.directory.api.ldap.model.schema;
+import org.apache.directory.api.i18n.I18n;
/**
* An attributeType specification. attributeType specifications describe the
@@ -202,6 +203,22 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Tells if this AttributeType is Single Valued or not
+ *
+ * @param singleValued True if the AttributeType is single-valued
+ */
+ public void setSingleValued( boolean singleValued )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.isSingleValued = singleValued;
+ }
+
+
+ /**
* Gets whether or not this AttributeType can be modified by a user.
*
* @return true if users can modify it, false if only the directory can.
@@ -213,6 +230,22 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Tells if this AttributeType can be modified by a user or not
+ *
+ * @param userModifiable The flag to set
+ */
+ public void setUserModifiable( boolean userModifiable )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.canUserModify = userModifiable;
+ }
+
+
+ /**
* Gets whether or not this AttributeType is a collective attribute.
*
* @return true if the attribute is collective, false otherwise
@@ -224,6 +257,22 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the collective flag
+ *
+ * @param collective The new value to set
+ */
+ public void setCollective( boolean collective )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.isCollective = collective;
+ }
+
+
+ /**
* @return Tells if the AttributeType is relaxed (the SyntaxChecker will not be activated)
*/
public boolean isRelaxed()
@@ -255,6 +304,29 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the AttributeType usage, one of :
+ * <ul>
+ * <li>USER_APPLICATIONS</li>
+ * <li>DIRECTORY_OPERATION</li>
+ * <li>DISTRIBUTED_OPERATION</li>
+ * <li>DSA_OPERATION</li>
+ * </ul>
+ *
+ * @see UsageEnum
+ * @param usage The AttributeType usage
+ */
+ public void setUsage( UsageEnum usage )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.usage = usage;
+ }
+
+
+ /**
* Gets a length limit for this AttributeType.
*
* @return the length of the attribute
@@ -266,6 +338,23 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the length limit of this AttributeType based on its associated
+ * syntax.
+ *
+ * @param length the new length to set
+ */
+ public void setSyntaxLength( long length )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.syntaxLength = length;
+ }
+
+
+ /**
* Gets the the superior AttributeType of this AttributeType.
*
* @return the superior AttributeType for this AttributeType
@@ -288,6 +377,55 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the superior for this AttributeType
+ *
+ * @param superior The superior for this AttributeType
+ */
+ public void setSuperior( AttributeType superior )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.superior = superior;
+ this.superiorOid = superior.getOid();
+ }
+
+
+ /**
+ * Sets the superior oid for this AttributeType
+ *
+ * @param newSuperiorOid The superior oid for this AttributeType
+ */
+ public void setSuperior( String newSuperiorOid )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.superiorOid = newSuperiorOid;
+ }
+
+
+ /**
+ * Sets the superior AttributeType OID of this AttributeType
+ *
+ * @param superiorOid The superior AttributeType OID of this AttributeType
+ */
+ public void setSuperiorOid( String superiorOid )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.superiorOid = superiorOid;
+ }
+
+
+ /**
* Gets the Name of the superior AttributeType for this AttributeType.
*
* @return The Name of the superior AttributeType for this AttributeType.
@@ -317,6 +455,23 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the Syntax for this AttributeType
+ *
+ * @param syntax The Syntax for this AttributeType
+ */
+ public void setSyntax( LdapSyntax syntax )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.syntax = syntax;
+ this.syntaxOid = syntax.getOid();
+ }
+
+
+ /**
* Gets the Syntax name for this AttributeType's values.
*
* @return the value syntax name
@@ -346,6 +501,22 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the Syntax OID for this AttributeType
+ *
+ * @param syntaxOid The syntax OID for this AttributeType
+ */
+ public void setSyntaxOid( String syntaxOid )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.syntaxOid = syntaxOid;
+ }
+
+
+ /**
* Gets the MatchingRule for this AttributeType used for equality matching.
*
* @return the equality matching rule
@@ -357,6 +528,23 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the Equality MR for this AttributeType
+ *
+ * @param equality The Equality MR for this AttributeType
+ */
+ public void setEquality( MatchingRule equality )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.equality = equality;
+ this.equalityOid = equality.getOid();
+ }
+
+
+ /**
* Gets the Equality OID for this AttributeType's values.
*
* @return the value Equality's OID
@@ -368,6 +556,22 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the Equality OID for this AttributeType
+ *
+ * @param equalityOid The Equality OID for this AttributeType
+ */
+ public void setEqualityOid( String equalityOid )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.equalityOid = equalityOid;
+ }
+
+
+ /**
* Gets the Equality Name for this AttributeType's values.
*
* @return the value Equality's Name
@@ -397,6 +601,23 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the Ordering MR for this AttributeType
+ *
+ * @param ordering The Ordering MR for this AttributeType
+ */
+ public void setOrdering( MatchingRule ordering )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.ordering = ordering;
+ this.orderingOid = ordering.getOid();
+ }
+
+
+ /**
* Gets the MatchingRule name for this AttributeType used for Ordering matching.
*
* @return the Ordering matching rule name
@@ -426,6 +647,22 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the Ordering OID for this AttributeType
+ *
+ * @param orderingOid The Ordering OID for this AttributeType
+ */
+ public void setOrderingOid( String orderingOid )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.orderingOid = orderingOid;
+ }
+
+
+ /**
* Gets the MatchingRule for this AttributeType used for Substr matching.
*
* @return the Substr matching rule
@@ -437,6 +674,23 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the Substr MR for this AttributeType
+ *
+ * @param substring The Substr MR for this AttributeType
+ */
+ public void setSubstring( MatchingRule substring )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.substring = substring;
+ this.substringOid = substring.getOid();
+ }
+
+
+ /**
* Gets the MatchingRule name for this AttributeType used for Substring matching.
*
* @return the Substring matching rule name
@@ -466,6 +720,22 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
/**
+ * Sets the Substr OID for this AttributeType
+ *
+ * @param substrOid The Substr OID for this AttributeType
+ */
+ public void setSubstringOid( String substrOid )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.substringOid = substrOid;
+ }
+
+
+ /**
* Tells if the attributeType is a USER attribute or not
* @return true if this is a USER attributeType
*/
@@ -573,7 +843,7 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
@Override
public AttributeType copy()
{
- MutableAttributeType copy = new MutableAttributeType( oid );
+ AttributeType copy = new AttributeType( oid );
// Copy the SchemaObject common data
copy.copy( this );
@@ -830,4 +1100,22 @@ public class AttributeType extends AbstractSchemaObject implements Cloneable
return false;
}
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void clear()
+ {
+ // Clear the common elements
+ super.clear();
+
+ // Clear the references
+ equality = null;
+ ordering = null;
+ substring = null;
+ superior = null;
+ syntax = null;
+ }
}
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRule.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRule.java
index 92c287b..0a88002 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRule.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MatchingRule.java
@@ -19,8 +19,7 @@
*/
package org.apache.directory.api.ldap.model.schema;
-
-
+import org.apache.directory.api.i18n.I18n;
/**
* A matchingRule definition. MatchingRules associate a comparator and a
@@ -112,6 +111,23 @@ public class MatchingRule extends AbstractSchemaObject
/**
+ * Sets the Syntax
+ *
+ * @param ldapSyntax The Syntax
+ */
+ public void setSyntax( LdapSyntax ldapSyntax )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.ldapSyntax = ldapSyntax;
+ this.ldapSyntaxOid = ldapSyntax.getOid();
+ }
+
+
+ /**
* Gets the LdapSyntax OID used by this MatchingRule.
*
* @return the LdapSyntax of this MatchingRule
@@ -123,6 +139,22 @@ public class MatchingRule extends AbstractSchemaObject
/**
+ * Sets the Syntax's OID
+ *
+ * @param oid The Syntax's OID
+ */
+ public void setSyntaxOid( String oid )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.ldapSyntaxOid = oid;
+ }
+
+
+ /**
* Gets the LdapComparator enabling the use of this MatchingRule for ORDERING
* and sorted indexing.
*
@@ -133,6 +165,23 @@ public class MatchingRule extends AbstractSchemaObject
return ldapComparator;
}
+ /**
+ * Sets the LdapComparator
+ *
+ * @param ldapComparator The LdapComparator
+ */
+ @SuppressWarnings("unchecked")
+ public void setLdapComparator( LdapComparator<?> ldapComparator )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.ldapComparator = ( LdapComparator<? super Object> ) ldapComparator;
+ }
+
+
/**
* Gets the Normalizer enabling the use of this MatchingRule for EQUALITY
@@ -147,6 +196,22 @@ public class MatchingRule extends AbstractSchemaObject
/**
+ * Sets the Normalizer
+ *
+ * @param normalizer The Normalizer
+ */
+ public void setNormalizer( Normalizer normalizer )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.normalizer = normalizer;
+ }
+
+
+ /**
* @see Object#toString()
*/
@Override
@@ -162,7 +227,7 @@ public class MatchingRule extends AbstractSchemaObject
@Override
public MatchingRule copy()
{
- MatchingRule copy = new MutableMatchingRule( oid );
+ MatchingRule copy = new MatchingRule( oid );
// Copy the SchemaObject common data
copy.copy( this );
@@ -281,4 +346,20 @@ public class MatchingRule extends AbstractSchemaObject
return true;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void clear()
+ {
+ // Clear the common elements
+ super.clear();
+
+ // Clear the references
+ ldapComparator = null;
+ ldapSyntax = null;
+ normalizer = null;
+ }
}
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableAttributeType.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableAttributeType.java
deleted file mode 100644
index 4be1f52..0000000
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableAttributeType.java
+++ /dev/null
@@ -1,556 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.directory.api.ldap.model.schema;
-
-
-import org.apache.directory.api.i18n.I18n;
-
-
-/**
- * An attributeType specification. attributeType specifications describe the
- * nature of attributes within the directory. The attributeType specification's
- * properties are accessible through this interface.
- * <p>
- * According to ldapbis [MODELS]:
- * </p>
- *
- * <pre>
- * 4.1.2. Attribute Types
- *
- * Attribute Type definitions are written according to the ABNF:
- *
- * AttributeTypeDescription = LPAREN WSP
- * numericoid ; object identifier
- * [ SP "NAME" SP qdescrs ] ; short names (descriptors)
- * [ SP "DESC" SP qdstring ] ; description
- * [ SP "OBSOLETE" ] ; not active
- * [ SP "SUP" SP oid ] ; supertype
- * [ SP "EQUALITY" SP oid ] ; equality matching rule
- * [ SP "ORDERING" SP oid ] ; ordering matching rule
- * [ SP "SUBSTR" SP oid ] ; substrings matching rule
- * [ SP "SYNTAX" SP noidlen ] ; value syntax
- * [ SP "SINGLE-VALUE" ] ; single-value
- * [ SP "COLLECTIVE" ] ; collective
- * [ SP "NO-USER-MODIFICATION" ]; not user modifiable
- * [ SP "USAGE" SP usage ] ; usage
- * extensions WSP RPAREN ; extensions
- *
- * usage = "userApplications" / ; user
- * "directoryOperation" / ; directory operational
- * "distributedOperation" / ; DSA-shared operational
- * "dSAOperation" ; DSA-specific operational
- *
- * where:
- * [numericoid] is object identifier assigned to this attribute type;
- * NAME [qdescrs] are short names (descriptors) identifying this
- * attribute type;
- * DESC [qdstring] is a short descriptive string;
- * OBSOLETE indicates this attribute type is not active;
- * SUP oid specifies the direct supertype of this type;
- * EQUALITY, ORDERING, SUBSTRING provide the oid of the equality,
- * ordering, and substrings matching rules, respectively;
- * SYNTAX identifies value syntax by object identifier and may suggest
- * a minimum upper bound;
- * COLLECTIVE indicates this attribute type is collective [X.501];
- * NO-USER-MODIFICATION indicates this attribute type is not user
- * modifiable;
- * USAGE indicates the application of this attribute type; and
- * [extensions] describe extensions.
- *
- * Each attribute type description must contain at least one of the SUP
- * or SYNTAX fields.
- *
- * Usage of userApplications, the default, indicates that attributes of
- * this type represent user information. That is, they are user
- * attributes.
- *
- * COLLECTIVE requires usage userApplications. Use of collective
- * attribute types in LDAP is not discussed in this technical
- * specification.
- *
- * A usage of directoryOperation, distributedOperation, or dSAOperation
- * indicates that attributes of this type represent operational and/or
- * administrative information. That is, they are operational attributes.
- *
- * directoryOperation usage indicates that the attribute of this type is
- * a directory operational attribute. distributedOperation usage
- * indicates that the attribute of this DSA-shared usage operational
- * attribute. dSAOperation usage indicates that the attribute of this
- * type is a DSA-specific operational attribute.
- *
- * NO-USER-MODIFICATION requires an operational usage.
- *
- * Note that the [AttributeTypeDescription] does not list the matching
- * rules which can be used with that attribute type in an extensibleMatch
- * search filter. This is done using the 'matchingRuleUse' attribute
- * described in Section 4.1.4.
- *
- * This document refines the schema description of X.501 by requiring
- * that the SYNTAX field in an [AttributeTypeDescription] be a string
- * representation of an object identifier for the LDAP string syntax
- * definition with an optional indication of the suggested minimum bound
- * of a value of this attribute.
- *
- * A suggested minimum upper bound on the number of characters in a value
- * with a string-based syntax, or the number of bytes in a value for all
- * other syntaxes, may be indicated by appending this bound count inside
- * of curly braces following the syntax's OBJECT IDENTIFIER in an
- *
- * Attribute Type Description. This bound is not part of the syntax name
- * itself. For instance, "1.3.6.4.1.1466.0{64}" suggests that server
- * implementations should allow a string to be 64 characters long,
- * although they may allow longer strings. Note that a single character
- * of the Directory String syntax may be encoded in more than one octet
- * since UTF-8 is a variable-length encoding.
- * </pre>
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252 Section 4.2</a>
- * @see <a
- * href="http://www.ietf.org/internet-drafts/draft-ietf-ldapbis-models-11.txt">
- * ldapbis [MODELS]</a>
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class MutableAttributeType extends AttributeType
-{
- /** The mandatory serialVersionUID */
- public static final long serialVersionUID = 1L;
-
-
- /**
- * Creates a AttributeType object using a unique OID.
- *
- * @param oid the OID for this AttributeType
- */
- public MutableAttributeType( String oid )
- {
- super( oid );
- }
-
-
- /**
- * Tells if this AttributeType is Single Valued or not
- *
- * @param singleValued True if the AttributeType is single-valued
- */
- public void setSingleValued( boolean singleValued )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.isSingleValued = singleValued;
- }
-
-
- /**
- * Tells if this AttributeType can be modified by a user or not
- *
- * @param userModifiable The flag to set
- */
- public void setUserModifiable( boolean userModifiable )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.canUserModify = userModifiable;
- }
-
-
- /**
- * Updates the collective flag
- *
- * @param collective The new value to set
- */
- public void updateCollective( boolean collective )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.isCollective = collective;
- }
-
-
- /**
- * Sets the collective flag
- *
- * @param collective The new value to set
- */
- public void setCollective( boolean collective )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.isCollective = collective;
- }
-
-
- /**
- * Sets the AttributeType usage, one of :
- * <ul>
- * <li>USER_APPLICATIONS</li>
- * <li>DIRECTORY_OPERATION</li>
- * <li>DISTRIBUTED_OPERATION</li>
- * <li>DSA_OPERATION</li>
- * </ul>
- *
- * @see UsageEnum
- * @param usage The AttributeType usage
- */
- public void setUsage( UsageEnum usage )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.usage = usage;
- }
-
-
- /**
- * Updates the AttributeType usage, one of :
- * <ul>
- * <li>USER_APPLICATIONS</li>
- * <li>DIRECTORY_OPERATION</li>
- * <li>DISTRIBUTED_OPERATION</li>
- * <li>DSA_OPERATION</li>
- * </ul>
- *
- * @see UsageEnum
- * @param newUsage The AttributeType usage
- */
- public void updateUsage( UsageEnum newUsage )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.usage = newUsage;
- }
-
-
- /**
- * Sets the length limit of this AttributeType based on its associated
- * syntax.
- *
- * @param length the new length to set
- */
- public void setSyntaxLength( long length )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.syntaxLength = length;
- }
-
-
- /**
- * Sets the superior AttributeType OID of this AttributeType
- *
- * @param superiorOid The superior AttributeType OID of this AttributeType
- */
- public void setSuperiorOid( String superiorOid )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.superiorOid = superiorOid;
- }
-
-
- /**
- * Sets the superior for this AttributeType
- *
- * @param superior The superior for this AttributeType
- */
- public void setSuperior( AttributeType superior )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.superior = superior;
- this.superiorOid = superior.getOid();
- }
-
-
- /**
- * Sets the superior oid for this AttributeType
- *
- * @param newSuperiorOid The superior oid for this AttributeType
- */
- public void setSuperior( String newSuperiorOid )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.superiorOid = newSuperiorOid;
- }
-
-
- /**
- * Update the associated Superior AttributeType, even if the SchemaObject is readOnly
- *
- * @param newSuperior The superior for this AttributeType
- */
- public void updateSuperior( MutableAttributeType newSuperior )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.superior = newSuperior;
- this.superiorOid = newSuperior.getOid();
- }
-
-
- /**
- * Sets the Syntax OID for this AttributeType
- *
- * @param syntaxOid The syntax OID for this AttributeType
- */
- public void setSyntaxOid( String syntaxOid )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.syntaxOid = syntaxOid;
- }
-
-
- /**
- * Sets the Syntax for this AttributeType
- *
- * @param syntax The Syntax for this AttributeType
- */
- public void setSyntax( LdapSyntax syntax )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.syntax = syntax;
- this.syntaxOid = syntax.getOid();
- }
-
-
- /**
- * Update the associated Syntax, even if the SchemaObject is readOnly
- *
- * @param newSyntax The Syntax for this AttributeType
- */
- public void updateSyntax( LdapSyntax newSyntax )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.syntax = newSyntax;
- this.syntaxOid = newSyntax.getOid();
- }
-
-
- /**
- * Sets the Equality OID for this AttributeType
- *
- * @param equalityOid The Equality OID for this AttributeType
- */
- public void setEqualityOid( String equalityOid )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.equalityOid = equalityOid;
- }
-
-
- /**
- * Sets the Equality MR for this AttributeType
- *
- * @param equality The Equality MR for this AttributeType
- */
- public void setEquality( MatchingRule equality )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.equality = equality;
- this.equalityOid = equality.getOid();
- }
-
-
- /**
- * Update the associated Equality MatchingRule, even if the SchemaObject is readOnly
- *
- * @param newEquality The Equality MR for this AttributeType
- */
- public void updateEquality( MatchingRule newEquality )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.equality = newEquality;
- this.equalityOid = newEquality.getOid();
- }
-
-
- /**
- * Sets the Ordering OID for this AttributeType
- *
- * @param orderingOid The Ordering OID for this AttributeType
- */
- public void setOrderingOid( String orderingOid )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.orderingOid = orderingOid;
- }
-
-
- /**
- * Sets the Ordering MR for this AttributeType
- *
- * @param ordering The Ordering MR for this AttributeType
- */
- public void setOrdering( MatchingRule ordering )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.ordering = ordering;
- this.orderingOid = ordering.getOid();
- }
-
-
- /**
- * Update the associated Ordering MatchingRule, even if the SchemaObject is readOnly
- *
- * @param newOrdering The Ordering MR for this AttributeType
- */
- public void updateOrdering( MatchingRule newOrdering )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.ordering = newOrdering;
- this.orderingOid = newOrdering.getOid();
- }
-
-
- /**
- * Sets the Substr OID for this AttributeType
- *
- * @param substrOid The Substr OID for this AttributeType
- */
- public void setSubstringOid( String substrOid )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.substringOid = substrOid;
- }
-
-
- /**
- * Sets the Substr MR for this AttributeType
- *
- * @param substring The Substr MR for this AttributeType
- */
- public void setSubstring( MatchingRule substring )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.substring = substring;
- this.substringOid = substring.getOid();
- }
-
-
- /**
- * Update the associated Substring MatchingRule, even if the SchemaObject is readOnly
- *
- * @param newSubstring The Substr MR for this AttributeType
- */
- public void updateSubstring( MatchingRule newSubstring )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.substring = newSubstring;
- this.substringOid = newSubstring.getOid();
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void clear()
- {
- // Clear the common elements
- super.clear();
-
- // Clear the references
- equality = null;
- ordering = null;
- substring = null;
- superior = null;
- syntax = null;
- }
-}
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableMatchingRule.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableMatchingRule.java
deleted file mode 100644
index 481fd59..0000000
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableMatchingRule.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.directory.api.ldap.model.schema;
-
-
-import org.apache.directory.api.i18n.I18n;
-
-
-/**
- * A matchingRule definition. MatchingRules associate a comparator and a
- * normalizer, forming the basic tools necessary to assert actions against
- * attribute values. MatchingRules are associated with a specific Syntax for the
- * purpose of resolving a normalized form and for comparisons.
- * <p>
- * According to ldapbis [MODELS]:
- * </p>
- *
- * <pre>
- * 4.1.3. Matching Rules
- *
- * Matching rules are used by servers to compare attribute values against
- * assertion values when performing Search and Compare operations. They
- * are also used to identify the value to be added or deleted when
- * modifying entries, and are used when comparing a purported
- * distinguished name with the name of an entry.
- *
- * A matching rule specifies the syntax of the assertion value.
- *
- * Each matching rule is identified by an object identifier (OID) and,
- * optionally, one or more short names (descriptors).
- *
- * Matching rule definitions are written according to the ABNF:
- *
- * MatchingRuleDescription = LPAREN WSP
- * numericoid ; object identifier
- * [ SP "NAME" SP qdescrs ] ; short names (descriptors)
- * [ SP "DESC" SP qdstring ] ; description
- * [ SP "OBSOLETE" ] ; not active
- * SP "SYNTAX" SP numericoid ; assertion syntax
- * extensions WSP RPAREN ; extensions
- *
- * where:
- * [numericoid] is object identifier assigned to this matching rule;
- * NAME [qdescrs] are short names (descriptors) identifying this
- * matching rule;
- * DESC [qdstring] is a short descriptive string;
- * OBSOLETE indicates this matching rule is not active;
- * SYNTAX identifies the assertion syntax by object identifier; and
- * [extensions] describe extensions.
- * </pre>
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252 Section 4.5</a>
- * @see <a
- * href="http://www.ietf.org/internet-drafts/draft-ietf-ldapbis-models-11.txt">ldapbis
- * [MODELS]</a>
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class MutableMatchingRule extends MatchingRule
-{
- /** The mandatory serialVersionUID */
- public static final long serialVersionUID = 1L;
-
-
- /**
- * Creates a new instance of MatchingRule.
- *
- * @param oid The MatchingRule OID
- */
- public MutableMatchingRule( String oid )
- {
- super( oid );
- }
-
-
- /**
- * Sets the Syntax's OID
- *
- * @param oid The Syntax's OID
- */
- public void setSyntaxOid( String oid )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.ldapSyntaxOid = oid;
- }
-
-
- /**
- * Sets the Syntax
- *
- * @param ldapSyntax The Syntax
- */
- public void setSyntax( LdapSyntax ldapSyntax )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.ldapSyntax = ldapSyntax;
- this.ldapSyntaxOid = ldapSyntax.getOid();
- }
-
-
- /**
- * Update the associated Syntax, even if the SchemaObject is readOnly
- *
- * @param ldapSyntax The Syntax
- */
- public void updateSyntax( LdapSyntax ldapSyntax )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.ldapSyntax = ldapSyntax;
- this.ldapSyntaxOid = ldapSyntax.getOid();
- }
-
-
- /**
- * Sets the LdapComparator
- *
- * @param ldapComparator The LdapComparator
- */
- @SuppressWarnings("unchecked")
- public void setLdapComparator( LdapComparator<?> ldapComparator )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.ldapComparator = ( LdapComparator<? super Object> ) ldapComparator;
- }
-
-
- /**
- * Update the associated Comparator, even if the SchemaObject is readOnly
- *
- * @param ldapComparator The LdapComparator
- */
- @SuppressWarnings("unchecked")
- public void updateLdapComparator( LdapComparator<?> ldapComparator )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.ldapComparator = ( LdapComparator<? super Object> ) ldapComparator;
- }
-
-
- /**
- * Sets the Normalizer
- *
- * @param normalizer The Normalizer
- */
- public void setNormalizer( Normalizer normalizer )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.normalizer = normalizer;
- }
-
-
- /**
- * Update the associated Normalizer, even if the SchemaObject is readOnly
- *
- * @param normalizer The Normalizer
- */
- public void updateNormalizer( Normalizer normalizer )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.normalizer = normalizer;
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void clear()
- {
- // Clear the common elements
- super.clear();
-
- // Clear the references
- ldapComparator = null;
- ldapSyntax = null;
- normalizer = null;
- }
-}
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableObjectClass.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableObjectClass.java
deleted file mode 100644
index 59bd3c8..0000000
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/MutableObjectClass.java
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.directory.api.ldap.model.schema;
-
-
-import java.util.List;
-
-import org.apache.directory.api.i18n.I18n;
-
-
-/**
- * An objectClass definition.
- * <p>
- * According to ldapbis [MODELS]:
- * </p>
- *
- * <pre>
- * Object Class definitions are written according to the ABNF:
- *
- * ObjectClassDescription = LPAREN WSP
- * numericoid ; object identifier
- * [ SP "NAME" SP qdescrs ] ; short names (descriptors)
- * [ SP "DESC" SP qdstring ] ; description
- * [ SP "OBSOLETE" ] ; not active
- * [ SP "SUP" SP oids ] ; superior object classes
- * [ SP kind ] ; kind of class
- * [ SP "MUST" SP oids ] ; attribute types
- * [ SP "MAY" SP oids ] ; attribute types
- * extensions WSP RPAREN
- *
- * kind = "ABSTRACT" / "STRUCTURAL" / "AUXILIARY"
- *
- * where:
- * [numericoid] is object identifier assigned to this object class;
- * NAME [qdescrs] are short names (descriptors) identifying this object
- * class;
- * DESC [qdstring] is a short descriptive string;
- * OBSOLETE indicates this object class is not active;
- * SUP [oids] specifies the direct superclasses of this object class;
- * the kind of object class is indicated by one of ABSTRACT,
- * STRUCTURAL, or AUXILIARY, default is STRUCTURAL;
- * MUST and MAY specify the sets of required and allowed attribute
- * types, respectively; and
- * [extensions] describe extensions.
- * </pre>
- *
- * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252 Section 4.4</a>
- * @see <a
- * href="http://www.ietf.org/internet-drafts/draft-ietf-ldapbis-models-11.txt">ldapbis
- * [MODELS]</a>
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class MutableObjectClass extends ObjectClass
-{
- /** The mandatory serialVersionUID */
- public static final long serialVersionUID = 1L;
-
-
- /**
- * Creates a new instance of MatchingRuleUseDescription
- * @param oid the OID for this objectClass
- */
- public MutableObjectClass( String oid )
- {
- super( oid );
- }
-
-
- /**
- * Add some allowed AttributeType
- *
- * @param oids The attributeType oids
- */
- public void addMayAttributeTypeOids( String... oids )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- for ( String oid : oids )
- {
- mayAttributeTypeOids.add( oid );
- }
- }
-
-
- /**
- * Add some allowed AttributeTypes
- *
- * @param attributeTypes The attributeTypes
- */
- public void addMayAttributeTypes( AttributeType... attributeTypes )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- for ( AttributeType attributeType : attributeTypes )
- {
- if ( !mayAttributeTypeOids.contains( attributeType.getOid() ) )
- {
- mayAttributeTypes.add( attributeType );
- mayAttributeTypeOids.add( attributeType.getOid() );
- }
- }
- }
-
-
- /**
- * @param mayAttributeTypeOids the mayAttributeTypeOids to set
- */
- public void setMayAttributeTypeOids( List<String> mayAttributeTypeOids )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.mayAttributeTypeOids = mayAttributeTypeOids;
- }
-
-
- /**
- * Sets the list of allowed AttributeTypes
- *
- * @param mayAttributeTypes the list of allowed AttributeTypes
- */
- public void setMayAttributeTypes( List<AttributeType> mayAttributeTypes )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.mayAttributeTypes = mayAttributeTypes;
-
- // update the OIDS now
- mayAttributeTypeOids.clear();
-
- for ( AttributeType may : mayAttributeTypes )
- {
- mayAttributeTypeOids.add( may.getOid() );
- }
- }
-
-
- /**
- * Update the associated MAY AttributeType, even if the SchemaObject is readOnly
- *
- * @param mayAttributeTypes the list of allowed AttributeTypes
- */
- public void updateMayAttributeTypes( List<AttributeType> mayAttributeTypes )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.mayAttributeTypes.clear();
- this.mayAttributeTypes.addAll( mayAttributeTypes );
-
- // update the OIDS now
- mayAttributeTypeOids.clear();
-
- for ( AttributeType may : mayAttributeTypes )
- {
- mayAttributeTypeOids.add( may.getOid() );
- }
- }
-
-
- /**
- * Add some required AttributeType OIDs
- *
- * @param oids The attributeType OIDs
- */
- public void addMustAttributeTypeOids( String... oids )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- for ( String oid : oids )
- {
- mustAttributeTypeOids.add( oid );
- }
- }
-
-
- /**
- * Add some required AttributeTypes
- *
- * @param attributeTypes The attributeTypse
- */
- public void addMustAttributeTypes( AttributeType... attributeTypes )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- for ( AttributeType attributeType : attributeTypes )
- {
- if ( !mustAttributeTypeOids.contains( attributeType.getOid() ) )
- {
- mustAttributeTypes.add( attributeType );
- mustAttributeTypeOids.add( attributeType.getOid() );
- }
- }
- }
-
-
- /**
- * @param mustAttributeTypeOids the mustAttributeTypeOids to set
- */
- public void setMustAttributeTypeOids( List<String> mustAttributeTypeOids )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.mustAttributeTypeOids = mustAttributeTypeOids;
- }
-
-
- /**
- * Sets the list of required AttributeTypes
- *
- * @param mustAttributeTypes the list of required AttributeTypes
- */
- public void setMustAttributeTypes( List<AttributeType> mustAttributeTypes )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.mustAttributeTypes = mustAttributeTypes;
-
- // update the OIDS now
- mustAttributeTypeOids.clear();
-
- for ( AttributeType may : mustAttributeTypes )
- {
- mustAttributeTypeOids.add( may.getOid() );
- }
- }
-
-
- /**
- * Update the associated MUST AttributeType, even if the SchemaObject is readOnly
- *
- * @param mustAttributeTypes the list of allowed AttributeTypes
- */
- public void updateMustAttributeTypes( List<AttributeType> mustAttributeTypes )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.mustAttributeTypes.clear();
- this.mustAttributeTypes.addAll( mustAttributeTypes );
-
- // update the OIDS now
- mustAttributeTypeOids.clear();
-
- for ( AttributeType must : mustAttributeTypes )
- {
- mustAttributeTypeOids.add( must.getOid() );
- }
- }
-
-
- /**
- * Add some superior ObjectClass OIDs
- *
- * @param oids The superior ObjectClass OIDs
- */
- public void addSuperiorOids( String... oids )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- for ( String oid : oids )
- {
- if ( !superiorOids.contains( oid ) )
- {
- superiorOids.add( oid );
- }
- }
- }
-
-
- /**
- * Add some superior ObjectClasses
- *
- * @param objectClasses The superior ObjectClasses
- */
- public void addSuperior( MutableObjectClass... objectClasses )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- for ( MutableObjectClass objectClass : objectClasses )
- {
- if ( !superiorOids.contains( objectClass.getOid() ) )
- {
- superiorOids.add( objectClass.getOid() );
- superiors.add( objectClass );
- }
- }
- }
-
-
- /**
- * Sets the superior object classes
- *
- * @param superiors the object classes to set
- */
- public void setSuperiors( List<ObjectClass> superiors )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.superiors = superiors;
-
- // update the OIDS now
- superiorOids.clear();
-
- for ( ObjectClass oc : superiors )
- {
- superiorOids.add( oc.getOid() );
- }
- }
-
-
- /**
- * Update the associated SUPERIORS ObjectClasses, even if the SchemaObject is readOnly
- *
- * @param superiors the object classes to set
- */
- public void updateSuperiors( List<ObjectClass> superiors )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.superiors.clear();
- this.superiors.addAll( superiors );
-
- // update the OIDS now
- superiorOids.clear();
-
- for ( ObjectClass oc : superiors )
- {
- superiorOids.add( oc.getOid() );
- }
- }
-
-
- /**
- * Sets the superior object class OIDs
- *
- * @param superiorOids the object class OIDs to set
- */
- public void setSuperiorOids( List<String> superiorOids )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.superiorOids = superiorOids;
- }
-
-
- /**
- * Set the ObjectClass type, one of ABSTRACT, AUXILIARY or STRUCTURAL.
- *
- * @param objectClassType The ObjectClassType value
- */
- public void setType( ObjectClassTypeEnum objectClassType )
- {
- if ( locked )
- {
- throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
- }
-
- this.objectClassType = objectClassType;
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void clear()
- {
- // Clear the common elements
- super.clear();
-
- // Clear the references
- mayAttributeTypes.clear();
- mayAttributeTypeOids.clear();
- mustAttributeTypes.clear();
- mustAttributeTypeOids.clear();
- superiors.clear();
- superiorOids.clear();
- }
-}
\ No newline at end of file
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/ObjectClass.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/ObjectClass.java
index f1f410a..4acead4 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/ObjectClass.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/ObjectClass.java
@@ -23,6 +23,8 @@ package org.apache.directory.api.ldap.model.schema;
import java.util.ArrayList;
import java.util.List;
+import org.apache.directory.api.i18n.I18n;
+
/**
* An objectClass definition.
@@ -131,6 +133,86 @@ public class ObjectClass extends AbstractSchemaObject
/**
+ * Add some allowed AttributeType
+ *
+ * @param oids The attributeType oids
+ */
+ public void addMayAttributeTypeOids( String... oids )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ for ( String oid : oids )
+ {
+ mayAttributeTypeOids.add( oid );
+ }
+ }
+
+
+ /**
+ * Add some allowed AttributeTypes
+ *
+ * @param attributeTypes The attributeTypes
+ */
+ public void addMayAttributeTypes( AttributeType... attributeTypes )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ for ( AttributeType attributeType : attributeTypes )
+ {
+ if ( !mayAttributeTypeOids.contains( attributeType.getOid() ) )
+ {
+ mayAttributeTypes.add( attributeType );
+ mayAttributeTypeOids.add( attributeType.getOid() );
+ }
+ }
+ }
+
+
+ /**
+ * @param mayAttributeTypeOids the mayAttributeTypeOids to set
+ */
+ public void setMayAttributeTypeOids( List<String> mayAttributeTypeOids )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.mayAttributeTypeOids = mayAttributeTypeOids;
+ }
+
+
+ /**
+ * Sets the list of allowed AttributeTypes
+ *
+ * @param mayAttributeTypes the list of allowed AttributeTypes
+ */
+ public void setMayAttributeTypes( List<AttributeType> mayAttributeTypes )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.mayAttributeTypes = mayAttributeTypes;
+
+ // update the OIDS now
+ mayAttributeTypeOids.clear();
+
+ for ( AttributeType may : mayAttributeTypes )
+ {
+ mayAttributeTypeOids.add( may.getOid() );
+ }
+ }
+
+
+ /**
* @return the mustAttributeTypeOids
*/
public List<String> getMustAttributeTypeOids()
@@ -149,6 +231,86 @@ public class ObjectClass extends AbstractSchemaObject
/**
+ * Add some required AttributeType OIDs
+ *
+ * @param oids The attributeType OIDs
+ */
+ public void addMustAttributeTypeOids( String... oids )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ for ( String oid : oids )
+ {
+ mustAttributeTypeOids.add( oid );
+ }
+ }
+
+
+ /**
+ * Add some required AttributeTypes
+ *
+ * @param attributeTypes The attributeTypse
+ */
+ public void addMustAttributeTypes( AttributeType... attributeTypes )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ for ( AttributeType attributeType : attributeTypes )
+ {
+ if ( !mustAttributeTypeOids.contains( attributeType.getOid() ) )
+ {
+ mustAttributeTypes.add( attributeType );
+ mustAttributeTypeOids.add( attributeType.getOid() );
+ }
+ }
+ }
+
+
+ /**
+ * @param mustAttributeTypeOids the mustAttributeTypeOids to set
+ */
+ public void setMustAttributeTypeOids( List<String> mustAttributeTypeOids )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.mustAttributeTypeOids = mustAttributeTypeOids;
+ }
+
+
+ /**
+ * Sets the list of required AttributeTypes
+ *
+ * @param mustAttributeTypes the list of required AttributeTypes
+ */
+ public void setMustAttributeTypes( List<AttributeType> mustAttributeTypes )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.mustAttributeTypes = mustAttributeTypes;
+
+ // update the OIDS now
+ mustAttributeTypeOids.clear();
+
+ for ( AttributeType may : mustAttributeTypes )
+ {
+ mustAttributeTypeOids.add( may.getOid() );
+ }
+ }
+
+
+ /**
* Gets the superclasses of this ObjectClass.
*
* @return the superclasses
@@ -171,6 +333,91 @@ public class ObjectClass extends AbstractSchemaObject
/**
+ * Add some superior ObjectClass OIDs
+ *
+ * @param oids The superior ObjectClass OIDs
+ */
+ public void addSuperiorOids( String... oids )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ for ( String oid : oids )
+ {
+ if ( !superiorOids.contains( oid ) )
+ {
+ superiorOids.add( oid );
+ }
+ }
+ }
+
+
+ /**
+ * Add some superior ObjectClasses
+ *
+ * @param objectClasses The superior ObjectClasses
+ */
+ public void addSuperior( ObjectClass... objectClasses )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ for ( ObjectClass objectClass : objectClasses )
+ {
+ if ( !superiorOids.contains( objectClass.getOid() ) )
+ {
+ superiorOids.add( objectClass.getOid() );
+ superiors.add( objectClass );
+ }
+ }
+ }
+
+
+ /**
+ * Sets the superior object classes
+ *
+ * @param superiors the object classes to set
+ */
+ public void setSuperiors( List<ObjectClass> superiors )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.superiors = superiors;
+
+ // update the OIDS now
+ superiorOids.clear();
+
+ for ( ObjectClass oc : superiors )
+ {
+ superiorOids.add( oc.getOid() );
+ }
+ }
+
+
+ /**
+ * Sets the superior object class OIDs
+ *
+ * @param superiorOids the object class OIDs to set
+ */
+ public void setSuperiorOids( List<String> superiorOids )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.superiorOids = superiorOids;
+ }
+
+
+ /**
* Gets the type of this ObjectClass as a type safe enum.
*
* @return the ObjectClass type as an enum
@@ -182,6 +429,22 @@ public class ObjectClass extends AbstractSchemaObject
/**
+ * Set the ObjectClass type, one of ABSTRACT, AUXILIARY or STRUCTURAL.
+ *
+ * @param objectClassType The ObjectClassType value
+ */
+ public void setType( ObjectClassTypeEnum objectClassType )
+ {
+ if ( locked )
+ {
+ throw new UnsupportedOperationException( I18n.err( I18n.ERR_13700_CANNOT_MODIFY_LOCKED_SCHEMA_OBJECT, getName() ) );
+ }
+
+ this.objectClassType = objectClassType;
+ }
+
+
+ /**
* Tells if the current ObjectClass is STRUCTURAL
*
* @return <code>true</code> if the ObjectClass is STRUCTURAL
@@ -488,4 +751,23 @@ public class ObjectClass extends AbstractSchemaObject
return true;
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void clear()
+ {
+ // Clear the common elements
+ super.clear();
+
+ // Clear the references
+ mayAttributeTypes.clear();
+ mayAttributeTypeOids.clear();
+ mustAttributeTypes.clear();
+ mustAttributeTypeOids.clear();
+ superiors.clear();
+ superiorOids.clear();
+ }
}
\ No newline at end of file
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParser.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParser.java
index dad476f..c54322c 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParser.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParser.java
@@ -45,11 +45,8 @@ import org.apache.directory.api.ldap.model.schema.DitStructureRule;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
import org.apache.directory.api.ldap.model.schema.MatchingRuleUse;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableObjectClass;
-import org.apache.directory.api.ldap.model.schema.NameForm;
import org.apache.directory.api.ldap.model.schema.ObjectClass;
+import org.apache.directory.api.ldap.model.schema.NameForm;
import org.apache.directory.api.ldap.model.schema.ObjectClassTypeEnum;
import org.apache.directory.api.ldap.model.schema.SchemaObject;
import org.apache.directory.api.ldap.model.schema.UsageEnum;
@@ -78,7 +75,7 @@ public class OpenLdapSchemaParser
private List<Object> schemaDescriptions = new ArrayList<>();
/** The list of attribute type, initialized by splitParsedSchemaDescriptions() */
- private List<MutableAttributeType> attributeTypes;
+ private List<AttributeType> attributeTypes;
/** The list of object classes, initialized by splitParsedSchemaDescriptions()*/
private List<ObjectClass> objectClasses;
@@ -517,7 +514,7 @@ public class OpenLdapSchemaParser
*
* @return the attribute types
*/
- public List<MutableAttributeType> getAttributeTypes()
+ public List<AttributeType> getAttributeTypes()
{
return attributeTypes;
}
@@ -566,7 +563,7 @@ public class OpenLdapSchemaParser
}
else if ( obj instanceof AttributeType )
{
- MutableAttributeType attributeType = ( MutableAttributeType ) obj;
+ AttributeType attributeType = ( AttributeType ) obj;
attributeTypes.add( attributeType );
}
@@ -593,7 +590,7 @@ public class OpenLdapSchemaParser
}
// apply object identifier macros to attribute types
- for ( MutableAttributeType attributeType : attributeTypes )
+ for ( AttributeType attributeType : attributeTypes )
{
attributeType.setOid( getResolveOid( attributeType.getOid() ) );
attributeType.setSyntaxOid( getResolveOid( attributeType.getSyntaxOid() ) );
@@ -2153,7 +2150,7 @@ public class OpenLdapSchemaParser
* @param pos The position in the Schema
* @throws LdapSchemaException If the schema is wrong
*/
- private static void getNoidLenStrict( MutableAttributeType attributeType, PosSchema pos ) throws LdapSchemaException
+ private static void getNoidLenStrict( AttributeType attributeType, PosSchema pos ) throws LdapSchemaException
{
// Get the oid
String oid = getOidStrict( pos );
@@ -2215,7 +2212,7 @@ public class OpenLdapSchemaParser
* @param pos The position in the Schema
* @throws LdapSchemaException If the schema is wrong
*/
- private static void getNoidLenRelaxed( MutableAttributeType attributeType, PosSchema pos ) throws LdapSchemaException
+ private static void getNoidLenRelaxed( AttributeType attributeType, PosSchema pos ) throws LdapSchemaException
{
// Check for quotes
boolean hasQuote = false;
@@ -2893,7 +2890,7 @@ public class OpenLdapSchemaParser
throw new LdapSchemaException( I18n.err( I18n.ERR_13787_OID_EXPECTED, pos.lineNumber, pos.start ) );
}
- MutableAttributeType attributeType = new MutableAttributeType( oid );
+ AttributeType attributeType = new AttributeType( oid );
boolean hasSup = false;
boolean hasSyntax = false;
int elementsSeen = 0;
@@ -3134,7 +3131,7 @@ public class OpenLdapSchemaParser
// Now, the OID.
String oid = getOidAndMacroRelaxed( pos, objectIdentifierMacros );
- MutableAttributeType attributeType = new MutableAttributeType( oid );
+ AttributeType attributeType = new AttributeType( oid );
int elementsSeen = 0;
while ( true )
@@ -4614,7 +4611,7 @@ public class OpenLdapSchemaParser
throw new LdapSchemaException( I18n.err( I18n.ERR_13787_OID_EXPECTED, pos.lineNumber, pos.start ) );
}
- MutableMatchingRule matchingRule = new MutableMatchingRule( oid );
+ MatchingRule matchingRule = new MatchingRule( oid );
int elementsSeen = 0;
boolean hasSyntax = false;
@@ -4742,7 +4739,7 @@ public class OpenLdapSchemaParser
// Now, the OID.
String oid = getOidAndMacroRelaxed( pos, objectIdentifierMacros );
- MutableMatchingRule matchingRule = new MutableMatchingRule( oid );
+ MatchingRule matchingRule = new MatchingRule( oid );
int elementsSeen = 0;
while ( true )
@@ -5878,7 +5875,7 @@ public class OpenLdapSchemaParser
throw new LdapSchemaException( I18n.err( I18n.ERR_13787_OID_EXPECTED, pos.lineNumber, pos.start ) );
}
- MutableObjectClass objectClass = new MutableObjectClass( oid );
+ ObjectClass objectClass = new ObjectClass( oid );
int elementsSeen = 0;
while ( true )
@@ -6050,7 +6047,7 @@ public class OpenLdapSchemaParser
// Now, the numeric OID
String oid = getOidAndMacroRelaxed( pos, objectIdentifierMacros );
- MutableObjectClass objectClass = new MutableObjectClass( oid );
+ ObjectClass objectClass = new ObjectClass( oid );
int elementsSeen = 0;
while ( true )
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
index 79ab058..0d4e9b2 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
@@ -45,8 +45,6 @@ import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.LoadableSchemaObject;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
import org.apache.directory.api.ldap.model.schema.MatchingRuleUse;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.api.ldap.model.schema.NameForm;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.ObjectClass;
@@ -660,7 +658,7 @@ public class Registries implements SchemaLoaderListener, Cloneable
switch ( schemaObject.getObjectType() )
{
case ATTRIBUTE_TYPE:
- AttributeTypeHelper.addToRegistries( ( MutableAttributeType ) schemaObject, errorHandler, this );
+ AttributeTypeHelper.addToRegistries( ( AttributeType ) schemaObject, errorHandler, this );
break;
case DIT_CONTENT_RULE:
@@ -676,7 +674,7 @@ public class Registries implements SchemaLoaderListener, Cloneable
break;
case MATCHING_RULE:
- MatchingRuleHelper.addToRegistries( ( MutableMatchingRule ) schemaObject, errorHandler, this );
+ MatchingRuleHelper.addToRegistries( ( MatchingRule ) schemaObject, errorHandler, this );
break;
case MATCHING_RULE_USE:
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java
index 5274817..7278d82 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java
@@ -29,7 +29,6 @@ import org.apache.directory.api.ldap.model.exception.LdapSchemaExceptionCodes;
import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
import org.apache.directory.api.ldap.model.schema.SchemaErrorHandler;
import org.apache.directory.api.ldap.model.schema.UsageEnum;
import org.apache.directory.api.ldap.model.schema.registries.AttributeTypeRegistry;
@@ -64,7 +63,7 @@ public final class AttributeTypeHelper
* @param registries The Registries
* @throws LdapException If the AttributeType is not valid
*/
- public static void addToRegistries( MutableAttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries ) throws LdapException
+ public static void addToRegistries( AttributeType attributeType, SchemaErrorHandler errorHandler, Registries registries ) throws LdapException
{
if ( registries != null )
{
@@ -151,10 +150,10 @@ public final class AttributeTypeHelper
* @param registries The Registries instance
* @return <tt>true</tt> if the AttributeType superiors hierarchy is correct, or if we don't have any superior
*/
- private static boolean buildSuperior( MutableAttributeType attributeType, SchemaErrorHandler errorHandler,
+ private static boolean buildSuperior( AttributeType attributeType, SchemaErrorHandler errorHandler,
Registries registries )
{
- MutableAttributeType currentSuperior;
+ AttributeType currentSuperior;
AttributeTypeRegistry attributeTypeRegistry = registries.getAttributeTypeRegistry();
String superiorOid = attributeType.getSuperiorOid();
@@ -164,7 +163,7 @@ public final class AttributeTypeHelper
// This AT has a superior
try
{
- currentSuperior = ( MutableAttributeType ) attributeTypeRegistry.lookup( superiorOid );
+ currentSuperior = ( AttributeType ) attributeTypeRegistry.lookup( superiorOid );
}
catch ( Exception e )
{
@@ -283,7 +282,7 @@ public final class AttributeTypeHelper
* @param errorHandler The error handler
* @param registries The Registries instance
*/
- private static void buildSyntax( MutableAttributeType attributeType, SchemaErrorHandler errorHandler,
+ private static void buildSyntax( AttributeType attributeType, SchemaErrorHandler errorHandler,
Registries registries )
{
String syntaxOid = attributeType.getSyntaxOid();
@@ -368,7 +367,7 @@ public final class AttributeTypeHelper
* @param errorHandler The error handler
* @param registries The Registries instance
*/
- private static void buildEquality( MutableAttributeType attributeType, SchemaErrorHandler errorHandler,
+ private static void buildEquality( AttributeType attributeType, SchemaErrorHandler errorHandler,
Registries registries )
{
String equalityOid = attributeType.getEqualityOid();
@@ -435,7 +434,7 @@ public final class AttributeTypeHelper
* @param errorHandler The error handler
* @param registries The Registries instance
*/
- private static void buildSubstring( MutableAttributeType attributeType, SchemaErrorHandler errorHandler,
+ private static void buildSubstring( AttributeType attributeType, SchemaErrorHandler errorHandler,
Registries registries )
{
String substringOid = attributeType.getSubstringOid();
@@ -499,7 +498,7 @@ public final class AttributeTypeHelper
* @param errorHandler The error handler
* @param registries The Registries instance
*/
- private static void buildOrdering( MutableAttributeType attributeType, SchemaErrorHandler errorHandler,
+ private static void buildOrdering( AttributeType attributeType, SchemaErrorHandler errorHandler,
Registries registries )
{
String orderingOid = attributeType.getOrderingOid();
@@ -599,7 +598,7 @@ public final class AttributeTypeHelper
* @param attributeType The AttributeType to check
* @param errorHandler The error handler
*/
- private static void checkCollective( MutableAttributeType attributeType, SchemaErrorHandler errorHandler )
+ private static void checkCollective( AttributeType attributeType, SchemaErrorHandler errorHandler )
{
AttributeType superior = attributeType.getSuperior();
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java
index 90ac4fb..8537dcf 100644
--- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java
+++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java
@@ -27,7 +27,6 @@ import org.apache.directory.api.ldap.model.exception.LdapSchemaExceptionCodes;
import org.apache.directory.api.ldap.model.schema.LdapComparator;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.SchemaErrorHandler;
import org.apache.directory.api.ldap.model.schema.comparators.ComparableComparator;
@@ -64,7 +63,7 @@ public final class MatchingRuleHelper
* @throws LdapException If the addition failed
*/
@SuppressWarnings("rawtypes")
- public static void addToRegistries( MutableMatchingRule matchingRule, SchemaErrorHandler errorHandler, Registries registries )
+ public static void addToRegistries( MatchingRule matchingRule, SchemaErrorHandler errorHandler, Registries registries )
throws LdapException
{
if ( registries != null )
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java
index 3b4c014..70f36f9 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueAttributeTypeTest.java
@@ -38,8 +38,7 @@ import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException;
import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
+import org.apache.directory.api.ldap.model.schema.MatchingRule;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.PrepareString;
import org.apache.directory.api.ldap.model.schema.comparators.ByteArrayComparator;
@@ -70,8 +69,8 @@ import com.mycila.junit.concurrent.ConcurrentJunitRunner;
public class BinaryValueAttributeTypeTest
{
private LdapSyntax s;
- private MutableAttributeType at;
- private MutableMatchingRule mr;
+ private AttributeType at;
+ private MatchingRule mr;
private static final byte[] BYTES1 = new byte[]
{ 0x01, 0x02, 0x03, 0x04 };
@@ -118,7 +117,7 @@ public class BinaryValueAttributeTypeTest
}
} );
- at = new MutableAttributeType( "1.1.3.1" );
+ at = new AttributeType( "1.1.3.1" );
at.setEquality( mr );
at.setOrdering( mr );
at.setSubstring( mr );
@@ -206,7 +205,7 @@ public class BinaryValueAttributeTypeTest
public void testBadConstructor()
{
// create a AT with no syntax
- MutableAttributeType attribute = new MutableAttributeType( "1.1.3.1" );
+ AttributeType attribute = new AttributeType( "1.1.3.1" );
Value value = Value.createValue( attribute );
assertTrue( value.isHumanReadable() );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java
index d982d79..334f50b 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/BinaryValueTest.java
@@ -36,8 +36,7 @@ import java.util.Arrays;
import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
+import org.apache.directory.api.ldap.model.schema.MatchingRule;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.PrepareString;
import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
@@ -71,8 +70,8 @@ public class BinaryValueTest
private static final byte[] BYTES_MOD = new byte[]
{ 0x11, 0x02, 0x03, 0x04 };
private LdapSyntax s;
- private MutableAttributeType at;
- private MutableMatchingRule mr;
+ private AttributeType at;
+ private MatchingRule mr;
/**
@@ -115,7 +114,7 @@ public class BinaryValueTest
}
} );
- at = new MutableAttributeType( "1.1.3.1" );
+ at = new AttributeType( "1.1.3.1" );
at.setEquality( mr );
at.setOrdering( mr );
at.setSubstring( mr );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/EntryUtils.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/EntryUtils.java
index d19070a..ba5236b 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/EntryUtils.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/entry/EntryUtils.java
@@ -24,8 +24,7 @@ import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.LdapComparator;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
+import org.apache.directory.api.ldap.model.schema.MatchingRule;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.PrepareString;
import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
@@ -45,7 +44,7 @@ public class EntryUtils
/**
* A local Syntax class for tests
*/
- static class AT extends MutableAttributeType
+ static class AT extends AttributeType
{
private static final long serialVersionUID = 0L;
@@ -57,9 +56,9 @@ public class EntryUtils
}
- public static MutableMatchingRule matchingRuleFactory( String oid )
+ public static MatchingRule matchingRuleFactory( String oid )
{
- MutableMatchingRule matchingRule = new MutableMatchingRule( oid );
+ MatchingRule matchingRule = new MatchingRule( oid );
return matchingRule;
}
@@ -67,7 +66,7 @@ public class EntryUtils
/**
* A local MatchingRule class for tests
*/
- static class MR extends MutableMatchingRule
+ static class MR extends MatchingRule
{
public static final long serialVersionUID = 1L;
@@ -105,7 +104,7 @@ public class EntryUtils
/* no protection*/static AttributeType getCaseIgnoringAttributeNoNumbersType()
{
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.3.1" );
+ AttributeType attributeType = new AttributeType( "1.1.3.1" );
LdapSyntax syntax = new LdapSyntax( "1.1.1.1", "", true );
syntax.setSyntaxChecker( new SyntaxChecker( "1.1.2.1" )
@@ -138,7 +137,7 @@ public class EntryUtils
}
} );
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.2.1" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.2.1" );
matchingRule.setSyntax( syntax );
matchingRule.setLdapComparator( new LdapComparator<String>( matchingRule.getOid() )
@@ -182,7 +181,7 @@ public class EntryUtils
/* no protection*/static AttributeType getIA5StringAttributeType()
{
- MutableAttributeType attributeType = new MutableAttributeType( "1.1" );
+ AttributeType attributeType = new AttributeType( "1.1" );
attributeType.addName( "1.1" );
LdapSyntax syntax = new LdapSyntax( "1.1.1", "", true );
@@ -198,7 +197,7 @@ public class EntryUtils
}
} );
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.2" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.2" );
matchingRule.setSyntax( syntax );
matchingRule.setLdapComparator( new LdapComparator<String>( matchingRule.getOid() )
@@ -225,7 +224,7 @@ public class EntryUtils
/* No protection */static AttributeType getBytesAttributeType()
{
- MutableAttributeType attributeType = new MutableAttributeType( "1.2" );
+ AttributeType attributeType = new AttributeType( "1.2" );
LdapSyntax syntax = new LdapSyntax( "1.2.1", "", false );
syntax.setSyntaxChecker( new SyntaxChecker( "1.2.1" )
@@ -239,7 +238,7 @@ public class EntryUtils
}
} );
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.2.2" );
+ MatchingRule matchingRule = new MatchingRule( "1.2.2" );
matchingRule.setSyntax( syntax );
matchingRule.setLdapComparator( new ByteArrayComparator( "1.2.2" ) );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/AttributeTypeTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/AttributeTypeTest.java
index 6a53107..a4e42e0 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/AttributeTypeTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/AttributeTypeTest.java
@@ -40,7 +40,7 @@ import com.mycila.junit.concurrent.ConcurrentJunitRunner;
@Concurrency()
public class AttributeTypeTest
{
- private MutableAttributeType attributeType;
+ private AttributeType attributeType;
/**
@@ -49,7 +49,7 @@ public class AttributeTypeTest
@Before
public void initAttributeTypes() throws Exception
{
- attributeType = new MutableAttributeType( "1.2.3.4" );
+ attributeType = new AttributeType( "1.2.3.4" );
attributeType.setNames( "name1", "name2" );
attributeType.setDescription( "description" );
attributeType.setObsolete( false );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/MatchingRuleTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/MatchingRuleTest.java
index 14877a2..bbf3c97 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/MatchingRuleTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/MatchingRuleTest.java
@@ -40,7 +40,7 @@ import com.mycila.junit.concurrent.ConcurrentJunitRunner;
@Concurrency()
public class MatchingRuleTest
{
- private MutableMatchingRule matchingRule;
+ private MatchingRule matchingRule;
/**
@@ -49,7 +49,7 @@ public class MatchingRuleTest
@Before
public void initMatchingRules() throws Exception
{
- matchingRule = new MutableMatchingRule( "1.2.3.4" );
+ matchingRule = new MatchingRule( "1.2.3.4" );
matchingRule.setNames( "name1", "name2" );
matchingRule.setDescription( "description" );
matchingRule.setObsolete( false );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/ObjectClassTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/ObjectClassTest.java
index d1a7340..202568c 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/ObjectClassTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/ObjectClassTest.java
@@ -49,7 +49,7 @@ public class ObjectClassTest
private ObjectClass objectClassACopy;
private ObjectClass objectClassB;
private ObjectClass objectClassC;
- private MutableObjectClass objectClass;
+ private ObjectClass objectClass;
/**
@@ -64,7 +64,7 @@ public class ObjectClassTest
objectClassB = new ObjectClass( "aa" );
objectClassC = new ObjectClass( "cc" );
- objectClass = new MutableObjectClass( "1.2.3.4" );
+ objectClass = new ObjectClass( "1.2.3.4" );
objectClass.setNames( "name1", "name2" );
objectClass.setDescription( "description" );
objectClass.setObsolete( false );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRendererTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRendererTest.java
index ebed539..d989b71 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRendererTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRendererTest.java
@@ -47,13 +47,13 @@ import org.junit.Test;
public class SchemaObjectRendererTest
{
- private MutableObjectClass objectClassSimple;
- private MutableObjectClass objectClassComplex;
+ private ObjectClass objectClassSimple;
+ private ObjectClass objectClassComplex;
- private MutableAttributeType attributeTypeSimple;
- private MutableAttributeType attributeTypeComplex;
+ private AttributeType attributeTypeSimple;
+ private AttributeType attributeTypeComplex;
- private MutableMatchingRule matchingRule;
+ private MatchingRule matchingRule;
private MatchingRuleUse matchingRuleUse;
private LdapSyntax ldapSyntax;
private DitContentRule ditContentRule;
@@ -64,12 +64,12 @@ public class SchemaObjectRendererTest
@Before
public void setUp()
{
- objectClassSimple = new MutableObjectClass( "1.2.3.4" );
+ objectClassSimple = new ObjectClass( "1.2.3.4" );
objectClassSimple.setNames( "name0" );
objectClassSimple.setMustAttributeTypeOids( Arrays.asList( "att0" ) );
objectClassSimple.setSchemaName( "dummy" );
- objectClassComplex = new MutableObjectClass( "1.2.3.4" );
+ objectClassComplex = new ObjectClass( "1.2.3.4" );
objectClassComplex.setNames( "name1", "name2" );
objectClassComplex.setDescription( "description with 'quotes'" );
objectClassComplex.setObsolete( true );
@@ -79,7 +79,7 @@ public class SchemaObjectRendererTest
objectClassComplex.setMayAttributeTypeOids( Arrays.asList( "att3", "att4" ) );
objectClassComplex.setSchemaName( "dummy" );
- attributeTypeSimple = new MutableAttributeType( "1.2.3.4" );
+ attributeTypeSimple = new AttributeType( "1.2.3.4" );
attributeTypeSimple.setNames( "name0" );
attributeTypeSimple.setEqualityOid( "matchingRule0" );
attributeTypeSimple.setSyntaxOid( "2.3.4.5" );
@@ -87,7 +87,7 @@ public class SchemaObjectRendererTest
attributeTypeSimple.setCollective( true );
attributeTypeSimple.setSchemaName( "dummy" );
- attributeTypeComplex = new MutableAttributeType( "1.2.3.4" );
+ attributeTypeComplex = new AttributeType( "1.2.3.4" );
attributeTypeComplex.setNames( "name1", "name2" );
attributeTypeComplex.setDescription( "description with 'quotes'" );
attributeTypeComplex.setObsolete( true );
@@ -100,7 +100,7 @@ public class SchemaObjectRendererTest
attributeTypeComplex.setUsage( UsageEnum.DIRECTORY_OPERATION );
attributeTypeComplex.setSchemaName( "dummy" );
- matchingRule = new MutableMatchingRule( "1.2.3.4" );
+ matchingRule = new MatchingRule( "1.2.3.4" );
matchingRule.setNames( "name0" );
matchingRule.setDescription( "description with 'quotes'" );
matchingRule.setObsolete( true );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorterTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorterTest.java
index 26b7819..7bd854f 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorterTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorterTest.java
@@ -44,7 +44,7 @@ public class SchemaObjectSorterTest
private void addAttributeType( List<AttributeType> attributeTypes, String oid, String name, String superiorOid )
{
- MutableAttributeType at = new MutableAttributeType( oid );
+ AttributeType at = new AttributeType( oid );
at.setNames( name );
at.setSuperiorOid( superiorOid );
attributeTypes.add( at );
@@ -143,7 +143,7 @@ public class SchemaObjectSorterTest
private void addObjectClass( List<ObjectClass> objectClasses, String oid, String name, String... superiorOid )
{
- MutableObjectClass oc = new MutableObjectClass( oid );
+ ObjectClass oc = new ObjectClass( oid );
oc.setNames( name );
if ( superiorOid != null )
{
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaUtilsTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaUtilsTest.java
index 5c87560..9fd7b0f 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaUtilsTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/SchemaUtilsTest.java
@@ -33,8 +33,6 @@ import com.mycila.junit.concurrent.ConcurrentJunitRunner;
import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
import org.apache.directory.api.ldap.model.schema.SchemaUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -62,19 +60,19 @@ public class SchemaUtilsTest
public static MatchingRule[] getMatchingRules()
{
- MutableMatchingRule[] mrs = new MutableMatchingRule[3];
+ MatchingRule[] mrs = new MatchingRule[3];
- mrs[0] = new MutableMatchingRule( "2.5.13.2" );
+ mrs[0] = new MatchingRule( "2.5.13.2" );
mrs[0].setSyntax( getSyntaxes()[1] );
mrs[0].addName( "caseIgnoreMatch" );
mrs[0].setDescription( "Ignores case in strings" );
- mrs[1] = new MutableMatchingRule( "2.5.13.4" );
+ mrs[1] = new MatchingRule( "2.5.13.4" );
mrs[0].setSyntax( getSyntaxes()[2] );
mrs[1].addName( "caseIgnoreSubstringsMatch" );
mrs[1].setDescription( "Ignores case in substrings" );
- mrs[2] = new MutableMatchingRule( "2.5.13.1" );
+ mrs[2] = new MatchingRule( "2.5.13.1" );
mrs[0].setSyntax( getSyntaxes()[0] );
mrs[2].addName( "distinguishedNameMatch" );
mrs[2].setDescription( "distinguishedNameMatch" );
@@ -85,9 +83,9 @@ public class SchemaUtilsTest
public AttributeType[] getAttributeTypes()
{
- MutableAttributeType[] ats = new MutableAttributeType[5];
+ AttributeType[] ats = new AttributeType[5];
- ats[0] = new MutableAttributeType( "2.5.4.41" );
+ ats[0] = new AttributeType( "2.5.4.41" );
ats[0].addName( "name" );
ats[0].setSyntax( getSyntaxes()[1] );
ats[0].setSyntaxLength( 32768 );
@@ -95,24 +93,24 @@ public class SchemaUtilsTest
ats[0].setSubstring( getMatchingRules()[1] );
// ( 2.5.4.3 NAME 'cn' SUP name )
- ats[1] = new MutableAttributeType( "2.5.4.3" );
+ ats[1] = new AttributeType( "2.5.4.3" );
ats[1].addName( "cn", "commonName" );
- ats[2] = new MutableAttributeType( "2.5.4.41" );
+ ats[2] = new AttributeType( "2.5.4.41" );
ats[2].addName( "name" );
ats[2].setSyntax( getSyntaxes()[1] );
ats[2].setSyntaxLength( 32768 );
ats[2].setEquality( getMatchingRules()[0] );
ats[2].setSubstring( getMatchingRules()[1] );
- ats[3] = new MutableAttributeType( "2.5.4.41" );
+ ats[3] = new AttributeType( "2.5.4.41" );
ats[3].addName( "name" );
ats[3].setSyntax( getSyntaxes()[1] );
ats[3].setSyntaxLength( 32768 );
ats[3].setEquality( getMatchingRules()[0] );
ats[3].setSubstring( getMatchingRules()[1] );
- ats[4] = new MutableAttributeType( "2.5.4.41" );
+ ats[4] = new AttributeType( "2.5.4.41" );
ats[4].addName( "name" );
ats[4].setSyntax( getSyntaxes()[1] );
ats[4].setSyntaxLength( 32768 );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/parsers/FastOpenLdapSchemaParserTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/parsers/FastOpenLdapSchemaParserTest.java
index 5fa1da8..afe68ba 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/parsers/FastOpenLdapSchemaParserTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/parsers/FastOpenLdapSchemaParserTest.java
@@ -31,7 +31,6 @@ import java.util.List;
import java.util.Map;
import org.apache.directory.api.ldap.model.schema.AttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
import org.apache.directory.api.ldap.model.schema.ObjectClass;
import org.apache.directory.api.ldap.model.schema.ObjectClassTypeEnum;
import org.apache.directory.api.ldap.model.schema.syntaxCheckers.OpenLdapObjectIdentifierMacro;
@@ -78,7 +77,7 @@ public class FastOpenLdapSchemaParserTest
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.25 )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
Map<String, AttributeType> mapAttributeTypes = mapAttributeTypes( attributeTypes );
AttributeType attributeType = mapAttributeTypes.get( "2.5.4.14" );
@@ -90,7 +89,7 @@ public class FastOpenLdapSchemaParserTest
}
- private Map<String, AttributeType> mapAttributeTypes( List<MutableAttributeType> attributeTypes )
+ private Map<String, AttributeType> mapAttributeTypes( List<AttributeType> attributeTypes )
{
Map<String, AttributeType> m = new HashMap<String, AttributeType>();
@@ -112,7 +111,7 @@ public class FastOpenLdapSchemaParserTest
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypeList = parser.getAttributeTypes();
+ List<AttributeType> attributeTypeList = parser.getAttributeTypes();
Map<String, AttributeType> attributeTypes = mapAttributeTypes( attributeTypeList );
AttributeType type = attributeTypes.get( "2.5.4.2" );
@@ -134,7 +133,7 @@ public class FastOpenLdapSchemaParserTest
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypeList = parser.getAttributeTypes();
+ List<AttributeType> attributeTypeList = parser.getAttributeTypes();
Map<String, AttributeType> attributeTypes = mapAttributeTypes( attributeTypeList );
AttributeType type = attributeTypes.get( "2.5.4.2" );
@@ -160,7 +159,7 @@ public class FastOpenLdapSchemaParserTest
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypeList = parser.getAttributeTypes();
+ List<AttributeType> attributeTypeList = parser.getAttributeTypes();
Map<String, AttributeType> attributeTypes = mapAttributeTypes( attributeTypeList );
AttributeType type = attributeTypes.get( "2.5.4.2" );
@@ -182,7 +181,7 @@ public class FastOpenLdapSchemaParserTest
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypeList = parser.getAttributeTypes();
+ List<AttributeType> attributeTypeList = parser.getAttributeTypes();
Map<String, AttributeType> attributeTypes = mapAttributeTypes( attributeTypeList );
AttributeType type = attributeTypes.get( "2.5.4.2" );
@@ -331,7 +330,7 @@ public class FastOpenLdapSchemaParserTest
parser.setQuirksMode( true );
parser.parse( input );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
List<ObjectClass> objectClassTypes = parser.getObjectClasses();
Map<String, OpenLdapObjectIdentifierMacro> objectIdentifierMacros = parser.getObjectIdentifierMacros();
@@ -347,7 +346,7 @@ public class FastOpenLdapSchemaParserTest
InputStream input = getClass().getResourceAsStream( "inetorgperson.schema" );
parser.parse( input );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
List<ObjectClass> objectClassTypes = parser.getObjectClasses();
Map<String, OpenLdapObjectIdentifierMacro> objectIdentifierMacros = parser.getObjectIdentifierMacros();
@@ -363,7 +362,7 @@ public class FastOpenLdapSchemaParserTest
InputStream input = getClass().getResourceAsStream( "collective.schema" );
parser.parse( input );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
List<ObjectClass> objectClassTypes = parser.getObjectClasses();
Map<String, OpenLdapObjectIdentifierMacro> objectIdentifierMacros = parser.getObjectIdentifierMacros();
@@ -384,7 +383,7 @@ public class FastOpenLdapSchemaParserTest
InputStream input = getClass().getResourceAsStream( "dyngroup.schema" );
parser.parse( input );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
List<ObjectClass> objectClassTypes = parser.getObjectClasses();
Map<String, OpenLdapObjectIdentifierMacro> objectIdentifierMacros = parser.getObjectIdentifierMacros();
@@ -446,7 +445,7 @@ public class FastOpenLdapSchemaParserTest
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
Map<String, AttributeType> mapAttributeTypes = mapAttributeTypes( attributeTypes );
AttributeType attributeType = mapAttributeTypes.get( "1.3.6.1.4.1.8104.1.1.37" );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParserTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParserTest.java
index 8352e1d..cb44780 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParserTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/parsers/OpenLdapSchemaParserTest.java
@@ -31,7 +31,6 @@ import java.util.List;
import java.util.Map;
import org.apache.directory.api.ldap.model.schema.AttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
import org.apache.directory.api.ldap.model.schema.ObjectClass;
import org.apache.directory.api.ldap.model.schema.ObjectClassTypeEnum;
import org.apache.directory.api.ldap.model.schema.syntaxCheckers.OpenLdapObjectIdentifierMacro;
@@ -79,7 +78,7 @@ public class OpenLdapSchemaParserTest
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.25 )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
Map<String, AttributeType> mapAttributeTypes = mapAttributeTypes( attributeTypes );
AttributeType attributeType = mapAttributeTypes.get( "2.5.4.14" );
@@ -91,7 +90,7 @@ public class OpenLdapSchemaParserTest
}
- private Map<String, AttributeType> mapAttributeTypes( List<MutableAttributeType> attributeTypes )
+ private Map<String, AttributeType> mapAttributeTypes( List<AttributeType> attributeTypes )
{
Map<String, AttributeType> m = new HashMap<String, AttributeType>();
@@ -113,7 +112,7 @@ public class OpenLdapSchemaParserTest
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypeList = parser.getAttributeTypes();
+ List<AttributeType> attributeTypeList = parser.getAttributeTypes();
Map<String, AttributeType> attributeTypes = mapAttributeTypes( attributeTypeList );
AttributeType type = attributeTypes.get( "2.5.4.2" );
@@ -135,7 +134,7 @@ public class OpenLdapSchemaParserTest
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypeList = parser.getAttributeTypes();
+ List<AttributeType> attributeTypeList = parser.getAttributeTypes();
Map<String, AttributeType> attributeTypes = mapAttributeTypes( attributeTypeList );
AttributeType type = attributeTypes.get( "2.5.4.2" );
@@ -161,7 +160,7 @@ public class OpenLdapSchemaParserTest
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypeList = parser.getAttributeTypes();
+ List<AttributeType> attributeTypeList = parser.getAttributeTypes();
Map<String, AttributeType> attributeTypes = mapAttributeTypes( attributeTypeList );
AttributeType type = attributeTypes.get( "2.5.4.2" );
@@ -183,7 +182,7 @@ public class OpenLdapSchemaParserTest
+ " EQUALITY caseIgnoreMatch\n"
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypeList = parser.getAttributeTypes();
+ List<AttributeType> attributeTypeList = parser.getAttributeTypes();
Map<String, AttributeType> attributeTypes = mapAttributeTypes( attributeTypeList );
AttributeType type = attributeTypes.get( "2.5.4.2" );
@@ -331,7 +330,7 @@ public class OpenLdapSchemaParserTest
InputStream input = getClass().getResourceAsStream( "core.schema" );
parser.parse( input );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
List<ObjectClass> objectClassTypes = parser.getObjectClasses();
Map<String, OpenLdapObjectIdentifierMacro> objectIdentifierMacros = parser.getObjectIdentifierMacros();
@@ -347,7 +346,7 @@ public class OpenLdapSchemaParserTest
InputStream input = getClass().getResourceAsStream( "inetorgperson.schema" );
parser.parse( input );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
List<ObjectClass> objectClassTypes = parser.getObjectClasses();
Map<String, OpenLdapObjectIdentifierMacro> objectIdentifierMacros = parser.getObjectIdentifierMacros();
@@ -363,7 +362,7 @@ public class OpenLdapSchemaParserTest
InputStream input = getClass().getResourceAsStream( "collective.schema" );
parser.parse( input );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
List<ObjectClass> objectClassTypes = parser.getObjectClasses();
Map<String, OpenLdapObjectIdentifierMacro> objectIdentifierMacros = parser.getObjectIdentifierMacros();
@@ -384,7 +383,7 @@ public class OpenLdapSchemaParserTest
parser.setQuirksMode( true );
parser.parse( input );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
List<ObjectClass> objectClassTypes = parser.getObjectClasses();
Map<String, OpenLdapObjectIdentifierMacro> objectIdentifierMacros = parser.getObjectIdentifierMacros();
@@ -446,7 +445,7 @@ public class OpenLdapSchemaParserTest
+ " SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)";
parser.parse( attributeTypeData );
- List<MutableAttributeType> attributeTypes = parser.getAttributeTypes();
+ List<AttributeType> attributeTypes = parser.getAttributeTypes();
Map<String, AttributeType> mapAttributeTypes = mapAttributeTypes( attributeTypes );
AttributeType attributeType = mapAttributeTypes.get( "1.3.6.1.4.1.8104.1.1.37" );
diff --git a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/registries/AttributeTypeRegistryTest.java b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/registries/AttributeTypeRegistryTest.java
index 93d6593..6792231 100644
--- a/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/registries/AttributeTypeRegistryTest.java
+++ b/ldap/model/src/test/java/org/apache/directory/api/ldap/model/schema/registries/AttributeTypeRegistryTest.java
@@ -29,7 +29,7 @@ import com.mycila.junit.concurrent.Concurrency;
import com.mycila.junit.concurrent.ConcurrentJunitRunner;
import org.apache.directory.api.ldap.model.exception.LdapException;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
+import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.registries.AttributeTypeRegistry;
import org.apache.directory.api.ldap.model.schema.registries.DefaultAttributeTypeRegistry;
import org.junit.Before;
@@ -59,7 +59,7 @@ public class AttributeTypeRegistryTest
@Test
public void testUnregister() throws LdapException
{
- MutableAttributeType at0 = new MutableAttributeType( "1.1" );
+ AttributeType at0 = new AttributeType( "1.1" );
at0.addName( "t", "test", "Test", "T" );
atRegistry.register( at0 );
@@ -84,7 +84,7 @@ public class AttributeTypeRegistryTest
@Test
public void testRegister() throws LdapException
{
- MutableAttributeType at0 = new MutableAttributeType( "1.1" );
+ AttributeType at0 = new AttributeType( "1.1" );
at0.addName( "t", "test", "Test", "T" );
atRegistry.register( at0 );
diff --git a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SchemaEntityFactory.java b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SchemaEntityFactory.java
index 7ad197b..7ca7bff 100644
--- a/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SchemaEntityFactory.java
+++ b/ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schema/loader/SchemaEntityFactory.java
@@ -48,11 +48,8 @@ import org.apache.directory.api.ldap.model.schema.LdapComparator;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.LoadableSchemaObject;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableObjectClass;
-import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.ObjectClass;
+import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.ObjectClassTypeEnum;
import org.apache.directory.api.ldap.model.schema.SchemaManager;
import org.apache.directory.api.ldap.model.schema.SchemaObject;
@@ -1010,7 +1007,7 @@ public class SchemaEntityFactory implements EntityFactory
schema = schemaManager.getLoadedSchema( schemaName );
}
- MutableMatchingRule matchingRule = new MutableMatchingRule( oid );
+ MatchingRule matchingRule = new MatchingRule( oid );
// The syntax field
Attribute mSyntax = entry.get( MetaSchemaConstants.M_SYNTAX_AT );
@@ -1094,7 +1091,7 @@ public class SchemaEntityFactory implements EntityFactory
}
// Create the ObjectClass instance
- MutableObjectClass oc = new MutableObjectClass( oid );
+ ObjectClass oc = new ObjectClass( oid );
// The Sup field
Attribute mSuperiors = entry.get( MetaSchemaConstants.M_SUP_OBJECT_CLASS_AT );
@@ -1178,7 +1175,7 @@ public class SchemaEntityFactory implements EntityFactory
}
// Create the new AttributeType
- MutableAttributeType attributeType = new MutableAttributeType( oid );
+ AttributeType attributeType = new AttributeType( oid );
if ( schemaManager.isRelaxed() )
{
diff --git a/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerAddTest.java b/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerAddTest.java
index b5b7275..4a74132 100644
--- a/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerAddTest.java
+++ b/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerAddTest.java
@@ -40,11 +40,8 @@ import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.LdapComparator;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.api.ldap.model.schema.MutableMatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableObjectClass;
-import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.ObjectClass;
+import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.ObjectClassTypeEnum;
import org.apache.directory.api.ldap.model.schema.SchemaManager;
import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
@@ -221,7 +218,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -251,7 +248,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -279,7 +276,7 @@ public class SchemaManagerAddTest
int goidSize = schemaManager.getGlobalOidRegistry().size();
// Create the collective attribute first
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -295,7 +292,7 @@ public class SchemaManagerAddTest
assertEquals( goidSize + 1, schemaManager.getGlobalOidRegistry().size() );
// Now try to create an AT which is a subtype of teh create collective attribute
- MutableAttributeType subType = new MutableAttributeType( "1.1.1" );
+ AttributeType subType = new AttributeType( "1.1.1" );
subType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
subType.setOrderingOid( null );
subType.setSubstringOid( null );
@@ -323,7 +320,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -356,7 +353,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -390,7 +387,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -423,7 +420,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -450,7 +447,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( "0.0" );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -482,7 +479,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.8 " );
attributeType.setUsage( UsageEnum.USER_APPLICATIONS );
@@ -508,7 +505,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( null );
attributeType.setOrderingOid( "0.0" );
attributeType.setSubstringOid( null );
@@ -540,7 +537,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( null );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( "0.0" );
@@ -572,7 +569,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setSubstringOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
@@ -598,7 +595,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "2.5.18.4" );
+ AttributeType attributeType = new AttributeType( "2.5.18.4" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setSubstringOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
@@ -633,7 +630,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setSubstringOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
@@ -667,7 +664,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setSubstringOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
@@ -707,7 +704,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( null );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -736,7 +733,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( null );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -768,7 +765,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( null );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -800,7 +797,7 @@ public class SchemaManagerAddTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( null );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -950,7 +947,7 @@ public class SchemaManagerAddTest
int mrrSize = schemaManager.getMatchingRuleRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.0" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.0" );
matchingRule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.26" );
// It should not fail
@@ -1007,7 +1004,7 @@ public class SchemaManagerAddTest
int mrrSize = schemaManager.getMatchingRuleRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableMatchingRule matchingRule = new MutableMatchingRule( "2.5.13.0" );
+ MatchingRule matchingRule = new MatchingRule( "2.5.13.0" );
matchingRule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.26" );
// It should fail (oid already registered)
@@ -1040,7 +1037,7 @@ public class SchemaManagerAddTest
int mrrSize = schemaManager.getMatchingRuleRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.0" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.0" );
matchingRule.setNames( "Test", "objectIdentifierMatch" );
matchingRule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.26" );
@@ -1068,7 +1065,7 @@ public class SchemaManagerAddTest
int mrrSize = schemaManager.getMatchingRuleRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.0" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.0" );
matchingRule.setNames( "Test", "cn" );
matchingRule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.26" );
@@ -1101,7 +1098,7 @@ public class SchemaManagerAddTest
int mrrSize = schemaManager.getMatchingRuleRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.0" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.0" );
matchingRule.setNames( "Test" );
matchingRule.setSyntaxOid( "1.1.1" );
@@ -1130,7 +1127,7 @@ public class SchemaManagerAddTest
int mrrSize = schemaManager.getMatchingRuleRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableMatchingRule matchingRule = new MutableMatchingRule( "1.1.0" );
+ MatchingRule matchingRule = new MatchingRule( "1.1.0" );
matchingRule.setNames( "Test" );
matchingRule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.26" );
matchingRule.setSchemaName( "bad" );
@@ -1392,7 +1389,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.addMayAttributeTypeOids( "cn", "none", "userPassword" );
assertFalse( schemaManager.add( objectClass ) );
@@ -1419,7 +1416,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.addMustAttributeTypeOids( "cn", "none", "userPassword" );
assertFalse( schemaManager.add( objectClass ) );
@@ -1446,7 +1443,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.addMayAttributeTypeOids( "cn", "ref", "commonName" );
assertFalse( schemaManager.add( objectClass ) );
@@ -1471,7 +1468,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.addMustAttributeTypeOids( "cn", "ref", "2.5.4.3" );
assertFalse( schemaManager.add( objectClass ) );
@@ -1496,7 +1493,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.addMustAttributeTypeOids( "cn", "ref" );
objectClass.addMayAttributeTypeOids( "2.5.4.3" );
@@ -1525,7 +1522,7 @@ public class SchemaManagerAddTest
int goidSize = schemaManager.getGlobalOidRegistry().size();
// Check a addition in MUST
- MutableObjectClass objectClassMust = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClassMust = new ObjectClass( "1.1.1" );
objectClassMust.addMustAttributeTypeOids( "c-o", "ref" );
// collective attribute in MUST : failure expected
@@ -1540,7 +1537,7 @@ public class SchemaManagerAddTest
assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() );
// Check an addition in MAY
- MutableObjectClass objectClassMay = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClassMay = new ObjectClass( "1.1.1" );
objectClassMay.addMayAttributeTypeOids( "c-o", "ref" );
// collective attribute in MAY : failure expected
@@ -1569,7 +1566,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
objectClass.addSuperiorOids( "alias", "referral", "top" );
@@ -1611,7 +1608,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
objectClass.addSuperiorOids( "alias", "Test", "referral" );
@@ -1636,7 +1633,7 @@ public class SchemaManagerAddTest
SchemaManager schemaManager = loadSystem();
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
@@ -1663,7 +1660,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
objectClass.addSuperiorOids( "alias", "refessal" );
@@ -1689,7 +1686,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.ABSTRACT );
objectClass.addSuperiorOids( "extensibleObject" );
@@ -1715,7 +1712,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.ABSTRACT );
objectClass.addSuperiorOids( "referral" );
@@ -1741,7 +1738,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.AUXILIARY );
objectClass.addSuperiorOids( "referral" );
@@ -1767,7 +1764,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
objectClass.addSuperiorOids( "extensibleObject" );
@@ -1794,7 +1791,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
objectClass.addSuperiorOids( "alias", "OpenLDAProotDSE" );
@@ -1837,7 +1834,7 @@ public class SchemaManagerAddTest
int ocrSize = schemaManager.getObjectClassRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableObjectClass objectClass = new MutableObjectClass( "1.1.1" );
+ ObjectClass objectClass = new ObjectClass( "1.1.1" );
objectClass.setNames( "Test" );
objectClass.setType( ObjectClassTypeEnum.STRUCTURAL );
objectClass.addSuperiorOids( "alias", "OpenLDAProotDSE" );
diff --git a/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerDelTest.java b/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerDelTest.java
index 3a755db..f7def78 100644
--- a/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerDelTest.java
+++ b/ldap/schema/data/src/test/java/org/apache/directory/api/ldap/schema/loader/SchemaManagerDelTest.java
@@ -38,7 +38,6 @@ import org.apache.directory.api.ldap.model.schema.AttributeType;
import org.apache.directory.api.ldap.model.schema.LdapComparator;
import org.apache.directory.api.ldap.model.schema.LdapSyntax;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
-import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.ObjectClass;
import org.apache.directory.api.ldap.model.schema.SchemaManager;
@@ -228,7 +227,7 @@ public class SchemaManagerDelTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "1.1.0" );
+ AttributeType attributeType = new AttributeType( "1.1.0" );
attributeType.setEqualityOid( SchemaConstants.DISTINGUISHED_NAME_MATCH_MR_OID );
attributeType.setOrderingOid( null );
attributeType.setSubstringOid( null );
@@ -255,7 +254,7 @@ public class SchemaManagerDelTest
int atrSize = schemaManager.getAttributeTypeRegistry().size();
int goidSize = schemaManager.getGlobalOidRegistry().size();
- MutableAttributeType attributeType = new MutableAttributeType( "generationQualifier" );
+ AttributeType attributeType = new AttributeType( "generationQualifier" );
attributeType.setOid( "2.5.4.44" );
// It should not fail
@@ -303,7 +302,7 @@ public class SchemaManagerDelTest
int goidSize = schemaManager.getGlobalOidRegistry().size();
// Try to delete an AT which is contained by a disabled schema
- MutableAttributeType attributeType = new MutableAttributeType( "gecos" );
+ AttributeType attributeType = new AttributeType( "gecos" );
attributeType.setOid( "1.3.6.1.1.1.1.2" );
// It should fail
@@ -551,7 +550,7 @@ public class SchemaManagerDelTest
assertTrue( errors.get( 0 ) instanceof LdapProtocolErrorException );
// Now delete the using AT : it should be OK
- MutableAttributeType at = new MutableAttributeType( AT_OID );
+ AttributeType at = new AttributeType( AT_OID );
assertTrue( schemaManager.delete( at ) );
assertEquals( atrSize - 1, schemaManager.getAttributeTypeRegistry().size() );
@@ -945,7 +944,7 @@ public class SchemaManagerDelTest
assertTrue( errors.get( 0 ) instanceof LdapProtocolErrorException );
// Now delete the using AT : it should be OK
- MutableAttributeType at = new MutableAttributeType( AT_OID );
+ AttributeType at = new AttributeType( AT_OID );
assertTrue( schemaManager.delete( at ) );
assertEquals( atrSize - 1, schemaManager.getAttributeTypeRegistry().size() );