Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 41706 invoked from network); 26 Aug 2009 22:09:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 22:09:50 -0000 Received: (qmail 65984 invoked by uid 500); 26 Aug 2009 22:03:00 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 65929 invoked by uid 500); 26 Aug 2009 22:03:00 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 65886 invoked by uid 99); 26 Aug 2009 22:03:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 22:03:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 22:02:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 14C2123888C5; Wed, 26 Aug 2009 22:02:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r808199 - /directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Date: Wed, 26 Aug 2009 22:02:35 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090826220236.14C2123888C5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Wed Aug 26 22:02:35 2009 New Revision: 808199 URL: http://svn.apache.org/viewvc?rev=808199&view=rev Log: Fixed various compilation errors Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=808199&r1=808198&r2=808199&view=diff ============================================================================== --- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original) +++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Wed Aug 26 22:02:35 2009 @@ -252,9 +252,9 @@ for ( ObjectClass parent : parents ) { - AttributeType[] mustParent = parent.getMustList(); + List mustParent = parent.getMustAttributeTypes(); - if ( ( mustParent != null ) && ( mustParent.length != 0 ) ) + if ( ( mustParent != null ) && ( mustParent.size() != 0 ) ) { for ( AttributeType attributeType : mustParent ) { @@ -295,9 +295,9 @@ for ( ObjectClass parent : parents ) { - AttributeType[] mustParent = parent.getMustList(); + List mustParent = parent.getMustAttributeTypes(); - if ( ( mustParent != null ) && ( mustParent.length != 0 ) ) + if ( ( mustParent != null ) && ( mustParent.size() != 0 ) ) { for ( AttributeType attributeType : mustParent ) { @@ -330,10 +330,10 @@ private void computeOCSuperiors( ObjectClass objectClass, List superiors, Set ocSeen ) throws Exception { - ObjectClass[] parents = objectClass.getSuperClasses(); + List parents = objectClass.getSuperiors(); // Loop on all the objectClass superiors - if ( ( parents != null ) && ( parents.length != 0 ) ) + if ( ( parents != null ) && ( parents.size() != 0 ) ) { for ( ObjectClass parent : parents ) { @@ -462,10 +462,10 @@ // Check that the attribute is declared if ( registries.getAttributeTypeRegistry().contains( attribute ) ) { - String oid = registries.getOidRegistry().getOid( attribute ); + String oid = atRegistry.getOid( attribute ); // The attribute must be an AttributeType - if ( atRegistry.hasAttributeType( oid ) ) + if ( atRegistry.contains( oid ) ) { if ( !filteredAttrs.containsKey( oid ) ) { @@ -728,7 +728,7 @@ String objectClassOid = null; - if ( registries.getObjectClassRegistry().hasObjectClass( objectClass ) ) + if ( registries.getObjectClassRegistry().contains( objectClass ) ) { objectClassOid = registries.getObjectClassRegistry().lookup( objectClass ).getOid(); } @@ -737,7 +737,7 @@ return new BaseEntryFilteringCursor( new EmptyCursor(), opContext ); } - String nodeOid = registries.getOidRegistry().getOid( node.getAttribute() ); + String nodeOid = atRegistry.getOid( node.getAttribute() ); // see if node attribute is objectClass if ( nodeOid.equals( SchemaConstants.OBJECT_CLASS_AT_OID ) @@ -798,7 +798,7 @@ private void getSuperiors( ObjectClass oc, Set ocSeen, List result ) throws Exception { - for ( ObjectClass parent : oc.getSuperClasses() ) + for ( ObjectClass parent : oc.getSuperiors() ) { // Skip 'top' if ( SchemaConstants.TOP_OC.equals( parent.getName() ) ) @@ -837,13 +837,13 @@ return false; } - String attrOid = oidRegistry.getOid( attrId ); + String attrOid = registries.getAttributeTypeRegistry().getOid( attrId ); for ( Value objectClass : objectClasses ) { ObjectClass ocSpec = registry.lookup( objectClass.getString() ); - for ( AttributeType must : ocSpec.getMustList() ) + for ( AttributeType must : ocSpec.getMustAttributeTypes() ) { if ( must.getOid().equals( attrOid ) ) { @@ -1018,10 +1018,10 @@ String ocName = value.getString(); ObjectClass oc = registries.getObjectClassRegistry().lookup( ocName ); - AttributeType[] types = oc.getMustList(); + List types = oc.getMustAttributeTypes(); // For each objectClass, loop on all MUST attributeTypes, if any - if ( ( types != null ) && ( types.length > 0 ) ) + if ( ( types != null ) && ( types.size() > 0 ) ) { for ( AttributeType type : types ) { @@ -1039,7 +1039,7 @@ Set allowed = new HashSet( must ); // Add the 'ObjectClass' attribute ID - allowed.add( registries.getOidRegistry().getOid( SchemaConstants.OBJECT_CLASS_AT ) ); + allowed.add( registries.getAttributeTypeRegistry().getOid( SchemaConstants.OBJECT_CLASS_AT ) ); // Loop on all objectclasses for ( Value objectClass : objectClasses ) @@ -1047,10 +1047,10 @@ String ocName = objectClass.getString(); ObjectClass oc = registries.getObjectClassRegistry().lookup( ocName ); - AttributeType[] types = oc.getMayList(); + List types = oc.getMayAttributeTypes(); // For each objectClass, loop on all MAY attributeTypes, if any - if ( ( types != null ) && ( types.length > 0 ) ) + if ( ( types != null ) && ( types.size() > 0 ) ) { for ( AttributeType type : types ) { @@ -1326,7 +1326,7 @@ ServerAttribute change = ( ServerAttribute ) mod.getAttribute(); // TODO/ handle http://issues.apache.org/jira/browse/DIRSERVER-1198 - if ( ( change.getAttributeType() == null ) && !atRegistry.hasAttributeType( change.getUpId() ) + if ( ( change.getAttributeType() == null ) && !atRegistry.contains( change.getUpId() ) && !objectClass.contains( SchemaConstants.EXTENSIBLE_OBJECT_OC ) ) { throw new LdapInvalidAttributeIdentifierException(); @@ -1921,7 +1921,7 @@ for ( AttributeType attributeType : entry.getAttributeTypes() ) { - if ( !atRegistry.hasAttributeType( attributeType.getName() ) ) + if ( !atRegistry.contains( attributeType.getName() ) ) { throw new LdapInvalidAttributeIdentifierException( attributeType.getName() + " not found in attribute registry!" ); @@ -2251,9 +2251,9 @@ for ( ObjectClass oc : structuralObjectClasses ) { - if ( oc.getSuperClasses() != null ) + if ( oc.getSuperiors() != null ) { - for ( ObjectClass superClass : oc.getSuperClasses() ) + for ( ObjectClass superClass : oc.getSuperiors() ) { if ( superClass.isStructural() ) {