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 2009/09/30 01:12:56 UTC
svn commit: r820122 -
/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java
Author: elecharny
Date: Tue Sep 29 23:12:56 2009
New Revision: 820122
URL: http://svn.apache.org/viewvc?rev=820122&view=rev
Log:
Removed the useless add() method : The SSSE can just be modified
Modified:
directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java
Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java?rev=820122&r1=820121&r2=820122&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java Tue Sep 29 23:12:56 2009
@@ -30,7 +30,6 @@
import org.apache.directory.server.core.entry.ServerAttribute;
import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.interceptor.context.AddOperationContext;
import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -156,142 +155,6 @@
}
- /**
- * Add a schema object into the SSSE
- *
- * @param opContext The add context
- * @param doCascadeAdd unused
- * @throws Exception If the addition failed
- */
- public void addSchemaSubentry( AddOperationContext opContext, boolean doCascadeAdd )
- throws Exception
- {
- if ( doCascadeAdd )
- {
- LOG.error( CASCADING_ERROR );
- }
-
- //String attrOid = opContext.getEntry().get( attributeType );
- //int index = opAttr2handlerIndex.get( opAttrOid );
- int index = 0;
-
- switch( index )
- {
- case( COMPARATOR_INDEX ):
- LdapComparatorDescription[] comparatorDescriptions = parsers.parseComparators( null );
-
- for ( LdapComparatorDescription comparatorDescription : comparatorDescriptions )
- {
- subentryModifier.add( opContext, comparatorDescription );
- }
-
- break;
-
- case( NORMALIZER_INDEX ):
- NormalizerDescription[] normalizerDescriptions = parsers.parseNormalizers( null );
-
- for ( NormalizerDescription normalizerDescription : normalizerDescriptions )
- {
- subentryModifier.add( opContext, normalizerDescription );
- }
-
- break;
-
- case( SYNTAX_CHECKER_INDEX ):
- SyntaxCheckerDescription[] syntaxCheckerDescriptions = parsers.parseSyntaxCheckers( null );
-
- for ( SyntaxCheckerDescription syntaxCheckerDescription : syntaxCheckerDescriptions )
- {
- subentryModifier.add( opContext, syntaxCheckerDescription );
- }
-
- break;
-
- case( SYNTAX_INDEX ):
- LdapSyntax[] syntaxes = parsers.parseLdapSyntaxes( null );
-
- for ( LdapSyntax syntax : syntaxes )
- {
- subentryModifier.addSchemaObject( opContext, syntax );
- }
-
- break;
-
- case( MATCHING_RULE_INDEX ):
- MatchingRule[] mrs = parsers.parseMatchingRules( null );
-
- for ( MatchingRule mr : mrs )
- {
- subentryModifier.addSchemaObject( opContext, mr );
- }
-
- break;
-
- case( ATTRIBUTE_TYPE_INDEX ):
- AttributeType[] ats = parsers.parseAttributeTypes( null );
-
- for ( AttributeType at : ats )
- {
- subentryModifier.addSchemaObject( opContext, at );
- }
-
- break;
-
- case( OBJECT_CLASS_INDEX ):
- ObjectClass[] ocs = parsers.parseObjectClasses( null );
-
- for ( ObjectClass oc : ocs )
- {
- subentryModifier.addSchemaObject( opContext, oc );
- }
-
- break;
-
- case( MATCHING_RULE_USE_INDEX ):
- MatchingRuleUse[] mrus = parsers.parseMatchingRuleUses( null );
-
- for ( MatchingRuleUse mru : mrus )
- {
- subentryModifier.addSchemaObject( opContext, mru );
- }
-
- break;
-
- case( DIT_STRUCTURE_RULE_INDEX ):
- DITStructureRule[] dsrs = parsers.parseDitStructureRules( null );
-
- for ( DITStructureRule dsr : dsrs )
- {
- subentryModifier.addSchemaObject( opContext, dsr );
- }
-
- break;
-
- case( DIT_CONTENT_RULE_INDEX ):
- DITContentRule[] dcrs = parsers.parseDitContentRules( null );
-
- for ( DITContentRule dcr : dcrs )
- {
- subentryModifier.addSchemaObject( opContext, dcr );
- }
-
- break;
-
- case( NAME_FORM_INDEX ):
- NameForm[] nfs = parsers.parseNameForms( null );
-
- for ( NameForm nf : nfs )
- {
- subentryModifier.addSchemaObject( opContext, nf );
- }
-
- break;
-
- default:
- throw new IllegalStateException( "Unknown index into handler array: " + index );
- }
- }
-
/* (non-Javadoc)
* @see org.apache.directory.server.core.schema.SchemaChangeManager#modifySchemaSubentry(org.apache.directory.server.core.interceptor.context.ModifyOperationContext, org.apache.directory.server.core.entry.ServerEntry, org.apache.directory.server.core.entry.ServerEntry, boolean)
*/