You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2007/04/10 19:17:58 UTC
svn commit: r527206 - in
/directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration:
editor/ model/
Author: pamarcelot
Date: Tue Apr 10 10:17:57 2007
New Revision: 527206
URL: http://svn.apache.org/viewvc?view=rev&rev=527206
Log:
Added ServerConfiguration class in the model. Code Cleaning.
Added:
directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/model/ServerConfiguration.java
Modified:
directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java
directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java
directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java
Modified: directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java?view=diff&rev=527206&r1=527205&r2=527206
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/ExtendedOperationsMasterDetailsBlock.java Tue Apr 10 10:17:57 2007
@@ -55,6 +55,11 @@
{
/** The associated page */
private FormPage page;
+
+ // UI Fields
+ private TableViewer viewer;
+ private Button addButton;
+ private Button deleteButton;
/**
@@ -98,7 +103,7 @@
table.setLayoutData( gd );
final SectionPart spart = new SectionPart( section );
managedForm.addPart( spart );
- TableViewer viewer = new TableViewer( table );
+ viewer = new TableViewer( table );
viewer.addSelectionChangedListener( new ISelectionChangedListener()
{
public void selectionChanged( SelectionChangedEvent event )
@@ -116,11 +121,11 @@
"org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler" ) } );
// Creating the button(s)
- Button addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
+ addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
gd = new GridData( GridData.VERTICAL_ALIGN_BEGINNING );
addButton.setLayoutData( gd );
- Button deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
+ deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
deleteButton.setLayoutData( gd );
}
Modified: directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java?view=diff&rev=527206&r1=527205&r2=527206
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/InterceptorsMasterDetailsBlock.java Tue Apr 10 10:17:57 2007
@@ -55,6 +55,11 @@
{
/** The associated page */
private FormPage page;
+
+ // UI Fields
+ private TableViewer viewer;
+ private Button addButton;
+ private Button deleteButton;
/**
@@ -100,7 +105,7 @@
table.setLayoutData( gd );
final SectionPart spart = new SectionPart( section );
managedForm.addPart( spart );
- TableViewer viewer = new TableViewer( table );
+ viewer = new TableViewer( table );
viewer.addSelectionChangedListener( new ISelectionChangedListener()
{
public void selectionChanged( SelectionChangedEvent event )
@@ -115,11 +120,11 @@
new Interceptor( "ReferalService" ), new Interceptor( "AuthorizationService" ) } );
// Creating the button(s)
- Button addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
+ addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
gd = new GridData( GridData.VERTICAL_ALIGN_BEGINNING );
addButton.setLayoutData( gd );
- Button deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
+ deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
deleteButton.setLayoutData( gd );
}
Modified: directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java?view=diff&rev=527206&r1=527205&r2=527206
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/editor/PartitionsMasterDetailsBlock.java Tue Apr 10 10:17:57 2007
@@ -56,6 +56,11 @@
/** The associated page */
private FormPage page;
+ // UI Fields
+ private TableViewer viewer;
+ private Button addButton;
+ private Button deleteButton;
+
/**
* Creates a new instance of PartitionsMasterDetailsBlock.
@@ -99,7 +104,7 @@
table.setLayoutData( gd );
final SectionPart spart = new SectionPart( section );
managedForm.addPart( spart );
- TableViewer viewer = new TableViewer( table );
+ viewer = new TableViewer( table );
viewer.addSelectionChangedListener( new ISelectionChangedListener()
{
public void selectionChanged( SelectionChangedEvent event )
@@ -113,13 +118,12 @@
{ new Partition( "System Partition" ), new Partition( "Example Partition" ) } );
// Creating the button(s)
- Button addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
+ addButton = toolkit.createButton( client, "Add...", SWT.PUSH ); //$NON-NLS-1$
gd = new GridData( GridData.VERTICAL_ALIGN_BEGINNING );
addButton.setLayoutData( gd );
- Button deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
+ deleteButton = toolkit.createButton( client, "Delete", SWT.PUSH );
deleteButton.setLayoutData( gd );
-
}
Added: directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/model/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/model/ServerConfiguration.java?view=auto&rev=527206
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/model/ServerConfiguration.java (added)
+++ directory/ldapstudio/trunk/ldapstudio-apacheds-configuration/src/main/java/org/apache/directory/ldapstudio/apacheds/configuration/model/ServerConfiguration.java Tue Apr 10 10:17:57 2007
@@ -0,0 +1,534 @@
+/*
+ * 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.ldapstudio.apacheds.configuration.model;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * This class represents a Server Configuration.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ServerConfiguration
+{
+ /** The path of the Server Configuration file */
+ private String path;
+
+ /** The port */
+ private int port;
+
+ /** The principal */
+ private String principal;
+
+ /** The flag for Allow Anonymous Access */
+ private boolean allowAnonymousAccess;
+
+ /** The Max Time Limit */
+ private int maxTimeLimit;
+
+ /** the Max Size Limit */
+ private int maxSizeLimit;
+
+ /** The Synchonization Period */
+ private int synchronizationPeriod;
+
+ /** The Maximum number of Threads */
+ private int maxThreads;
+
+ /** The flag for Enable Access Control */
+ private boolean enableAccessControl;
+
+ /** The flag for Enable Kerberos */
+ private boolean enableKerberos;
+
+ /** The flag for Enable NTP */
+ private boolean enableNTP;
+
+ /** The flag for Enable Change Password */
+ private boolean enableChangePassword;
+
+ /** The Partitions */
+ private List<Partition> partitions;
+
+ /** The Interceptors */
+ private List<Interceptor> interceptors;
+
+ /** The Extended Operations */
+ private List<ExtendedOperation> extendedOperations;
+
+
+ /**
+ * Creates a new instance of ServerConfiguration.
+ */
+ public ServerConfiguration()
+ {
+ partitions = new ArrayList<Partition>();
+ interceptors = new ArrayList<Interceptor>();
+ extendedOperations = new ArrayList<ExtendedOperation>();
+ }
+
+
+ /**
+ * Gets the Allow Anonymous flag.
+ *
+ * @return
+ * true if the server configuration allows Anonymous Access
+ */
+ public boolean isAllowAnonymousAccess()
+ {
+ return allowAnonymousAccess;
+ }
+
+
+ /**
+ * Sets the Allow Anonymous flag.
+ *
+ * @param allowAnonymousAccess
+ * the new value
+ */
+ public void setAllowAnonymousAccess( boolean allowAnonymousAccess )
+ {
+ this.allowAnonymousAccess = allowAnonymousAccess;
+ }
+
+
+ /**
+ * Gets the Enable Access Control flag.
+ *
+ * @return
+ * true if Access Control is enabled
+ */
+ public boolean isEnableAccessControl()
+ {
+ return enableAccessControl;
+ }
+
+
+ /**
+ * Sets the Enable Access Control flag.
+ *
+ * @param enableAccessControl
+ * the new value
+ */
+ public void setEnableAccessControl( boolean enableAccessControl )
+ {
+ this.enableAccessControl = enableAccessControl;
+ }
+
+
+ /**
+ * Gets the Enable Change Password flag.
+ *
+ * @return
+ * true if Change Password is enabled
+ */
+ public boolean isEnableChangePassword()
+ {
+ return enableChangePassword;
+ }
+
+
+ /**
+ * Sets the Enable Change Password flag.
+ *
+ * @param enableChangePassword
+ * the new value
+ */
+ public void setEnableChangePassword( boolean enableChangePassword )
+ {
+ this.enableChangePassword = enableChangePassword;
+ }
+
+
+ /**
+ * Gets the Enable Kerberos flag.
+ *
+ * @return
+ * true if Kerberos is enabled
+ */
+ public boolean isEnableKerberos()
+ {
+ return enableKerberos;
+ }
+
+
+ /**
+ * Sets the Enable Kerberos flag.
+ *
+ * @param enableKerberos
+ * the new value
+ */
+ public void setEnableKerberos( boolean enableKerberos )
+ {
+ this.enableKerberos = enableKerberos;
+ }
+
+
+ /**
+ * Gets the Enable NTP flag.
+ *
+ * @return
+ * true if NTP is enabled
+ */
+ public boolean isEnableNTP()
+ {
+ return enableNTP;
+ }
+
+
+ /**
+ * Sets the Enable NTP flag.
+ *
+ * @param enableNTP
+ * the new value
+ */
+ public void setEnableNTP( boolean enableNTP )
+ {
+ this.enableNTP = enableNTP;
+ }
+
+
+ /**
+ * Gets the Extended Operations List.
+ *
+ * @return
+ * the Extended Operations List
+ */
+ public List<ExtendedOperation> getExtendedOperations()
+ {
+ return extendedOperations;
+ }
+
+
+ /**
+ * Sets the Extended Operations List.
+ *
+ * @param extendedOperations
+ * the new value
+ */
+ public void setExtendedOperations( List<ExtendedOperation> extendedOperations )
+ {
+ this.extendedOperations = extendedOperations;
+ }
+
+
+ /**
+ * Adds ab Extended Operation.
+ *
+ * @param extendedOperation
+ * the Extended Operation to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addExtendedOperation( ExtendedOperation extendedOperation )
+ {
+ return extendedOperations.add( extendedOperation );
+ }
+
+
+ /**
+ * Removes an Extended Operation.
+ *
+ * @param extendedOperation
+ * the Extended Operation to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeExtendedOperation( ExtendedOperation extendedOperation )
+ {
+ return extendedOperations.remove( extendedOperation );
+ }
+
+
+ /**
+ * Gets the Interceptors List.
+ *
+ * @return
+ * the Interceptors List
+ */
+ public List<Interceptor> getInterceptors()
+ {
+ return interceptors;
+ }
+
+
+ /**
+ * Sets the Interceptors List.
+ *
+ * @param interceptors
+ * the new value
+ */
+ public void setInterceptors( List<Interceptor> interceptors )
+ {
+ this.interceptors = interceptors;
+ }
+
+
+ /**
+ * Adds an Interceptor.
+ *
+ * @param interceptor
+ * the Interceptor to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addInterceptor( Interceptor interceptor )
+ {
+ return interceptors.add( interceptor );
+ }
+
+
+ /**
+ * 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 );
+ }
+
+
+ /**
+ * Gets the Maximum Size Limit.
+ *
+ * @return
+ * the Maximum Size Limit
+ */
+ public int getMaxSizeLimit()
+ {
+ return maxSizeLimit;
+ }
+
+
+ /**
+ * 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
+ * the Maximum number of Threads
+ */
+ public int getMaxThreads()
+ {
+ return maxThreads;
+ }
+
+
+ /**
+ * 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
+ * the Maximum Time Limit
+ */
+ public int getMaxTimeLimit()
+ {
+ return maxTimeLimit;
+ }
+
+
+ /**
+ * Sets the Maximum Time Limit.
+ *
+ * @param maxTimeLimit
+ * the new value
+ */
+ public void setMaxTimeLimit( int maxTimeLimit )
+ {
+ this.maxTimeLimit = maxTimeLimit;
+ }
+
+
+ /**
+ * Gets the Partitions List.
+ *
+ * @return
+ * the Partitions List
+ */
+ public List<Partition> getPartitions()
+ {
+ return partitions;
+ }
+
+
+ /**
+ * Sets the Partitions List.
+ *
+ * @param partitions
+ * the new value
+ */
+ public void setPartitions( List<Partition> partitions )
+ {
+ this.partitions = partitions;
+ }
+
+
+ /**
+ * Adds a Partition.
+ *
+ * @param partition
+ * the Partition to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addPartition( Partition partition )
+ {
+ return partitions.add( partition );
+ }
+
+
+ /**
+ * 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 );
+ }
+
+
+ /**
+ * Gets the Path of the file corresponding to the ServerConfiguration.
+ *
+ * @return
+ * the Path of the corresponding file
+ */
+ public String getPath()
+ {
+ return path;
+ }
+
+
+ /**
+ * Sets the Path of the file corresponding to the ServerConfiguration.
+ *
+ * @param path
+ * the new value
+ */
+ public void setPath( String path )
+ {
+ this.path = path;
+ }
+
+
+ /**
+ * Gets the Port.
+ *
+ * @return
+ * the Port
+ */
+ public int getPort()
+ {
+ return port;
+ }
+
+
+ /**
+ * Sets the Port
+ *
+ * @param port
+ * the new value
+ */
+ public void setPort( int port )
+ {
+ this.port = port;
+ }
+
+
+ /**
+ * Gets the Principal
+ *
+ * @return
+ * the Principal
+ */
+ public String getPrincipal()
+ {
+ return principal;
+ }
+
+
+ /**
+ * Sets the Principal
+ *
+ * @param principal
+ * the new value
+ */
+ public void setPrincipal( String principal )
+ {
+ this.principal = principal;
+ }
+
+
+ /**
+ * Gets the Synchronization Period.
+ *
+ * @return
+ * the Synchronization Period
+ */
+ public int getSynchronizationPeriod()
+ {
+ return synchronizationPeriod;
+ }
+
+
+ /**
+ * Sets the Synchonization Period.
+ *
+ * @param synchronizationPeriod
+ * the new value
+ */
+ public void setSynchronizationPeriod( int synchronizationPeriod )
+ {
+ this.synchronizationPeriod = synchronizationPeriod;
+ }
+}