directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gokt...@apache.org
Subject svn commit: r1228656 - /directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/schema/DefaultComponentSchemaGenerator.java
Date Sat, 07 Jan 2012 16:44:24 GMT
Author: gokturk
Date: Sat Jan  7 16:44:24 2012
New Revision: 1228656

URL: http://svn.apache.org/viewvc?rev=1228656&view=rev
Log:
* Attribute type generation is modified to keep track of attribute's using objectClass in
"m-desc" attribute. So that schema removals can be done on house keeped components.
* Minor formatting changes.

Modified:
    directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/schema/DefaultComponentSchemaGenerator.java

Modified: directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/schema/DefaultComponentSchemaGenerator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/schema/DefaultComponentSchemaGenerator.java?rev=1228656&r1=1228655&r2=1228656&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/schema/DefaultComponentSchemaGenerator.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/component-hub/src/main/java/org/apache/directory/server/component/schema/DefaultComponentSchemaGenerator.java
Sat Jan  7 16:44:24 2012
@@ -72,9 +72,13 @@ public class DefaultComponentSchemaGener
                 String propname = prop.getName();
 
                 String proptype = prop.getType();
+
                 String propoid = ComponentOIDGenerator.generateAttribOID( componentBaseOID
);
+
                 String propdn = "m-oid=" + propoid + "," + attribsDn;
 
+                String propdesc = componentName + "-" + propname;
+
                 if ( !( proptype.equals( "int" ) || proptype.equals( "java.lang.String" )
|| proptype
                     .equals( "boolean" ) ) )
                 {
@@ -94,7 +98,7 @@ public class DefaultComponentSchemaGener
                     "objectclass:top",
                     "m-oid:" + propoid,
                     "m-name:" + propname,
-                    "m-description:Property of component type " + componentName,
+                    "m-description:" + propdesc,
                     "m-equality:" + equality,
                     "m-ordering:" + ordering,
                     "m-substr:" + substr,
@@ -110,19 +114,13 @@ public class DefaultComponentSchemaGener
                 {
                     ocAttribs.add( "m-may:" + propname );
                 }
-
             }
 
-            schemaElements.add( new LdifEntry( ocsDn,
-                "objectclass:organizationalUnit",
-                "objectClass:top",
-                "ou:objectClasses" ) );
 
             String ocoid = ComponentOIDGenerator.getObjectClassOID( componentBaseOID );
             String ocDn = "m-oid=" + ocoid + "," + ocsDn;
 
             ocAttribs.add( 0, "m-must:" + ADSSchemaConstants.ADS_COMPONENT_INSTANCE_ATTRIB_NAME
);
-            ocAttribs.add( 0, "m-must:active" );
             ocAttribs.add( 0, "m-supObjectClass: top" );
             ocAttribs.add( 0, "m-description:Object Class for generating instances of:" +
componentName );
             ocAttribs.add( 0, "m-name:" + componentName );



Mime
View raw message