You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2007/01/25 03:27:36 UTC

svn commit: r499643 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema: AbstractSchemaObject.java SchemaObject.java

Author: akarasulu
Date: Wed Jan 24 18:27:35 2007
New Revision: 499643

URL: http://svn.apache.org/viewvc?view=rev&rev=499643
Log:
making schema objects store the name of the schema they are defined in

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java?view=diff&rev=499643&r1=499642&r2=499643
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java Wed Jan 24 18:27:35 2007
@@ -43,6 +43,8 @@
     /** a short description of this SchemaObject */
     protected String description;
 
+    /** the name of the schema this object is associated with */
+    protected String schema;
 
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
@@ -58,7 +60,7 @@
      * @throws NullPointerException
      *             if oid is null
      */
-    protected AbstractSchemaObject(String oid)
+    protected AbstractSchemaObject( String oid )
     {
         this( oid, ArrayUtils.EMPTY_STRING_ARRAY, false, null );
     }
@@ -67,14 +69,11 @@
     /**
      * Creates an abstract SchemaObject.
      * 
-     * @param oid
-     *            the numeric object identifier (OID)
-     * @param names
-     *            the human readable names for this SchemaObject
-     * @throws NullPointerException
-     *             if oid is null
+     * @param oid the numeric object identifier (OID)
+     * @param names the human readable names for this SchemaObject
+     * @throws NullPointerException if oid is null
      */
-    protected AbstractSchemaObject(String oid, String[] names)
+    protected AbstractSchemaObject( String oid, String[] names )
     {
         this( oid, names, false, null );
     }
@@ -83,16 +82,12 @@
     /**
      * Creates an abstract SchemaObject.
      * 
-     * @param oid
-     *            the numeric object identifier (OID)
-     * @param names
-     *            the human readable names for this SchemaObject
-     * @param isObsolete
-     *            true if this object is inactive, false if active
-     * @throws NullPointerException
-     *             if oid is null
+     * @param oid the numeric object identifier (OID)
+     * @param names the human readable names for this SchemaObject
+     * @param isObsolete true if this object is inactive, false if active
+     * @throws NullPointerException if oid is null
      */
-    protected AbstractSchemaObject(String oid, String[] names, boolean isObsolete)
+    protected AbstractSchemaObject( String oid, String[] names, boolean isObsolete )
     {
         this( oid, names, isObsolete, null );
     }
@@ -101,16 +96,12 @@
     /**
      * Creates an abstract SchemaObject.
      * 
-     * @param oid
-     *            the numeric object identifier (OID)
-     * @param name
-     *            the first human readable name for this SchemaObject
-     * @param isObsolete
-     *            true if this object is inactive, false if active
-     * @throws NullPointerException
-     *             if oid is null
+     * @param oid the numeric object identifier (OID)
+     * @param name the first human readable name for this SchemaObject
+     * @param isObsolete true if this object is inactive, false if active
+     * @throws NullPointerException if oid is null
      */
-    protected AbstractSchemaObject(String oid, String name, boolean isObsolete)
+    protected AbstractSchemaObject( String oid, String name, boolean isObsolete )
     {
         this( oid, new String[]
             { name }, isObsolete, null );
@@ -120,14 +111,11 @@
     /**
      * Creates an abstract SchemaObject.
      * 
-     * @param oid
-     *            the numeric object identifier (OID)
-     * @param isObsolete
-     *            true if this object is inactive, false if active
-     * @throws NullPointerException
-     *             if oid is null
+     * @param oid the numeric object identifier (OID)
+     * @param isObsolete true if this object is inactive, false if active
+     * @throws NullPointerException if oid is null
      */
-    protected AbstractSchemaObject(String oid, boolean isObsolete)
+    protected AbstractSchemaObject( String oid, boolean isObsolete )
     {
         this( oid, null, isObsolete, null );
     }
@@ -136,14 +124,11 @@
     /**
      * Creates an abstract SchemaObject.
      * 
-     * @param oid
-     *            the numeric object identifier (OID)
-     * @param description
-     *            a brief description for the SchemaObject
-     * @throws NullPointerException
-     *             if oid is null
+     * @param oid the numeric object identifier (OID)
+     * @param description a brief description for the SchemaObject
+     * @throws NullPointerException if oid is null
      */
-    protected AbstractSchemaObject(String oid, String description)
+    protected AbstractSchemaObject( String oid, String description )
     {
         this( oid, null, false, description );
     }
@@ -152,18 +137,13 @@
     /**
      * Creates an abstract SchemaObject.
      * 
-     * @param oid
-     *            the numeric object identifier (OID)
-     * @param names
-     *            the human readable names for this SchemaObject
-     * @param isObsolete
-     *            true if this object is inactive, false if active
-     * @param description
-     *            a brief description for the SchemaObject
-     * @throws NullPointerException
-     *             if oid is null
+     * @param oid the numeric object identifier (OID)
+     * @param names the human readable names for this SchemaObject
+     * @param isObsolete true if this object is inactive, false if active
+     * @param description a brief description for the SchemaObject
+     * @throws NullPointerException if oid is null
      */
-    protected AbstractSchemaObject(String oid, String[] names, boolean isObsolete, String description)
+    protected AbstractSchemaObject( String oid, String[] names, boolean isObsolete, String description )
     {
         if ( oid == null )
         {
@@ -213,6 +193,15 @@
 
 
     /**
+     * @see SchemaObject#getSchema()
+     */
+    public String getSchema()
+    {
+        return schema;
+    }
+    
+    
+    /**
      * @see SchemaObject#getName()
      */
     public String getName()
@@ -234,6 +223,7 @@
     // P R O T E C T E D M U T A T O R S
     // ------------------------------------------------------------------------
 
+    
     /**
      * Sets whether or not this SchemaObject is inactived.
      * 
@@ -243,6 +233,17 @@
     protected void setObsolete( boolean obsolete )
     {
         isObsolete = obsolete;
+    }
+
+
+    /**
+     * Sets schema name this schema object is associated with.
+     * 
+     * @param schema the name of the schema this object is associated with
+     */
+    protected void setSchema( String schema )
+    {
+        this.schema = schema;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java?view=diff&rev=499643&r1=499642&r2=499643
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java Wed Jan 24 18:27:35 2007
@@ -79,4 +79,12 @@
      * @return a short description about this SchemaObject
      */
     String getDescription();
+    
+    
+    /**
+     * Gets the name of the schema this SchemaObject is associated with.
+     *
+     * @return the name of the schema associated with this schemaObject
+     */
+    String getSchema();
 }