directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1027777 - in /directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans: ConfigBean.java DirectoryServiceBean.java
Date Wed, 27 Oct 2010 00:00:15 GMT
Author: elecharny
Date: Wed Oct 27 00:00:15 2010
New Revision: 1027777

URL: http://svn.apache.org/viewvc?rev=1027777&view=rev
Log:
Added methods to return the atomic beans.

Modified:
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java?rev=1027777&r1=1027776&r2=1027777&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java
Wed Oct 27 00:00:15 2010
@@ -63,6 +63,31 @@ public class ConfigBean 
 
 
     /**
+     * @return the directoryServiceBean
+     */
+    public DirectoryServiceBean getDirectoryServiceBean( String directoryServiceId )
+    {
+        if ( ( directoryServiceBeans == null ) || ( directoryServiceBeans.size() == 0 ) )
+        {
+            return null;
+        }
+        
+        for ( AdsBaseBean bean : directoryServiceBeans )
+        {
+            if ( bean instanceof DirectoryServiceBean )
+            {
+                if ( ((DirectoryServiceBean)bean).getDirectoryServiceId().equals( directoryServiceId
) )
+                {
+                    return (DirectoryServiceBean)bean;
+                }
+            }
+        }
+        
+        return null;
+    }
+
+
+    /**
      * @param directoryServiceBeans the directoryServiceBeans to set
      */
     public void setDirectoryServiceBeans( List<AdsBaseBean> directoryServiceBeans )

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java?rev=1027777&r1=1027776&r2=1027777&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
Wed Oct 27 00:00:15 2010
@@ -79,7 +79,6 @@ public class DirectoryServiceBean extend
     /** The working directory */
     private String dsWorkingDirectory;
 
-
     /**
      * Create a new DnsServerBean instance
      */
@@ -368,6 +367,125 @@ public class DirectoryServiceBean extend
         return servers;
     }
 
+    
+    /**
+     * @return The LdapServerBean configuration
+     */
+    public LdapServerBean getLdapServerBean()
+    {
+        for ( ServerBean server : servers )
+        {
+            if ( server instanceof LdapServerBean )
+            {
+                return (LdapServerBean)server;
+            }
+        }
+        
+        return null;
+    }
+    
+    
+    /**
+     * @return The NtpServerBean configuration
+     */
+    public NtpServerBean getNtpServerBean()
+    {
+        for ( ServerBean server : servers )
+        {
+            if ( server instanceof NtpServerBean )
+            {
+                return (NtpServerBean)server;
+            }
+        }
+        
+        return null;
+    }
+    
+    
+    /**
+     * @return The DnsServerBean configuration
+     */
+    public DnsServerBean getDnsServerBean()
+    {
+        for ( ServerBean server : servers )
+        {
+            if ( server instanceof DnsServerBean )
+            {
+                return (DnsServerBean)server;
+            }
+        }
+        
+        return null;
+    }
+    
+    
+    /**
+     * @return The DhcpServerBean configuration
+     */
+    public DhcpServerBean getDhcpServerBean()
+    {
+        for ( ServerBean server : servers )
+        {
+            if ( server instanceof DhcpServerBean )
+            {
+                return (DhcpServerBean)server;
+            }
+        }
+        
+        return null;
+    }
+    
+    
+    /**
+     * @return The HttpServerBean configuration
+     */
+    public HttpServerBean getHttpServerBean()
+    {
+        for ( ServerBean server : servers )
+        {
+            if ( server instanceof HttpServerBean )
+            {
+                return (HttpServerBean)server;
+            }
+        }
+        
+        return null;
+    }
+    
+    
+    /**
+     * @return The KdcServerBean configuration
+     */
+    public KdcServerBean getKdcServerBean()
+    {
+        for ( ServerBean server : servers )
+        {
+            if ( server instanceof KdcServerBean )
+            {
+                return (KdcServerBean)server;
+            }
+        }
+        
+        return null;
+    }
+    
+    
+    /**
+     * @return The ChangePasswordServerBean configuration
+     */
+    public ChangePasswordServerBean getChangePasswordServerBean()
+    {
+        for ( ServerBean server : servers )
+        {
+            if ( server instanceof ChangePasswordServerBean )
+            {
+                return (ChangePasswordServerBean)server;
+            }
+        }
+        
+        return null;
+    }
+    
 
     /**
      * @param servers the servers to set



Mime
View raw message