directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1000834 - in /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative: AbstractAdministrativePoint.java AdministrativePoint.java AutonomousAdministrativePoint.java
Date Fri, 24 Sep 2010 12:27:24 GMT
Author: elecharny
Date: Fri Sep 24 12:27:23 2010
New Revision: 1000834

URL: http://svn.apache.org/viewvc?rev=1000834&view=rev
Log:
Added some better support for parent inheritence managements in APs

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AbstractAdministrativePoint.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AdministrativePoint.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AutonomousAdministrativePoint.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AbstractAdministrativePoint.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AbstractAdministrativePoint.java?rev=1000834&r1=1000833&r2=1000834&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AbstractAdministrativePoint.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AbstractAdministrativePoint.java
Fri Sep 24 12:27:23 2010
@@ -28,7 +28,8 @@ import org.apache.directory.shared.ldap.
 
 
 /**
- *
+ * Abstract implementation for the AdministrativePoint
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public abstract class AbstractAdministrativePoint implements AdministrativePoint
@@ -133,33 +134,6 @@ public abstract class AbstractAdministra
     /**
      * {@inheritDoc}
      */
-    public Map<String, AdministrativePoint> getChildren()
-    {
-        return children;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setChildren( Map<String, AdministrativePoint> children )
-    {
-        this.children = children;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void addChild( AdministrativePoint child )
-    {
-        children.put( child.getUuid(), child );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AdministrativePoint.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AdministrativePoint.java?rev=1000834&r1=1000833&r2=1000834&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AdministrativePoint.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AdministrativePoint.java
Fri Sep 24 12:27:23 2010
@@ -19,13 +19,19 @@
  */
 package org.apache.directory.server.core.administrative;
 
-import java.util.Map;
-
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.subtree.AdministrativeRole;
 
+
 /**
- *
+ * An interface used to describe an AdministrativePoint. An AdministratuvePoint 
+ * holds some elements useful to navigate through the administrative model :
+ * <li>
+ * <ul>The DN : the AP position in the DIT</ul>
+ * <ul>The UUID : The AP unique identifier used when an entry point to the AP it depends
on</ul>
+ * <ul>The role : the AP role</ul>
+ * <ul>The parent : the AP this AP is the direct descendant of</ul>
+ * </li>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public interface AdministrativePoint
@@ -75,28 +81,6 @@ public interface AdministrativePoint
 
 
     /**
-     * @return The list of children AdministrativePoint. May be empty
-     */
-    Map<String, AdministrativePoint> getChildren();
-
-
-    /**
-     * Add an AdministrativePoint child
-     *
-     * @param child the AdministrativePoint child to add
-     */
-    void addChild( AdministrativePoint child );
-
-
-    /**
-     * Set the AdministrativePoint children
-     *
-     * @param children the AdministrativePoint children
-     */
-    void setChildren( Map<String, AdministrativePoint> children );
-
-
-    /**
      * @return The administrativeRole
      */
     AdministrativeRole getRole();

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AutonomousAdministrativePoint.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AutonomousAdministrativePoint.java?rev=1000834&r1=1000833&r2=1000834&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AutonomousAdministrativePoint.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/administrative/AutonomousAdministrativePoint.java
Fri Sep 24 12:27:23 2010
@@ -30,6 +30,18 @@ import org.apache.directory.shared.ldap.
  */
 public class AutonomousAdministrativePoint extends AbstractAdministrativePoint
 {
+    /** A pointer to the AccessControl SAP, if there is some */
+    private AdministrativePoint accessControlSapParent;
+
+    /** A pointer to the CollectiveAttribute SAP, if there is some */
+    private AdministrativePoint collectiveAttributeSapParent;
+
+    /** A pointer to the TriggerExecution SAP, if there is some */
+    private AdministrativePoint triggerExecutionSapParent;
+
+    /** A pointer to the Subschema SAP, if there is some */
+    private AdministrativePoint subschemaSapParent;
+
     /**
      * Create an instance of AutonomousAdministrativePoint
      *
@@ -52,6 +64,86 @@ public class AutonomousAdministrativePoi
 
 
     /**
+     * @return The parent AccessControl SAP if there is some, or the parent AAP
+     */
+    public AdministrativePoint getAccessControlParent()
+    {
+        return accessControlSapParent;
+    }
+
+
+    /**
+     * Set the AccessControl SAP parent (can be an AAP)
+     *
+     * @param accessControlSapParent The AccessControl SAP parent
+     */
+    public void setAccessControlParent( AdministrativePoint accessControlSapParent )
+    {
+        this.accessControlSapParent = accessControlSapParent;
+    }
+
+
+    /**
+     * @return The parent CollectiveAttribute SAP if there is some, or the parent AAP
+     */
+    public AdministrativePoint getCollectiveAttributeParent()
+    {
+        return collectiveAttributeSapParent;
+    }
+
+
+    /**
+     * Set the CollectiveAttribute SAP parent (can be an AAP)
+     *
+     * @param collectiveAttributeSapParent The CollectiveAttribute SAP parent
+     */
+    public void setCollectiveAttributeParent( AdministrativePoint collectiveAttributeSapParent
)
+    {
+        this.collectiveAttributeSapParent = collectiveAttributeSapParent;
+    }
+
+
+    /**
+     * @return The parent TriggerExecution SAP if there is some, or the parent AAP
+     */
+    public AdministrativePoint getTriggerExecutionParent()
+    {
+        return triggerExecutionSapParent;
+    }
+
+
+    /**
+     * Set the TriggerExecution SAP parent (can be an AAP)
+     *
+     * @param triggerExecutionSapParent The TriggerExecution SAP parent
+     */
+    public void setTriggerExecutionParent( AdministrativePoint triggerExecutionSapParent
)
+    {
+        this.triggerExecutionSapParent = triggerExecutionSapParent;
+    }
+
+
+    /**
+     * @return The parent Subschema SAP if there is some, or the parent AAP
+     */
+    public AdministrativePoint getSubschemaParent()
+    {
+        return subschemaSapParent;
+    }
+
+
+    /**
+     * Set the Subschema SAP parent (can be an AAP)
+     *
+     * @param subschemaSapParent The Subschema SAP parent
+     */
+    public void setSubschemaParent( AdministrativePoint subschemaSapParent )
+    {
+        this.subschemaSapParent = subschemaSapParent;
+    }
+
+
+    /**
      * {@inheritDoc}
      */
     public String toString()



Mime
View raw message