directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r928015 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema: NameForm.java SchemaUtils.java
Date Fri, 26 Mar 2010 18:52:47 GMT
Author: elecharny
Date: Fri Mar 26 18:52:47 2010
New Revision: 928015

URL: http://svn.apache.org/viewvc?rev=928015&view=rev
Log:
o Completed the render( NameForm ) method
o Removing some spurious throws Exception in NameForm

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java?rev=928015&r1=928014&r2=928015&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
Fri Mar 26 18:52:47 2010
@@ -194,7 +194,7 @@ public class NameForm extends AbstractSc
      * @return the ObjectClass this NameForm is for
      * @throws LdapException If the structuralObjectClass is invalid
      */
-    public ObjectClass getStructuralObjectClass() throws LdapException
+    public ObjectClass getStructuralObjectClass()
     {
         return structuralObjectClass;
     }
@@ -247,7 +247,7 @@ public class NameForm extends AbstractSc
      * @return the AttributeTypes OIDs of the must use attributes
      * @throws LdapException if there is a failure resolving one AttributeTyoe
      */
-    public List<String> getMustAttributeTypeOids() throws LdapException
+    public List<String> getMustAttributeTypeOids()
     {
         return Collections.unmodifiableList( mustAttributeTypeOids );
     }
@@ -362,7 +362,7 @@ public class NameForm extends AbstractSc
      * @return the AttributeTypes OIDs of the may use attributes
      * @throws LdapException if there is a failure resolving one AttributeTyoe
      */
-    public List<String> getMayAttributeTypeOids() throws LdapException
+    public List<String> getMayAttributeTypeOids()
     {
         return Collections.unmodifiableList( mayAttributeTypeOids );
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java?rev=928015&r1=928014&r2=928015&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
Fri Mar 26 18:52:47 2010
@@ -1169,7 +1169,19 @@ public class SchemaUtils
             buf.append( " OBSOLETE" );
         }
 
-        // TODO : implement rendering for OC, MUST and MAY
+        buf.append( " OC " );
+        buf.append( nf.getStructuralObjectClass().getName() );
+        
+        buf.append( " MUST " );
+        renderOids( buf, nf.getMustAttributeTypeOids() );
+        
+        List<String> may = nf.getMayAttributeTypeOids();
+        
+        if ( ( may != null ) && ( may.size() > 0 ) )
+        {
+            buf.append( " MAY " );
+            renderOids( buf, may );
+        }
 
         buf.append( " X-SCHEMA '" );
         buf.append( nf.getSchemaName() );



Mime
View raw message