directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r888075 - in /directory/shared/branches/shared-schema: ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java
Date Mon, 07 Dec 2009 18:51:17 GMT
Author: elecharny
Date: Mon Dec  7 18:51:16 2009
New Revision: 888075

URL: http://svn.apache.org/viewvc?rev=888075&view=rev
Log:
Added getEnabled() and getDisabled() methods

Modified:
    directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java

Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java?rev=888075&r1=888074&r2=888075&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
(original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/DefaultSchemaManager.java
Mon Dec  7 18:51:16 2009
@@ -291,6 +291,25 @@
     /**
      * {@inheritDoc}
      */
+    public List<Schema> getDisabled()
+    {
+        List<Schema> disabled = new ArrayList<Schema>();
+
+        for ( Schema schema : registries.getLoadedSchemas().values() )
+        {
+            if ( schema.isDisabled() )
+            {
+                disabled.add( schema );
+            }
+        }
+
+        return disabled;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public boolean enable( Schema... schemas ) throws Exception
     {
         // Work on a cloned and relaxed registries
@@ -358,6 +377,25 @@
     /**
      * {@inheritDoc}
      */
+    public List<Schema> getEnabled()
+    {
+        List<Schema> enabled = new ArrayList<Schema>();
+
+        for ( Schema schema : registries.getLoadedSchemas().values() )
+        {
+            if ( schema.isEnabled() )
+            {
+                enabled.add( schema );
+            }
+        }
+
+        return enabled;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public List<Throwable> getErrors()
     {
         return errors;

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java?rev=888075&r1=888074&r2=888075&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaManager.java
Mon Dec  7 18:51:16 2009
@@ -304,6 +304,12 @@
 
 
     /**
+     * @return the list of all the enabled schema
+     */
+    List<Schema> getEnabled();
+
+
+    /**
      * Disables a set of Schemas, and returns true if all the schema have been
      * disabled, with all the dependent schemas, and if the registries is 
      * still consistent.
@@ -356,6 +362,12 @@
 
 
     /**
+     * @return the list of all the disabled schema
+     */
+    List<Schema> getDisabled();
+
+
+    /**
      * Check that the Schemas are consistent regarding the current Registries.
      * 
      * @param schemas The schemas to check



Mime
View raw message