directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r595708 [2/3] - in /directory/studio/trunk/studio-apacheds-configuration: ./ META-INF/ resources/icons/ src/main/java/org/apache/directory/studio/apacheds/configuration/ src/main/java/org/apache/directory/studio/apacheds/configuration/actio...
Date Fri, 16 Nov 2007 15:45:44 GMT
Modified: directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfiguration.java?rev=595708&r1=595707&r2=595708&view=diff
==============================================================================
--- directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfiguration.java (original)
+++ directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfiguration.java Fri Nov 16 07:45:41 2007
@@ -35,8 +35,10 @@
     /** The path of the Server Configuration file */
     private String path;
 
+    // LDAP Configuration
+
     /** The port */
-    private int port;
+    private int ldapPort;
 
     /** The principal */
     private String principal;
@@ -44,8 +46,7 @@
     /** The password */
     private String password;
 
-    /** The flag for Allow Anonymous Access */
-    private boolean allowAnonymousAccess;
+    // Limits
 
     /** The Max Time Limit */
     private int maxTimeLimit;
@@ -53,27 +54,77 @@
     /** the Max Size Limit */
     private int maxSizeLimit;
 
-    /** The Synchonization Period */
+    /** The Synchronization Period */
     private long synchronizationPeriod;
 
     /** The Maximum number of Threads */
     private int maxThreads;
 
+    /** The Supported Mechanisms */
+    private List<String> supportedMechanisms;
+
+    // SASL Properties
+
+    /** The SASL Host */
+    private String saslHost;
+
+    /** The SASL Principal */
+    private String saslPrincipal;
+
+    /** The SASL QOP */
+    private List<String> saslQops;
+
+    /** The SASL Realms */
+    private List<String> saslRealms;
+
+    /** The Search Base DN */
+    private String searchBaseDn;
+
+    // Protocols
+
     /** The flag for Enable Access Control */
     private boolean enableAccessControl;
 
     /** The flag for Enable Kerberos */
     private boolean enableKerberos;
 
+    /** The port for Kerberos */
+    private int kerberosPort;
+
     /** The flag for Enable NTP */
-    private boolean enableNTP;
+    private boolean enableNtp;
+
+    /** The port for NTP */
+    private int ntpPort;
+
+    /** The flag for Enable DNS */
+    private boolean enableDns;
+
+    /** The port for DNS */
+    private int dnsPort;
+
+    /** The flag for Enable LDAPS */
+    private boolean enableLdaps;
+
+    /** The port for LDAPS */
+    private int ldapsPort;
 
     /** The flag for Enable Change Password */
     private boolean enableChangePassword;
 
+    /** The port for Change Password */
+    private int changePasswordPort;
+
+    // Options
+
     /** The flag for Denormalize Operational Attributes */
     private boolean denormalizeOpAttr;
 
+    /** The flag for Allow Anonymous Access */
+    private boolean allowAnonymousAccess;
+
+    // Other configuration elements
+
     /** The Binary Attributes */
     private List<String> binaryAttributes;
 
@@ -92,6 +143,9 @@
      */
     public ServerConfiguration()
     {
+        supportedMechanisms = new ArrayList<String>();
+        saslQops = new ArrayList<String>();
+        saslRealms = new ArrayList<String>();
         partitions = new ArrayList<Partition>();
         interceptors = new ArrayList<Interceptor>();
         extendedOperations = new ArrayList<ExtendedOperation>();
@@ -100,183 +154,184 @@
 
 
     /**
-     * Gets the Allow Anonymous flag.
+     * Adds a Binary Attribute.
      *
+     * @param binaryAttribute
+     *      the Partition to add
      * @return
-     *      true if the server configuration allows Anonymous Access
+     *      true (as per the general contract of the Collection.add method).
      */
-    public boolean isAllowAnonymousAccess()
+    public boolean addBinaryAttribute( String binaryAttribute )
     {
-        return allowAnonymousAccess;
+        return binaryAttributes.add( binaryAttribute );
     }
 
 
     /**
-     * Sets the Allow Anonymous flag.
+     * Adds an Extended Operation.
      *
-     * @param allowAnonymousAccess
-     *      the new value
+     * @param extendedOperation
+     *      the Extended Operation to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
      */
-    public void setAllowAnonymousAccess( boolean allowAnonymousAccess )
+    public boolean addExtendedOperation( ExtendedOperation extendedOperation )
     {
-        this.allowAnonymousAccess = allowAnonymousAccess;
+        return extendedOperations.add( extendedOperation );
     }
 
 
     /**
-     * Gets the Enable Access Control flag.
+     * Adds an Interceptor.
      *
+     * @param interceptor
+     *      the Interceptor to add
      * @return
-     *      true if Access Control is enabled
+     *      true (as per the general contract of the Collection.add method).
      */
-    public boolean isEnableAccessControl()
+    public boolean addInterceptor( Interceptor interceptor )
     {
-        return enableAccessControl;
+        return interceptors.add( interceptor );
     }
 
 
     /**
-     * Sets the Enable Access Control flag.
+     * Adds a Partition.
      *
-     * @param enableAccessControl
-     *      the new value
+     * @param partition
+     *      the Partition to add
+     * @return
+     *      true (as per the general contract of the Collection.add method).
      */
-    public void setEnableAccessControl( boolean enableAccessControl )
+    public boolean addPartition( Partition partition )
     {
-        this.enableAccessControl = enableAccessControl;
+        return partitions.add( partition );
     }
 
 
     /**
-     * Gets the Enable Change Password flag.
+     * Adds a SASL Quality Of Protection.
      *
+     * @param saslQop
+     *      the SASL Quality Of Protection to add
      * @return
-     *      true if Change Password is enabled
+     *      true (as per the general contract of the Collection.add method).
      */
-    public boolean isEnableChangePassword()
+    public boolean addSaslQop( String saslQop )
     {
-        return enableChangePassword;
+        return saslQops.add( saslQop );
     }
 
 
     /**
-     * Sets the Enable Change Password flag.
-     *
-     * @param enableChangePassword
-     *      the new value
-     */
-    public void setEnableChangePassword( boolean enableChangePassword )
+    * Adds a SASL Realm.
+    *
+    * @param qop
+    *      the SASL Realm to add
+    * @return
+    *      true (as per the general contract of the Collection.add method).
+    */
+    public boolean addSaslRealm( String saslRealm )
     {
-        this.enableChangePassword = enableChangePassword;
+        return saslRealms.add( saslRealm );
     }
 
 
     /**
-     * Gets the Enable Kerberos flag.
+     * Adds a Supported Mechanism.
      *
+     * @param supportedMechanism
+     *      the Supported Mechanism to add
      * @return
-     *      true if Kerberos is enabled
+     *      true (as per the general contract of the Collection.add method).
      */
-    public boolean isEnableKerberos()
+    public boolean addSupportedMechanism( String supportedMechanism )
     {
-        return enableKerberos;
+        return supportedMechanisms.add( supportedMechanism );
     }
 
 
     /**
-     * Sets the Enable Kerberos flag.
-     *
-     * @param enableKerberos
-     *      the new value
+     * Removes all Binary Attributes.
      */
-    public void setEnableKerberos( boolean enableKerberos )
+    public void clearBinaryAttributes()
     {
-        this.enableKerberos = enableKerberos;
+        binaryAttributes.clear();
     }
 
 
     /**
-     * Gets the Enable NTP flag.
-     *
-     * @return
-     *      true if NTP is enabled
+     * Removes all ExtendedOperations.
      */
-    public boolean isEnableNTP()
+    public void clearExtendedOperations()
     {
-        return enableNTP;
+        extendedOperations.clear();
     }
 
 
     /**
-     * Sets the Enable NTP flag.
-     *
-     * @param enableNTP
-     *      the new value
+     * Removes all interceptors.
      */
-    public void setEnableNTP( boolean enableNTP )
+    public void clearInterceptors()
     {
-        this.enableNTP = enableNTP;
+        interceptors.clear();
     }
 
 
     /**
-     * Gets the Extended Operations List.
-     *
-     * @return
-     *      the Extended Operations List
+     * Removes all partitions.
      */
-    public List<ExtendedOperation> getExtendedOperations()
+    public void clearPartitions()
     {
-        return extendedOperations;
+        partitions.clear();
     }
 
 
     /**
-     * Sets the Extended Operations List.
+     * Gets the Binary Attributes List.
      *
-     * @param extendedOperations
-     *      the new value
+     * @return
+     *      the Binary Attributes  List
      */
-    public void setExtendedOperations( List<ExtendedOperation> extendedOperations )
+    public List<String> getBinaryAttributes()
     {
-        this.extendedOperations = extendedOperations;
+        return binaryAttributes;
     }
 
 
     /**
-     * Adds ab Extended Operation.
+     * Gets the Change Password port.
      *
-     * @param extendedOperation
-     *      the Extended Operation to add
      * @return
-     *      true (as per the general contract of the Collection.add method).
+     *      the Change Password port
      */
-    public boolean addExtendedOperation( ExtendedOperation extendedOperation )
+    public int getChangePasswordPort()
     {
-        return extendedOperations.add( extendedOperation );
+        return changePasswordPort;
     }
 
 
     /**
-     * Removes an Extended Operation.
+     * Gets the DNS port.
      *
-     * @param extendedOperation
-     *      the Extended Operation to remove
      * @return
-     *      true if this list contained the specified element.
+     *      the DNS port
      */
-    public boolean removeExtendedOperation( ExtendedOperation extendedOperation )
+    public int getDnsPort()
     {
-        return extendedOperations.remove( extendedOperation );
+        return dnsPort;
     }
 
 
     /**
-     * Removes all ExtendedOperations.
+     * Gets the Extended Operations List.
+     *
+     * @return
+     *      the Extended Operations List
      */
-    public void clearExtendedOperations()
+    public List<ExtendedOperation> getExtendedOperations()
     {
-        extendedOperations.clear();
+        return extendedOperations;
     }
 
 
@@ -293,51 +348,26 @@
 
 
     /**
-     * Sets the Interceptors List.
-     *
-     * @param interceptors
-     *      the new value
-     */
-    public void setInterceptors( List<Interceptor> interceptors )
-    {
-        this.interceptors = interceptors;
-    }
-
-
-    /**
-     * Adds an Interceptor.
+     * Gets the Kerberos port.
      *
-     * @param interceptor
-     *      the Interceptor to add
      * @return
-     *      true (as per the general contract of the Collection.add method).
+     *      the Kerberos port
      */
-    public boolean addInterceptor( Interceptor interceptor )
+    public int getKerberosPort()
     {
-        return interceptors.add( interceptor );
+        return kerberosPort;
     }
 
 
     /**
-     * Removes an Interceptor.
+     * Gets the LDAPS port.
      *
-     * @param interceptor
-     *      the Interceptor to remove
      * @return
-     *      true if this list contained the specified element.
-     */
-    public boolean removeInterceptor( Interceptor interceptor )
-    {
-        return interceptors.remove( interceptor );
-    }
-
-
-    /**
-     * Removes all interceptors.
+     *      the LDAPS port
      */
-    public void clearInterceptors()
+    public int getLdapsPort()
     {
-        interceptors.clear();
+        return ldapsPort;
     }
 
 
@@ -354,18 +384,6 @@
 
 
     /**
-     * Sets the Maximum Size Limit.
-     *
-     * @param maxSizeLimit
-     *      the new value
-     */
-    public void setMaxSizeLimit( int maxSizeLimit )
-    {
-        this.maxSizeLimit = maxSizeLimit;
-    }
-
-
-    /**
      * Gets the Maximum number of Threads.
      *
      * @return
@@ -378,18 +396,6 @@
 
 
     /**
-     * Sets the Maximum number of Threads
-     *
-     * @param maxThreads
-     *      the new value
-     */
-    public void setMaxThreads( int maxThreads )
-    {
-        this.maxThreads = maxThreads;
-    }
-
-
-    /**
      * Gets the Maximum Time Limit.
      *
      * @return
@@ -402,14 +408,14 @@
 
 
     /**
-     * Sets the Maximum Time Limit.
+     * Gets the NTP port.
      *
-     * @param maxTimeLimit
-     *      the new value
+     * @return
+     *      the NTP port
      */
-    public void setMaxTimeLimit( int maxTimeLimit )
+    public int getNtpPort()
     {
-        this.maxTimeLimit = maxTimeLimit;
+        return ntpPort;
     }
 
 
@@ -426,233 +432,230 @@
 
 
     /**
-     * Sets the Partitions List.
+     * Gets the password.
      *
-     * @param partitions
-     *      the new value
+     * @return
+     *      the password
      */
-    public void setPartitions( List<Partition> partitions )
+    public String getPassword()
     {
-        this.partitions = partitions;
+        return password;
     }
 
 
     /**
-     * Adds a Partition.
+     * Gets the Path of the file corresponding to the ServerConfiguration.
      *
-     * @param partition
-     *      the Partition to add
      * @return
-     *      true (as per the general contract of the Collection.add method).
+     *      the Path of the corresponding file
      */
-    public boolean addPartition( Partition partition )
+    public String getPath()
     {
-        return partitions.add( partition );
+        return path;
     }
 
 
     /**
-     * Removes a Partition.
+     * Gets the LDAP Port.
      *
-     * @param partition
-     *      the partition to remove
      * @return
-     *      true if this list contained the specified element.
+     *      the LDAP Port
      */
-    public boolean removePartition( Partition partition )
+    public int getLdapPort()
     {
-        return partitions.remove( partition );
+        return ldapPort;
     }
 
 
     /**
-     * Removes all partitions.
+     * Gets the Principal
+     *
+     * @return
+     *      the Principal
      */
-    public void clearPartitions()
+    public String getPrincipal()
     {
-        partitions.clear();
+        return principal;
     }
 
 
     /**
-     * Gets the password.
+     * Gets the SASL Host.
      *
      * @return
-     *      the password
+     *       the SASL Host
      */
-    public String getPassword()
+    public String getSaslHost()
     {
-        return password;
+        return saslHost;
     }
 
 
     /**
-     * Sets the password.
+     * Gets the SASL Principal.
      *
-     * @param password
-     *      the new password
+     * @return
+     *      the SASL Principal
      */
-    public void setPassword( String password )
+    public String getSaslPrincipal()
     {
-        this.password = password;
+        return saslPrincipal;
     }
 
 
     /**
-     * Gets the Path of the file corresponding to the ServerConfiguration.
+     * Gets the SASL Quality Of Protection List
      *
      * @return
-     *      the Path of the corresponding file
+     *      the SASL Quality Of Protection List
      */
-    public String getPath()
+    public List<String> getSaslQops()
     {
-        return path;
+        return saslQops;
     }
 
 
     /**
-     * Sets the Path of the file corresponding to the ServerConfiguration.
+     * Gets the SASL Realms List.
      *
-     * @param path
-     *      the new value
+     * @return
+     *      the SASL Realms List
      */
-    public void setPath( String path )
+    public List<String> getSaslRealms()
     {
-        this.path = path;
+        return saslRealms;
     }
 
 
     /**
-     * Gets the Port.
+     * Gets the Search Base DN.
      *
      * @return
-     *      the Port
+     *      the Search Base DN
      */
-    public int getPort()
+    public String getSearchBaseDn()
     {
-        return port;
+        return searchBaseDn;
     }
 
 
     /**
-     * Sets the Port
-     *
-     * @param port
-     *      the new value
+     * Gets the Supported Mechanisms List.
+     * 
+     * @return
+     *      the Supported Mechanisms List
      */
-    public void setPort( int port )
+    public List<String> getSupportedMechanisms()
     {
-        this.port = port;
+        return supportedMechanisms;
     }
 
 
     /**
-     * Gets the Principal
+     * Gets the Synchronization Period.
      *
      * @return
-     *      the Principal
+     *      the Synchronization Period
      */
-    public String getPrincipal()
+    public long getSynchronizationPeriod()
     {
-        return principal;
+        return synchronizationPeriod;
     }
 
 
     /**
-     * Sets the Principal
+     * Gets the Allow Anonymous flag.
      *
-     * @param principal
-     *      the new value
+     * @return
+     *      true if the server configuration allows Anonymous Access
      */
-    public void setPrincipal( String principal )
+    public boolean isAllowAnonymousAccess()
     {
-        this.principal = principal;
+        return allowAnonymousAccess;
     }
 
 
     /**
-     * Gets the Synchronization Period.
+     * Gets the Denormalize Operational Attributes flag.
      *
      * @return
-     *      the Synchronization Period
+     *      the Denormalize Operational Attributes flag
      */
-    public long getSynchronizationPeriod()
+    public boolean isDenormalizeOpAttr()
     {
-        return synchronizationPeriod;
+        return denormalizeOpAttr;
     }
 
 
     /**
-     * Sets the Synchonization Period.
+     * Gets the Enable Access Control flag.
      *
-     * @param synchronizationPeriod
-     *      the new value
+     * @return
+     *      true if Access Control is enabled
      */
-    public void setSynchronizationPeriod( long synchronizationPeriod )
+    public boolean isEnableAccessControl()
     {
-        this.synchronizationPeriod = synchronizationPeriod;
+        return enableAccessControl;
     }
 
 
     /**
-     * Gets the Denormalize Operational Attributes flag.
+     * Gets the Enable Change Password flag.
      *
      * @return
-     *      the Denormalize Operational Attributes flag
+     *      true if Change Password is enabled
      */
-    public boolean isDenormalizeOpAttr()
+    public boolean isEnableChangePassword()
     {
-        return denormalizeOpAttr;
+        return enableChangePassword;
     }
 
 
     /**
-     * Sets the Denormalize Operational Attributes flag.
+     * Gets the Enable DNS flag.
      *
-     * @param denormalizeOpAttr
-     *      the new Denormalize Operational Attributes flag
+     * @return
+     *      true if DNS is enabled
      */
-    public void setDenormalizeOpAttr( boolean denormalizeOpAttr )
+    public boolean isEnableDns()
     {
-        this.denormalizeOpAttr = denormalizeOpAttr;
+        return enableDns;
     }
 
 
     /**
-     * Gets the Binary Attributes List.
+     * Gets the Enable Kerberos flag.
      *
      * @return
-     *      the Binary Attributes  List
+     *      true if Kerberos is enabled
      */
-    public List<String> getBinaryAttributes()
+    public boolean isEnableKerberos()
     {
-        return binaryAttributes;
+        return enableKerberos;
     }
 
 
     /**
-     * Sets the Binary Attributes  List.
+     * Gets the Enable LDAPS flag.
      *
-     * @param binaryAttributes
-     *      the new value
+     * @return
+     *      true if LDAPS is enabled
      */
-    public void setBinaryAttributes( List<String> binaryAttributes )
+    public boolean isEnableLdaps()
     {
-        this.binaryAttributes = binaryAttributes;
+        return enableLdaps;
     }
 
 
     /**
-     * Adds a Binary Attribute.
+     * Gets the Enable NTP flag.
      *
-     * @param binaryAttribute
-     *      the Partition to add
      * @return
-     *      true (as per the general contract of the Collection.add method).
+     *      true if NTP is enabled
      */
-    public boolean addBinaryAttribute( String binaryAttribute )
+    public boolean isEnableNtp()
     {
-        return binaryAttributes.add( binaryAttribute );
+        return enableNtp;
     }
 
 
@@ -671,10 +674,456 @@
 
 
     /**
-     * Removes all Binary Attributes.
+     * Removes an Extended Operation.
+     *
+     * @param extendedOperation
+     *      the Extended Operation to remove
+     * @return
+     *      true if this list contained the specified element.
      */
-    public void clearBinaryAttributes()
+    public boolean removeExtendedOperation( ExtendedOperation extendedOperation )
     {
-        binaryAttributes.clear();
+        return extendedOperations.remove( extendedOperation );
+    }
+
+
+    /**
+     * Removes an Supported Mechanism.
+     *
+     * @param supportedMechanism
+     *      the Supported Mechanism to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeExtendedOperation( String supportedMechanism )
+    {
+        return supportedMechanisms.remove( supportedMechanism );
+    }
+
+
+    /**
+     * Removes an Interceptor.
+     *
+     * @param interceptor
+     *      the Interceptor to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeInterceptor( Interceptor interceptor )
+    {
+        return interceptors.remove( interceptor );
+    }
+
+
+    /**
+     * Removes a Partition.
+     *
+     * @param partition
+     *      the partition to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removePartition( Partition partition )
+    {
+        return partitions.remove( partition );
+    }
+
+
+    /**
+     * Removes a SASL Quality Of Protection.
+     *
+     * @param saslQop
+     *      the SASL Quality Of Protection to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeSaslQop( String saslQop )
+    {
+        return saslQops.remove( saslQop );
+    }
+
+
+    /**
+     * Removes a SASL Realm.
+     *
+     * @param saslRealm
+     *      the SASL Realm to remove
+     * @return
+     *      true if this list contained the specified element.
+     */
+    public boolean removeSaslRealm( String saslRealm )
+    {
+        return saslRealms.remove( saslRealm );
+    }
+
+
+    /**
+     * Sets the Allow Anonymous flag.
+     *
+     * @param allowAnonymousAccess
+     *      the new value
+     */
+    public void setAllowAnonymousAccess( boolean allowAnonymousAccess )
+    {
+        this.allowAnonymousAccess = allowAnonymousAccess;
+    }
+
+
+    /**
+     * Sets the Binary Attributes  List.
+     *
+     * @param binaryAttributes
+     *      the new value
+     */
+    public void setBinaryAttributes( List<String> binaryAttributes )
+    {
+        this.binaryAttributes = binaryAttributes;
+    }
+
+
+    /**
+     * Sets the Change Password port.
+     *
+     * @param changePasswordPort
+     *      the Change Password port
+     */
+    public void setChangePasswordPort( int changePasswordPort )
+    {
+        this.changePasswordPort = changePasswordPort;
+    }
+
+
+    /**
+     * Sets the Denormalize Operational Attributes flag.
+     *
+     * @param denormalizeOpAttr
+     *      the new Denormalize Operational Attributes flag
+     */
+    public void setDenormalizeOpAttr( boolean denormalizeOpAttr )
+    {
+        this.denormalizeOpAttr = denormalizeOpAttr;
+    }
+
+
+    /**
+     * Sets the DNS port.
+     *
+     * @param dnsPort
+     *      the DNS port
+     */
+    public void setDnsPort( int dnsPort )
+    {
+        this.dnsPort = dnsPort;
+    }
+
+
+    /**
+     * Sets the Enable Access Control flag.
+     *
+     * @param enableAccessControl
+     *      the new value
+     */
+    public void setEnableAccessControl( boolean enableAccessControl )
+    {
+        this.enableAccessControl = enableAccessControl;
+    }
+
+
+    /**
+     * Sets the Enable Change Password flag.
+     *
+     * @param enableChangePassword
+     *      the new value
+     */
+    public void setEnableChangePassword( boolean enableChangePassword )
+    {
+        this.enableChangePassword = enableChangePassword;
+    }
+
+
+    /**
+     * Sets Enable DNS flag.
+     *
+     * @param enableDns
+     *      the new value
+     */
+    public void setEnableDns( boolean enableDns )
+    {
+        this.enableDns = enableDns;
+    }
+
+
+    /**
+     * Sets the Enable Kerberos flag.
+     *
+     * @param enableKerberos
+     *      the new value
+     */
+    public void setEnableKerberos( boolean enableKerberos )
+    {
+        this.enableKerberos = enableKerberos;
+    }
+
+
+    /**
+     * Sets the Enable LDAPS flag.
+     *
+     * @param enableLdaps
+     *      the new value
+     */
+    public void setEnableLdaps( boolean enableLdaps )
+    {
+        this.enableLdaps = enableLdaps;
+    }
+
+
+    /**
+     * Sets the Enable NTP flag.
+     *
+     * @param enableNtp
+     *      the new value
+     */
+    public void setEnableNtp( boolean enableNtp )
+    {
+        this.enableNtp = enableNtp;
+    }
+
+
+    /**
+     * Sets the Extended Operations List.
+     *
+     * @param extendedOperations
+     *      the new value
+     */
+    public void setExtendedOperations( List<ExtendedOperation> extendedOperations )
+    {
+        this.extendedOperations = extendedOperations;
+    }
+
+
+    /**
+     * Sets the Interceptors List.
+     *
+     * @param interceptors
+     *      the new value
+     */
+    public void setInterceptors( List<Interceptor> interceptors )
+    {
+        this.interceptors = interceptors;
+    }
+
+
+    /**
+     * Sets the Kerberos port.
+     *
+     * @param kerberosPort
+     *      the new value
+     */
+    public void setKerberosPort( int kerberosPort )
+    {
+        this.kerberosPort = kerberosPort;
+    }
+
+
+    /**
+     * Sets The LDAPS port.
+     *
+     * @param ldapsPort
+     */
+    public void setLdapsPort( int ldapsPort )
+    {
+        this.ldapsPort = ldapsPort;
+    }
+
+
+    /**
+     * Sets the Maximum Size Limit.
+     *
+     * @param maxSizeLimit
+     *      the new value
+     */
+    public void setMaxSizeLimit( int maxSizeLimit )
+    {
+        this.maxSizeLimit = maxSizeLimit;
+    }
+
+
+    /**
+     * Sets the Maximum number of Threads
+     *
+     * @param maxThreads
+     *      the new value
+     */
+    public void setMaxThreads( int maxThreads )
+    {
+        this.maxThreads = maxThreads;
+    }
+
+
+    /**
+     * Sets the Maximum Time Limit.
+     *
+     * @param maxTimeLimit
+     *      the new value
+     */
+    public void setMaxTimeLimit( int maxTimeLimit )
+    {
+        this.maxTimeLimit = maxTimeLimit;
+    }
+
+
+    /**
+     * Sets the NTP port.
+     *
+     * @param ntpPort
+     *      the new value
+     */
+    public void setNtpPort( int ntpPort )
+    {
+        this.ntpPort = ntpPort;
+    }
+
+
+    /**
+     * Sets the Partitions List.
+     *
+     * @param partitions
+     *      the new value
+     */
+    public void setPartitions( List<Partition> partitions )
+    {
+        this.partitions = partitions;
+    }
+
+
+    /**
+     * Sets the password.
+     *
+     * @param password
+     *      the new password
+     */
+    public void setPassword( String password )
+    {
+        this.password = password;
+    }
+
+
+    /**
+     * Sets the Path of the file corresponding to the ServerConfiguration.
+     *
+     * @param path
+     *      the new value
+     */
+    public void setPath( String path )
+    {
+        this.path = path;
+    }
+
+
+    /**
+     * Sets the LDAP Port
+     *
+     * @param ldapPort
+     *      the new value
+     */
+    public void setLdapPort( int ldapPort )
+    {
+        this.ldapPort = ldapPort;
+    }
+
+
+    /**
+     * Sets the Principal
+     *
+     * @param principal
+     *      the new value
+     */
+    public void setPrincipal( String principal )
+    {
+        this.principal = principal;
+    }
+
+
+    /**
+     * Sets the SASL Host.
+     *
+     * @param saslHost
+     *      the new value
+     */
+    public void setSaslHost( String saslHost )
+    {
+        this.saslHost = saslHost;
+    }
+
+
+    /**
+     * Sets the SASL Principal.
+     *
+     * @param saslPrincipal
+     *      the new value
+     */
+    public void setSaslPrincipal( String saslPrincipal )
+    {
+        this.saslPrincipal = saslPrincipal;
+    }
+
+
+    /**
+     * Sets the SASL Quality Of Protection List.
+     *
+     * @param saslQops
+     *      the new value
+     */
+    public void setSaslQops( List<String> saslQops )
+    {
+        this.saslQops = saslQops;
+    }
+
+
+    /**
+     * Sets the SASL Realms List.
+     * 
+     * @param saslRealms
+     *      the new value
+     */
+    public void setSaslRealms( List<String> saslRealms )
+    {
+        this.saslRealms = saslRealms;
+    }
+
+
+    /**
+     * Sets the Search Base DN
+     *
+     * @param searchBaseDn
+     *      the new value
+     */
+    public void setSearchBaseDn( String searchBaseDn )
+    {
+        this.searchBaseDn = searchBaseDn;
+    }
+
+
+    /**
+     * Sets the Supported Mechanisms List.
+     *
+     * @param supportedMechanisms
+     *      the new value
+     */
+    public void setSupportedMechanisms( List<String> supportedMechanisms )
+    {
+        this.supportedMechanisms = supportedMechanisms;
+    }
+
+
+    /**
+     * Sets the Synchonization Period.
+     *
+     * @param synchronizationPeriod
+     *      the new value
+     */
+    public void setSynchronizationPeriod( long synchronizationPeriod )
+    {
+        this.synchronizationPeriod = synchronizationPeriod;
     }
 }

Added: directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationContentTypeChecker.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationContentTypeChecker.java?rev=595708&view=auto
==============================================================================
--- directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationContentTypeChecker.java (added)
+++ directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationContentTypeChecker.java Fri Nov 16 07:45:41 2007
@@ -0,0 +1,143 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.model;
+
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Iterator;
+
+import org.dom4j.Attribute;
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+
+/**
+ * This class represents the Server Configuration Content Type Checker. 
+ * It is used to check if a file correspond to a correct Apache DS 'server.xml' configuration.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfigurationContentTypeChecker
+{
+    /**
+     * Checks if the InputStream is valid.
+     *
+     * @param inputStream
+     *      the InputStream
+     * @return
+     *      true if the InputStream is valid, false if not
+     */
+    public static boolean isValid( InputStream inputStream )
+    {
+        try
+        {
+            SAXReader saxReader = new SAXReader();
+
+            return isValid( saxReader.read( inputStream ) );
+        }
+        catch ( Exception e )
+        {
+            return false;
+        }
+    }
+
+
+    /**
+     * Checks if the InputStream is valid.
+     *
+     * @param inputStream
+     *      the InputStream
+     * @return
+     *      true if the InputStream is valid, false if not
+     */
+    public static boolean isValid( Reader reader )
+    {
+        try
+        {
+            SAXReader saxReader = new SAXReader();
+
+            return isValid( saxReader.read( reader ) );
+        }
+        catch ( Exception e )
+        {
+            return false;
+        }
+    }
+
+
+    /**
+     * Checks if the Document is valid.
+     *
+     * @param document
+     *      the Document
+     * @return
+     *      true if the Document is valid, false if not
+     */
+    private static boolean isValid( Document document )
+    {
+        Element configurationBean = getBeanElementById( document, "configuration" );
+        if ( configurationBean == null )
+        {
+            return false;
+        }
+        else
+        {
+            Attribute classAttribute = configurationBean.attribute( "class" );
+            if ( classAttribute == null )
+            {
+                return false;
+            }
+            else
+            {
+                return "org.apache.directory.server.configuration.MutableServerStartupConfiguration"
+                    .equals( classAttribute.getValue() );
+            }
+        }
+    }
+
+
+    /**
+     * Gets the Bean element corresponding to the given ID.
+     *
+     * @param document
+     *      the document to use
+     * @param id
+     *      the id
+     * @return
+     *       the Bean element corresponding to the given ID or null if the bean was not found
+     */
+    private static Element getBeanElementById( Document document, String id )
+    {
+        for ( Iterator<?> i = document.getRootElement().elementIterator( "bean" ); i.hasNext(); )
+        {
+            Element element = ( Element ) i.next();
+            Attribute idAttribute = element.attribute( "id" );
+            if ( idAttribute != null && ( idAttribute.getValue().equals( id ) ) )
+            {
+                return element;
+            }
+        }
+
+        return null;
+    }
+}

Modified: directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParser.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParser.java?rev=595708&r1=595707&r2=595708&view=diff
==============================================================================
--- directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParser.java (original)
+++ directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationParser.java Fri Nov 16 07:45:41 2007
@@ -150,6 +150,24 @@
         // Reading the 'Environment' Bean
         readEnvironmentBean( document, serverConfiguration );
 
+        // Reading the 'ChangePasswordConfiguration' Bean
+        readChangePasswordConfigurationBean( document, serverConfiguration );
+
+        // Reading the 'NTPConfiguration' Bean
+        readNTPConfigurationBean( document, serverConfiguration );
+
+        // Reading the 'DNSConfiguration' Bean
+        readDNSConfigurationBean( document, serverConfiguration );
+
+        // Reading the 'KDCConfiguration' Bean
+        readKDCConfigurationBean( document, serverConfiguration );
+
+        // Reading the 'LDAPSConfiguration' Bean
+        readLDAPSConfigurationBean( document, serverConfiguration );
+
+        // Reading the 'LDAPConfiguration' Bean
+        readLDAPConfigurationBean( document, serverConfiguration );
+
         // Reading the 'Configuration' Bean
         readConfigurationBean( document, serverConfiguration );
     }
@@ -186,8 +204,8 @@
         if ( binaryAttributes != null )
         {
             String[] attributes = binaryAttributes.split( " " );
-            
-            for( String attribute : attributes)
+
+            for ( String attribute : attributes )
             {
                 serverConfiguration.addBinaryAttribute( attribute );
             }
@@ -213,7 +231,7 @@
             Element propsElement = propertyElement.element( "props" );
             if ( propsElement != null )
             {
-                for ( Iterator i = propsElement.elementIterator( "prop" ); i.hasNext(); )
+                for ( Iterator<?> i = propsElement.elementIterator( "prop" ); i.hasNext(); )
                 {
                     Element propElement = ( Element ) i.next();
                     Attribute keyAttribute = propElement.attribute( "key" );
@@ -230,49 +248,294 @@
 
 
     /**
-     * Reads the "Configuration" Bean and store its values in the given ServerConfiguration.
+     * Reads the "ChangePasswordConfiguration" Bean and store its values in the given ServerConfiguration.
      *
      * @param document
      *      the document to use
      * @param serverConfiguration
      *      the Server Configuration
-     * @throws NumberFormatException
      * @throws BooleanFormatException 
-     * @throws ServerConfigurationParserException 
+     * @throws NumberFormatException 
      */
-    private void readConfigurationBean( Document document, ServerConfiguration serverConfiguration )
-        throws NumberFormatException, BooleanFormatException, ServerConfigurationParserException
+    private void readChangePasswordConfigurationBean( Document document, ServerConfiguration serverConfiguration )
+        throws BooleanFormatException, NumberFormatException
     {
-        Element configurationBean = getBeanElementById( document, "configuration" );
+        Element changePasswordConfigurationBean = getBeanElementById( document, "changePasswordConfiguration" );
 
-        // LdapPort
-        String ldapPort = readBeanProperty( "ldapPort", configurationBean );
-        if ( ldapPort != null )
+        // Enabled
+        String enabled = readBeanProperty( "enabled", changePasswordConfigurationBean );
+        if ( enabled != null )
         {
-            serverConfiguration.setPort( Integer.parseInt( ldapPort ) );
+            serverConfiguration.setEnableChangePassword( parseBoolean( enabled ) );
         }
 
-        // SynchPeriodMillis
-        String synchPeriodMillis = readBeanProperty( "synchPeriodMillis", configurationBean );
-        if ( synchPeriodMillis != null )
+        // IP Port
+        String ipPort = readBeanProperty( "ipPort", changePasswordConfigurationBean );
+        if ( ipPort != null )
         {
-            serverConfiguration.setSynchronizationPeriod( Long.parseLong( synchPeriodMillis ) );
+            serverConfiguration.setChangePasswordPort( Integer.parseInt( ipPort ) );
+        }
+    }
+
+
+    /**
+     * Reads the "NTPConfiguration" Bean and store its values in the given ServerConfiguration.
+     *
+     * @param document
+     *      the document to use
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws BooleanFormatException 
+     * @throws NumberFormatException 
+     */
+    private void readNTPConfigurationBean( Document document, ServerConfiguration serverConfiguration )
+        throws BooleanFormatException, NumberFormatException
+    {
+        Element ntpConfigurationBean = getBeanElementById( document, "ntpConfiguration" );
+
+        // Enabled
+        String enabled = readBeanProperty( "enabled", ntpConfigurationBean );
+        if ( enabled != null )
+        {
+            serverConfiguration.setEnableNtp( parseBoolean( enabled ) );
+        }
+
+        // IP Port
+        String ipPort = readBeanProperty( "ipPort", ntpConfigurationBean );
+        if ( ipPort != null )
+        {
+            serverConfiguration.setNtpPort( Integer.parseInt( ipPort ) );
+        }
+    }
+
+
+    /**
+     * Reads the "DNSConfiguration" Bean and store its values in the given ServerConfiguration.
+     *
+     * @param document
+     *      the document to use
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws BooleanFormatException 
+     * @throws NumberFormatException 
+     */
+    private void readDNSConfigurationBean( Document document, ServerConfiguration serverConfiguration )
+        throws BooleanFormatException, NumberFormatException
+    {
+        Element dnsConfigurationBean = getBeanElementById( document, "dnsConfiguration" );
+
+        // Enabled
+        String enabled = readBeanProperty( "enabled", dnsConfigurationBean );
+        if ( enabled != null )
+        {
+            serverConfiguration.setEnableDns( parseBoolean( enabled ) );
+        }
+
+        // IP Port
+        String ipPort = readBeanProperty( "ipPort", dnsConfigurationBean );
+        if ( ipPort != null )
+        {
+            serverConfiguration.setDnsPort( Integer.parseInt( ipPort ) );
+        }
+    }
+
+
+    /**
+     * Reads the "KDCConfiguration" Bean and store its values in the given ServerConfiguration.
+     *
+     * @param document
+     *      the document to use
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws BooleanFormatException 
+     * @throws NumberFormatException 
+     */
+    private void readKDCConfigurationBean( Document document, ServerConfiguration serverConfiguration )
+        throws BooleanFormatException, NumberFormatException
+    {
+        Element kdcConfigurationBean = getBeanElementById( document, "kdcConfiguration" );
+
+        // Enabled
+        String enabled = readBeanProperty( "enabled", kdcConfigurationBean );
+        if ( enabled != null )
+        {
+            serverConfiguration.setEnableKerberos( parseBoolean( enabled ) );
+        }
+
+        // IP Port
+        String ipPort = readBeanProperty( "ipPort", kdcConfigurationBean );
+        if ( ipPort != null )
+        {
+            serverConfiguration.setKerberosPort( Integer.parseInt( ipPort ) );
+        }
+    }
+
+
+    /**
+     * Reads the "LDAPSConfiguration" Bean and store its values in the given ServerConfiguration.
+     *
+     * @param document
+     *      the document to use
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws BooleanFormatException 
+     * @throws NumberFormatException 
+     */
+    private void readLDAPSConfigurationBean( Document document, ServerConfiguration serverConfiguration )
+        throws BooleanFormatException, NumberFormatException
+    {
+        Element ldapsConfiguration = getBeanElementById( document, "ldapsConfiguration" );
+
+        // Enabled
+        String enabled = readBeanProperty( "enabled", ldapsConfiguration );
+        if ( enabled != null )
+        {
+            serverConfiguration.setEnableLdaps( parseBoolean( enabled ) );
+        }
+
+        // IP Port
+        String ipPort = readBeanProperty( "ipPort", ldapsConfiguration );
+        if ( ipPort != null )
+        {
+            serverConfiguration.setLdapsPort( Integer.parseInt( ipPort ) );
+        }
+    }
+
+
+    /**
+     * Reads the "LDAPConfiguration" Bean and store its values in the given ServerConfiguration.
+     *
+     * @param document
+     *      the document to use
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws BooleanFormatException 
+     * @throws NumberFormatException 
+     */
+    private void readLDAPConfigurationBean( Document document, ServerConfiguration serverConfiguration )
+        throws BooleanFormatException, NumberFormatException
+    {
+        Element ldapConfiguration = getBeanElementById( document, "ldapConfiguration" );
+
+        // IP Port
+        String ipPort = readBeanProperty( "ipPort", ldapConfiguration );
+        if ( ipPort != null )
+        {
+            serverConfiguration.setLdapPort( Integer.parseInt( ipPort ) );
+        }
+
+        // AllowAnonymousAccess
+        String allowAnonymousAccess = readBeanProperty( "allowAnonymousAccess", ldapConfiguration );
+        if ( allowAnonymousAccess != null )
+        {
+            serverConfiguration.setAllowAnonymousAccess( parseBoolean( allowAnonymousAccess ) );
+        }
+
+        //  Supported Mechanisms
+        Element supportedMechanismsElement = getBeanPropertyElement( "supportedMechanisms", ldapConfiguration );
+        if ( supportedMechanismsElement != null )
+        {
+            Element listElement = supportedMechanismsElement.element( "list" );
+            if ( listElement != null )
+            {
+                for ( Iterator<?> i = listElement.elementIterator( "value" ); i.hasNext(); )
+                {
+                    serverConfiguration.addSupportedMechanism( ( ( Element ) i.next() ).getTextTrim() );
+                }
+            }
+        }
+
+        // SASL Host
+        String saslHost = readBeanProperty( "saslHost", ldapConfiguration );
+        if ( saslHost != null )
+        {
+            serverConfiguration.setSaslHost( saslHost );
+        }
+
+        // SASL Principal
+        String saslPrincipal = readBeanProperty( "saslPrincipal", ldapConfiguration );
+        if ( saslPrincipal != null )
+        {
+            serverConfiguration.setSaslPrincipal( saslPrincipal );
+        }
+
+        // SASL QOP
+        Element saslQopElement = getBeanPropertyElement( "saslQop", ldapConfiguration );
+        if ( saslQopElement != null )
+        {
+            Element listElement = saslQopElement.element( "list" );
+            if ( listElement != null )
+            {
+                for ( Iterator<?> i = listElement.elementIterator( "value" ); i.hasNext(); )
+                {
+                    serverConfiguration.addSaslQop( ( ( Element ) i.next() ).getTextTrim() );
+                }
+            }
+        }
+
+        // SASL Realms
+        Element saslRealmsElement = getBeanPropertyElement( "saslRealms", ldapConfiguration );
+        if ( saslQopElement != null )
+        {
+            Element listElement = saslRealmsElement.element( "list" );
+            if ( listElement != null )
+            {
+                for ( Iterator<?> i = listElement.elementIterator( "value" ); i.hasNext(); )
+                {
+                    serverConfiguration.addSaslRealm( ( ( Element ) i.next() ).getTextTrim() );
+                }
+            }
+        }
+
+        // Search Base DN
+        String searchBaseDn = readBeanProperty( "searchBaseDn", ldapConfiguration );
+        if ( searchBaseDn != null )
+        {
+            serverConfiguration.setSearchBaseDn( searchBaseDn );
         }
 
         // MaxTimeLimit
-        String maxTimeLimit = readBeanProperty( "maxTimeLimit", configurationBean );
+        String maxTimeLimit = readBeanProperty( "maxTimeLimit", ldapConfiguration );
         if ( maxTimeLimit != null )
         {
             serverConfiguration.setMaxTimeLimit( Integer.parseInt( maxTimeLimit ) );
         }
 
         // MaxSizeLimit
-        String maxSizeLimit = readBeanProperty( "maxSizeLimit", configurationBean );
+        String maxSizeLimit = readBeanProperty( "maxSizeLimit", ldapConfiguration );
         if ( maxSizeLimit != null )
         {
             serverConfiguration.setMaxSizeLimit( Integer.parseInt( maxSizeLimit ) );
         }
 
+        // ExtendedOperations
+        readExtendedOperations( ldapConfiguration, serverConfiguration );
+    }
+
+
+    /**
+     * Reads the "Configuration" Bean and store its values in the given ServerConfiguration.
+     *
+     * @param document
+     *      the document to use
+     * @param serverConfiguration
+     *      the Server Configuration
+     * @throws NumberFormatException
+     * @throws BooleanFormatException 
+     * @throws ServerConfigurationParserException 
+     */
+    private void readConfigurationBean( Document document, ServerConfiguration serverConfiguration )
+        throws NumberFormatException, BooleanFormatException, ServerConfigurationParserException
+    {
+        Element configurationBean = getBeanElementById( document, "configuration" );
+
+        // SynchPeriodMillis
+        String synchPeriodMillis = readBeanProperty( "synchPeriodMillis", configurationBean );
+        if ( synchPeriodMillis != null )
+        {
+            serverConfiguration.setSynchronizationPeriod( Long.parseLong( synchPeriodMillis ) );
+        }
+
         // MaxThreads
         String maxThreads = readBeanProperty( "maxThreads", configurationBean );
         if ( maxThreads != null )
@@ -294,28 +557,7 @@
             serverConfiguration.setEnableAccessControl( parseBoolean( accessControlEnabled ) );
         }
 
-        // EnableNtp
-        String enableNtp = readBeanProperty( "enableNtp", configurationBean );
-        if ( enableNtp != null )
-        {
-            serverConfiguration.setEnableNTP( parseBoolean( enableNtp ) );
-        }
-
-        // EnableKerberos
-        String enableKerberos = readBeanProperty( "enableKerberos", configurationBean );
-        if ( enableKerberos != null )
-        {
-            serverConfiguration.setEnableKerberos( parseBoolean( enableKerberos ) );
-        }
-
-        // EnableChangePassword
-        String enableChangePassword = readBeanProperty( "enableChangePassword", configurationBean );
-        if ( enableChangePassword != null )
-        {
-            serverConfiguration.setEnableChangePassword( parseBoolean( enableChangePassword ) );
-        }
-
-        // EnableChangePassword
+        // EnableDenormalizeOpAttrs
         String denormalizeOpAttrsEnabled = readBeanProperty( "denormalizeOpAttrsEnabled", configurationBean );
         if ( denormalizeOpAttrsEnabled != null )
         {
@@ -343,9 +585,6 @@
 
         // Interceptors
         readInterceptors( configurationBean, serverConfiguration );
-
-        // ExtendedOperations
-        readExtendedOperations( configurationBean, serverConfiguration );
     }
 
 
@@ -368,7 +607,7 @@
             Element setElement = propertyElement.element( "set" );
             if ( setElement != null )
             {
-                for ( Iterator i = setElement.elementIterator( "ref" ); i.hasNext(); )
+                for ( Iterator<?> i = setElement.elementIterator( "ref" ); i.hasNext(); )
                 {
                     Element element = ( Element ) i.next();
                     Attribute beanAttribute = element.attribute( "bean" );
@@ -409,11 +648,11 @@
             Partition partition = new Partition();
             partition.setSystemPartition( isSystemPartition );
 
-            // Name
-            String name = readBeanProperty( "name", partitionBean );
-            if ( name != null )
+            // ID
+            String partitionId = readBeanProperty( "id", partitionBean );
+            if ( partitionId != null )
             {
-                partition.setName( name );
+                partition.setId( partitionId );
             }
 
             // CacheSize
@@ -475,7 +714,7 @@
             Element setElement = propertyElement.element( "set" );
             if ( setElement != null )
             {
-                for ( Iterator i = setElement.elementIterator( "bean" ); i.hasNext(); )
+                for ( Iterator<?> i = setElement.elementIterator( "bean" ); i.hasNext(); )
                 {
                     Element beanElement = ( Element ) i.next();
                     IndexedAttribute ia = readIndexedAttribute( beanElement );
@@ -621,7 +860,7 @@
             Element listElement = propertyElement.element( "list" );
             if ( listElement != null )
             {
-                for ( Iterator i = listElement.elementIterator( "bean" ); i.hasNext(); )
+                for ( Iterator<?> i = listElement.elementIterator( "bean" ); i.hasNext(); )
                 {
                     Interceptor interceptor = readInterceptor( ( Element ) i.next() );
                     if ( interceptor != null )
@@ -650,25 +889,13 @@
                 "org.apache.directory.server.core.configuration.MutableInterceptorConfiguration" ) )
         {
             String name = readBeanProperty( "name", element );
+            String interceptorClassName = readBeanProperty( "interceptorClassName", element );
 
-            for ( Iterator i = element.elementIterator( "property" ); i.hasNext(); )
+            if ( ( name != null ) && ( interceptorClassName != null ) )
             {
-                Element propertyElement = ( Element ) i.next();
-                Attribute nameAttribute = propertyElement.attribute( "name" );
-                if ( nameAttribute != null && ( nameAttribute.getValue().equals( "interceptor" ) ) )
-                {
-                    Element beanElement = propertyElement.element( "bean" );
-                    if ( beanElement != null )
-                    {
-                        Attribute beanClassAttribute = beanElement.attribute( "class" );
-                        if ( beanClassAttribute != null )
-                        {
-                            Interceptor interceptor = new Interceptor( name );
-                            interceptor.setClassType( beanClassAttribute.getValue() );
-                            return interceptor;
-                        }
-                    }
-                }
+                Interceptor interceptor = new Interceptor( name );
+                interceptor.setClassType( interceptorClassName );
+                return interceptor;
             }
         }
 
@@ -692,7 +919,7 @@
             Element listElement = propertyElement.element( "list" );
             if ( listElement != null )
             {
-                for ( Iterator i = listElement.elementIterator( "bean" ); i.hasNext(); )
+                for ( Iterator<?> i = listElement.elementIterator( "bean" ); i.hasNext(); )
                 {
                     ExtendedOperation extendedOperation = readExtendedOperation( ( Element ) i.next() );
                     if ( extendedOperation != null )
@@ -737,7 +964,7 @@
      */
     private Element getBeanElementById( Document document, String id )
     {
-        for ( Iterator i = document.getRootElement().elementIterator( "bean" ); i.hasNext(); )
+        for ( Iterator<?> i = document.getRootElement().elementIterator( "bean" ); i.hasNext(); )
         {
             Element element = ( Element ) i.next();
             Attribute idAttribute = element.attribute( "id" );
@@ -795,7 +1022,7 @@
      */
     private Element getBeanPropertyElement( String property, Element element )
     {
-        for ( Iterator i = element.elementIterator( "property" ); i.hasNext(); )
+        for ( Iterator<?> i = element.elementIterator( "property" ); i.hasNext(); )
         {
             Element propertyElement = ( Element ) i.next();
             Attribute nameAttribute = propertyElement.attribute( "name" );

Modified: directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriter.java?rev=595708&r1=595707&r2=595708&view=diff
==============================================================================
--- directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriter.java (original)
+++ directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationWriter.java Fri Nov 16 07:45:41 2007
@@ -68,6 +68,24 @@
             // Environment Bean
             createEnvironmentBean( root, serverConfiguration );
 
+            // Change Password Configuration Bean
+            createChangePasswordConfigurationBean( root, serverConfiguration );
+
+            // NTP Configuration Bean
+            createNtpConfigurationBean( root, serverConfiguration );
+
+            // DNS Configuration Bean
+            createDnsConfigurationBean( root, serverConfiguration );
+
+            // KDC Configuration Bean
+            createKdcConfigurationBean( root, serverConfiguration );
+
+            // LDAPS Configuration Bean
+            createLdapsConfigurationBean( root, serverConfiguration );
+
+            // LDAP Configuration Bean
+            createLdapConfigurationBean( root, serverConfiguration );
+
             // Configuration Bean
             createConfigurationBean( root, serverConfiguration );
 
@@ -148,6 +166,218 @@
 
 
     /**
+     * Creates the Change Password Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createChangePasswordConfigurationBean( Element root, ServerConfiguration serverConfiguration )
+    {
+        createProtocolConfigurationBean( root, "changePasswordConfiguration",
+            "org.apache.directory.server.changepw.ChangePasswordConfiguration", serverConfiguration
+                .isEnableChangePassword(), serverConfiguration.getChangePasswordPort() );
+    }
+
+
+    /**
+     * Creates the NTP Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createNtpConfigurationBean( Element root, ServerConfiguration serverConfiguration )
+    {
+        createProtocolConfigurationBean( root, "ntpConfiguration", "org.apache.directory.server.ntp.NtpConfiguration",
+            serverConfiguration.isEnableNtp(), serverConfiguration.getNtpPort() );
+    }
+
+
+    /**
+     * Creates the DNS Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createDnsConfigurationBean( Element root, ServerConfiguration serverConfiguration )
+    {
+        createProtocolConfigurationBean( root, "dnsConfiguration", "org.apache.directory.server.dns.DnsConfiguration",
+            serverConfiguration.isEnableDns(), serverConfiguration.getDnsPort() );
+    }
+
+
+    /**
+     * Creates the Kerberos Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createKdcConfigurationBean( Element root, ServerConfiguration serverConfiguration )
+    {
+        createProtocolConfigurationBean( root, "kdcConfiguration", "org.apache.directory.server.kdc.KdcConfiguration",
+            serverConfiguration.isEnableKerberos(), serverConfiguration.getKerberosPort() );
+    }
+
+
+    /**
+     * Creates the LDAPS Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createLdapsConfigurationBean( Element root, ServerConfiguration serverConfiguration )
+    {
+        Element ldapsConfiguration = createProtocolConfigurationBean( root, "ldapsConfiguration",
+            "org.apache.directory.server.ldap.LdapConfiguration", serverConfiguration.isEnableLdaps(),
+            serverConfiguration.getLdapsPort() );
+
+        // Enable LDAPS
+        Element enableLdapsPropertyElement = ldapsConfiguration.addElement( "property" );
+        enableLdapsPropertyElement.addAttribute( "name", "enableLdaps" );
+        enableLdapsPropertyElement.addAttribute( "value", "" + true );
+    }
+
+
+    /**
+     * Creates the LDAP Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param serverConfiguration
+     *      the Server Configuration
+     */
+    private void createLdapConfigurationBean( Element root, ServerConfiguration serverConfiguration )
+    {
+        Element ldapConfiguration = createProtocolConfigurationBean( root, "ldapConfiguration",
+            "org.apache.directory.server.ldap.LdapConfiguration", true, serverConfiguration.getLdapPort() );
+
+        // AllowAnonymousAccess
+        Element propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "allowAnonymousAccess" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.isAllowAnonymousAccess() );
+
+        // Supported Mechanisms
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "supportedMechanisms" );
+        if ( serverConfiguration.getSupportedMechanisms().size() > 1 )
+        {
+            Element listElement = propertyElement.addElement( "list" );
+            for ( String supportedMechanism : serverConfiguration.getSupportedMechanisms() )
+            {
+                listElement.addElement( "value" ).setText( supportedMechanism );
+            }
+        }
+
+        // SASL Host
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "saslHost" );
+        propertyElement.addAttribute( "value", serverConfiguration.getSaslHost() );
+
+        // SASL Principal
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "saslPrincipal" );
+        propertyElement.addAttribute( "value", serverConfiguration.getSaslPrincipal() );
+
+        // SASL QOP
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "saslQop" );
+        if ( serverConfiguration.getSaslQops().size() > 1 )
+        {
+            Element listElement = propertyElement.addElement( "list" );
+            for ( String saslQop : serverConfiguration.getSaslQops() )
+            {
+                listElement.addElement( "value" ).setText( saslQop );
+            }
+        }
+
+        // SASL Realms
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "saslRealms" );
+        if ( serverConfiguration.getSaslRealms().size() > 1 )
+        {
+            Element listElement = propertyElement.addElement( "list" );
+            for ( String saslRealm : serverConfiguration.getSaslRealms() )
+            {
+                listElement.addElement( "value" ).setText( saslRealm );
+            }
+        }
+
+        // Search Base DN
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "searchBaseDN" );
+        propertyElement.addAttribute( "value", serverConfiguration.getSearchBaseDn() );
+
+        // MaxTimeLimit
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "maxTimeLimit" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxTimeLimit() );
+
+        // MaxSizeLimit
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "maxSizeLimit" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxSizeLimit() );
+
+        // ExtendedOperationHandlers
+        propertyElement = ldapConfiguration.addElement( "property" );
+        propertyElement.addAttribute( "name", "extendedOperationHandlers" );
+        if ( serverConfiguration.getExtendedOperations().size() > 1 )
+        {
+            Element listElement = propertyElement.addElement( "list" );
+            for ( ExtendedOperation extendedOperation : serverConfiguration.getExtendedOperations() )
+            {
+                listElement.addElement( "bean" ).addAttribute( "class", extendedOperation.getClassType() );
+            }
+        }
+    }
+
+
+    /**
+     * Creates a Protocol Configuration Bean.
+     *
+     * @param root
+     *      the root Element
+     * @param id
+     *      the id of the Bean
+     * @param className
+     *      the class name of the Bean
+     * @param enabled
+     *      the enabled flag
+     * @param ipPort
+     *      the port
+     * @return
+     *      the corresponding Protocol Configuration Bean
+     */
+    private Element createProtocolConfigurationBean( Element root, String id, String className, boolean enabled,
+        int ipPort )
+    {
+        Element protocolConfigurationBean = root.addElement( "bean" );
+        protocolConfigurationBean.addAttribute( "id", id );
+        protocolConfigurationBean.addAttribute( "class", className );
+
+        // Enabled
+        Element enabledPropertyElement = protocolConfigurationBean.addElement( "property" );
+        enabledPropertyElement.addAttribute( "name", "enabled" );
+        enabledPropertyElement.addAttribute( "value", "" + enabled );
+
+        // IP Port
+        Element ipPortPropertyElement = protocolConfigurationBean.addElement( "property" );
+        ipPortPropertyElement.addAttribute( "name", "ipPort" );
+        ipPortPropertyElement.addAttribute( "value", "" + ipPort );
+
+        return protocolConfigurationBean;
+    }
+
+
+    /**
      * Creates the Configuration Bean.
      *
      * @param root
@@ -165,23 +395,19 @@
         // Working directory
         Element propertyElement = configurationBean.addElement( "property" );
         propertyElement.addAttribute( "name", "workingDirectory" );
-        propertyElement.addAttribute( "value", "example.com" ); // Ask Alex about this value.
+        propertyElement.addAttribute( "value", "example.com" ); // TODO Ask Alex about this value.
+
+        // LDIF Directory
+        // TODO Ask Alex about this value.
+
+        // LDIF Filters
+        // TODO Ask Alex about this value.
 
         // SynchPeriodMillis
         propertyElement = configurationBean.addElement( "property" );
         propertyElement.addAttribute( "name", "synchPeriodMillis" );
         propertyElement.addAttribute( "value", "" + serverConfiguration.getSynchronizationPeriod() );
 
-        // MaxTimeLimit
-        propertyElement = configurationBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "maxTimeLimit" );
-        propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxTimeLimit() );
-
-        // MaxSizeLimit
-        propertyElement = configurationBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "maxSizeLimit" );
-        propertyElement.addAttribute( "value", "" + serverConfiguration.getMaxSizeLimit() );
-
         // MaxThreads
         propertyElement = configurationBean.addElement( "property" );
         propertyElement.addAttribute( "name", "maxThreads" );
@@ -197,30 +423,40 @@
         propertyElement.addAttribute( "name", "accessControlEnabled" );
         propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableAccessControl() );
 
-        // Enable NTP
+        // DenormalizeOpAttrsEnabled
         propertyElement = configurationBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "enableNtp" );
-        propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableNTP() );
+        propertyElement.addAttribute( "name", "denormalizeOpAttrsEnabled" );
+        propertyElement.addAttribute( "value", "" + serverConfiguration.isDenormalizeOpAttr() );
 
-        // EnableKerberos
+        // NTP Configuration Ref
         propertyElement = configurationBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "enableKerberos" );
-        propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableKerberos() );
+        propertyElement.addAttribute( "name", "ntpConfiguration" );
+        propertyElement.addAttribute( "ref", "ntpConfiguration" );
 
-        // EnableChangePassword
+        // DNS Configuration Ref
         propertyElement = configurationBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "enableChangePassword" );
-        propertyElement.addAttribute( "value", "" + serverConfiguration.isEnableChangePassword() );
+        propertyElement.addAttribute( "name", "dnsConfiguration" );
+        propertyElement.addAttribute( "ref", "dnsConfiguration" );
 
-        // DenormalizeOpAttrsEnabled
+        // Change Password Configuration Ref
         propertyElement = configurationBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "denormalizeOpAttrsEnabled" );
-        propertyElement.addAttribute( "value", "" + serverConfiguration.isDenormalizeOpAttr() );
+        propertyElement.addAttribute( "name", "changePasswordConfiguration" );
+        propertyElement.addAttribute( "ref", "changePasswordConfiguration" );
+
+        // KDC Configuration Ref
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "kdcConfiguration" );
+        propertyElement.addAttribute( "ref", "kdcConfiguration" );
 
-        // LdapPort
+        // LDAPS Configuration Ref
         propertyElement = configurationBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "ldapPort" );
-        propertyElement.addAttribute( "value", "" + serverConfiguration.getPort() );
+        propertyElement.addAttribute( "name", "ldapsConfiguration" );
+        propertyElement.addAttribute( "ref", "ldapsConfiguration" );
+
+        // LDAP Configuration Ref
+        propertyElement = configurationBean.addElement( "property" );
+        propertyElement.addAttribute( "name", "ldapConfiguration" );
+        propertyElement.addAttribute( "ref", "ldapConfiguration" );
 
         // SystemPartitionConfiguration
         propertyElement = configurationBean.addElement( "property" );
@@ -244,18 +480,6 @@
             }
         }
 
-        // ExtendedOperationHandlers
-        propertyElement = configurationBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "extendedOperationHandlers" );
-        if ( serverConfiguration.getExtendedOperations().size() > 1 )
-        {
-            Element listElement = propertyElement.addElement( "list" );
-            for ( ExtendedOperation extendedOperation : serverConfiguration.getExtendedOperations() )
-            {
-                listElement.addElement( "bean" ).addAttribute( "class", extendedOperation.getClassType() );
-            }
-        }
-
         // InterceptorConfigurations
         propertyElement = configurationBean.addElement( "property" );
         propertyElement.addAttribute( "name", "interceptorConfigurations" );
@@ -273,9 +497,9 @@
                 interceptorPropertyElement.addAttribute( "value", interceptor.getName() );
 
                 interceptorPropertyElement = interceptorBeanElement.addElement( "property" );
-                interceptorPropertyElement.addAttribute( "name", "interceptor" );
-                interceptorPropertyElement.addElement( "bean" ).addAttribute( "class",
-                    ( interceptor.getClassType() == null ? "" : interceptor.getClassType() ) );
+                interceptorPropertyElement.addAttribute( "name", "interceptorClassName" );
+                interceptorPropertyElement.addAttribute( "value", ( interceptor.getClassType() == null ? ""
+                    : interceptor.getClassType() ) );
             }
         }
 
@@ -348,10 +572,10 @@
         partitionBean.addAttribute( "class",
             "org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration" );
 
-        // Name
+        // ID
         Element propertyElement = partitionBean.addElement( "property" );
-        propertyElement.addAttribute( "name", "name" );
-        propertyElement.addAttribute( "value", partition.getName() );
+        propertyElement.addAttribute( "name", "id" );
+        propertyElement.addAttribute( "value", partition.getId() );
 
         // CacheSize
         propertyElement = partitionBean.addElement( "property" );

Added: directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java?rev=595708&view=auto
==============================================================================
--- directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java (added)
+++ directory/studio/trunk/studio-apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/wizards/NewApacheDSConfigurationFileWizard.java Fri Nov 16 07:45:41 2007
@@ -0,0 +1,91 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.apacheds.configuration.wizards;
+
+
+import org.apache.directory.studio.apacheds.configuration.Activator;
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor;
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditorInput;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParser;
+import org.apache.directory.studio.apacheds.configuration.model.ServerConfigurationParserException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the New ApacheDS Configuration File Wizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewApacheDSConfigurationFileWizard extends Wizard implements INewWizard
+{
+    /** The window */
+    private IWorkbenchWindow window;
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    public boolean performFinish()
+    {
+        try
+        {
+            ServerConfigurationParser parser = new ServerConfigurationParser();
+            ServerConfiguration serverConfiguration = parser.parse( Activator.class
+                .getResourceAsStream( "default-server.xml" ) );
+
+            IWorkbenchPage page = window.getActivePage();
+            page.openEditor( new ServerConfigurationEditorInput( serverConfiguration ), ServerConfigurationEditor.ID );
+        }
+        catch ( PartInitException e )
+        {
+            return false;
+        }
+        catch ( ServerConfigurationParserException e )
+        {
+            MessageBox messageBox = new MessageBox( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+                SWT.OK | SWT.ICON_ERROR );
+            messageBox.setText( "Error!" );
+            messageBox.setMessage( "An error occurred when reading the file." + "\n" + e.getMessage() );
+            messageBox.open();
+            return false;
+        }
+        return true;
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+     */
+    public void init( IWorkbench workbench, IStructuredSelection selection )
+    {
+        window = workbench.getActiveWorkbenchWindow();
+    }
+}



Mime
View raw message