directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1729203 - in /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries: DefaultSchema.java Schema.java
Date Mon, 08 Feb 2016 16:14:07 GMT
Author: elecharny
Date: Mon Feb  8 16:14:07 2016
New Revision: 1729203

URL: http://svn.apache.org/viewvc?rev=1729203&view=rev
Log:
Injected the SchemaLoader into the Schema

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchema.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Schema.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchema.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchema.java?rev=1729203&r1=1729202&r2=1729203&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchema.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultSchema.java
Mon Feb  8 16:14:07 2016
@@ -53,6 +53,9 @@ public class DefaultSchema implements Sc
 
     /** The set of SchemaObjects declared in this schema */
     protected Set<SchemaObjectWrapper> content;
+    
+    /** The SchemaLoader used to load this schema */
+    protected SchemaLoader schemaLoader;
 
 
     /**
@@ -60,9 +63,9 @@ public class DefaultSchema implements Sc
      *
      * @param name The schema's name
      */
-    public DefaultSchema( String name )
+    public DefaultSchema( SchemaLoader schemaLoader, String name )
     {
-        this( name, null, null, false );
+        this( schemaLoader, name, null, null, false );
     }
 
 
@@ -72,9 +75,9 @@ public class DefaultSchema implements Sc
      * @param name The schema's name
      * @param owner the schema's owner
      */
-    public DefaultSchema( String name, String owner )
+    public DefaultSchema( SchemaLoader schemaLoader, String name, String owner )
     {
-        this( name, owner, null, false );
+        this( schemaLoader, name, owner, null, false );
     }
 
 
@@ -85,9 +88,9 @@ public class DefaultSchema implements Sc
      * @param owner the schema's owner
      * @param dependencies The list of schemas it depends on 
      */
-    public DefaultSchema( String name, String owner, String[] dependencies )
+    public DefaultSchema( SchemaLoader schemaLoader, String name, String owner, String[]
dependencies )
     {
-        this( name, owner, dependencies, false );
+        this( schemaLoader, name, owner, dependencies, false );
     }
 
 
@@ -99,7 +102,7 @@ public class DefaultSchema implements Sc
      * @param dependencies The list of schemas it depends on
      * @param disabled Set the status for this schema 
      */
-    public DefaultSchema( String name, String owner, String[] dependencies, boolean disabled
)
+    public DefaultSchema( SchemaLoader schemaLoader, String name, String owner, String[]
dependencies, boolean disabled )
     {
         if ( name == null )
         {
@@ -130,6 +133,8 @@ public class DefaultSchema implements Sc
         this.disabled = disabled;
 
         content = new HashSet<SchemaObjectWrapper>();
+        
+        this.schemaLoader = schemaLoader;
     }
 
 
@@ -231,6 +236,15 @@ public class DefaultSchema implements Sc
     {
         return content;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public SchemaLoader getSchemaLoader()
+    {
+        return schemaLoader;
+    }
 
 
     /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Schema.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Schema.java?rev=1729203&r1=1729202&r2=1729203&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Schema.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Schema.java
Mon Feb  8 16:14:07 2016
@@ -101,4 +101,12 @@ public interface Schema
      * @return The Set of associated SchemaObjects
      */
     Set<SchemaObjectWrapper> getContent();
+    
+    
+    /**
+     * Gets the SchemaLoader this Schema has to be loaded with
+     * 
+     * @return The SchemaLoader in use
+     */
+    SchemaLoader getSchemaLoader();
 }



Mime
View raw message