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 2008/07/10 19:36:31 UTC
svn commit: r675657 [3/6] - in
/directory/studio/trunk/apacheds-configuration/src/main:
java/org/apache/directory/studio/apacheds/configuration/
java/org/apache/directory/studio/apacheds/configuration/editor/
java/org/apache/directory/studio/apacheds/c...
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/ExtendedOperationDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/ExtendedOperationDialog.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/ExtendedOperationDialog.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/ExtendedOperationDialog.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,241 @@
+/*
+ * 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.editor.v153.dialogs;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPlugin;
+import org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPluginConstants;
+import org.apache.directory.studio.apacheds.configuration.model.v153.ExtendedOperationEnum;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Dialog for Extended Operation.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ExtendedOperationDialog extends Dialog
+{
+ /** The initial extended operations list */
+ private List<ExtendedOperationEnum> initialExtendedOperations;
+
+ /** The available extended operations list */
+ private List<ExtendedOperationEnum> availableExtendedOperations;
+
+ /** The selected extended operation */
+ private ExtendedOperationEnum selectedExtendedOperation;
+
+ // UI Fields
+ private Table extendedOperationsTable;
+ private TableViewer extendedOperationsTableViewer;
+ private Button addButton;
+
+
+ /**
+ * Creates a new instance of ExtendedOperationDialog.
+ */
+ public ExtendedOperationDialog( List<ExtendedOperationEnum> extendedOperations )
+ {
+ super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
+ this.initialExtendedOperations = extendedOperations;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( "Add An Extended Operation" );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ composite.setLayout( new GridLayout() );
+ composite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+
+ // Choose Label
+ Label chooseLabel = new Label( composite, SWT.NONE );
+ chooseLabel.setText( "Choose an extended operation:" );
+ chooseLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ // Interceptors Table Viewer
+ extendedOperationsTable = new Table( composite, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
+ | SWT.FULL_SELECTION | SWT.HIDE_SELECTION );
+ GridData gridData = new GridData( SWT.FILL, SWT.FILL, true, true );
+ gridData.heightHint = 148;
+ gridData.minimumHeight = 148;
+ gridData.widthHint = 350;
+ gridData.minimumWidth = 350;
+ extendedOperationsTable.setLayoutData( gridData );
+ extendedOperationsTable.addMouseListener( new MouseAdapter()
+ {
+ public void mouseDoubleClick( MouseEvent e )
+ {
+ if ( extendedOperationsTable.getSelectionIndex() != -1 )
+ {
+ okPressed();
+ }
+ }
+ } );
+
+ extendedOperationsTableViewer = new TableViewer( extendedOperationsTable );
+ extendedOperationsTableViewer.setContentProvider( new ArrayContentProvider() );
+ extendedOperationsTableViewer.setLabelProvider( new LabelProvider()
+ {
+ public Image getImage( Object element )
+ {
+ return ApacheDSConfigurationPlugin.getDefault().getImage(
+ ApacheDSConfigurationPluginConstants.IMG_EXTENDED_OPERATION );
+ }
+
+
+ public String getText( Object element )
+ {
+ if ( element instanceof ExtendedOperationEnum )
+ {
+ return ( ( ExtendedOperationEnum ) element ).getName();
+
+ }
+
+ return super.getText( element );
+ }
+ } );
+ extendedOperationsTableViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ StructuredSelection selection = ( StructuredSelection ) extendedOperationsTableViewer.getSelection();
+ if ( selection.isEmpty() )
+ {
+ if ( ( addButton != null ) && ( !addButton.isDisposed() ) )
+ {
+ addButton.setEnabled( false );
+ }
+ }
+ else
+ {
+ if ( ( addButton != null ) && ( !addButton.isDisposed() ) )
+ {
+ addButton.setEnabled( true );
+ }
+ }
+ }
+ } );
+
+ initFromInput();
+
+ return composite;
+ }
+
+
+ /**
+ * Initializes the UI from the input.
+ */
+ private void initFromInput()
+ {
+ // Creating the available extended operations list
+ availableExtendedOperations = new ArrayList<ExtendedOperationEnum>();
+ if ( !initialExtendedOperations.contains( ExtendedOperationEnum.START_TLS ) )
+ {
+ availableExtendedOperations.add( ExtendedOperationEnum.START_TLS );
+ }
+ if ( !initialExtendedOperations.contains( ExtendedOperationEnum.GRACEFUL_SHUTDOWN ) )
+ {
+ availableExtendedOperations.add( ExtendedOperationEnum.GRACEFUL_SHUTDOWN );
+ }
+ if ( !initialExtendedOperations.contains( ExtendedOperationEnum.LAUNCH_DIAGNOSTIC_UI ) )
+ {
+ availableExtendedOperations.add( ExtendedOperationEnum.LAUNCH_DIAGNOSTIC_UI );
+ }
+
+ // Setting the input
+ extendedOperationsTableViewer.setInput( availableExtendedOperations );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+ */
+ protected void createButtonsForButtonBar( Composite parent )
+ {
+ addButton = createButton( parent, IDialogConstants.OK_ID, "Add", true ); //$NON-NLS-1$
+ createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
+
+ addButton.setEnabled( false );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ StructuredSelection selection = ( StructuredSelection ) extendedOperationsTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ selectedExtendedOperation = ( ExtendedOperationEnum ) selection.getFirstElement();
+ }
+
+ super.okPressed();
+ }
+
+
+ /**
+ * Gets the extended operation.
+ *
+ * @return
+ * the extended operation
+ */
+ public ExtendedOperationEnum getExtendedOperation()
+ {
+ return selectedExtendedOperation;
+ }
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/IndexedAttributeDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/IndexedAttributeDialog.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/IndexedAttributeDialog.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/IndexedAttributeDialog.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,193 @@
+/*
+ * 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.editor.v153.dialogs;
+
+
+import org.apache.directory.studio.apacheds.configuration.model.v153.IndexedAttribute;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Dialog for Indexed Attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class IndexedAttributeDialog extends Dialog
+{
+ /** The Indexed Attribute */
+ private IndexedAttribute indexedAttribute;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI Fields
+ private Text attributeIdText;
+ private Text cacheSizeText;
+
+
+ /**
+ * Creates a new instance of IndexedAttributeDialog.
+ */
+ public IndexedAttributeDialog( IndexedAttribute indexedAttribute )
+ {
+ super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
+ this.indexedAttribute = indexedAttribute;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( "Indexed Attribute Dialog" );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ GridLayout layout = new GridLayout( 2, false );
+ composite.setLayout( layout );
+ composite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+
+ Label attributeIdLabel = new Label( composite, SWT.NONE );
+ attributeIdLabel.setText( "Attribute ID:" );
+
+ attributeIdText = new Text( composite, SWT.BORDER );
+ attributeIdText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ Label cacheSizeLabel = new Label( composite, SWT.NONE );
+ cacheSizeLabel.setText( "Cache Size:" );
+
+ cacheSizeText = new Text( composite, SWT.BORDER );
+ cacheSizeText.addVerifyListener( new VerifyListener()
+ {
+ public void verifyText( VerifyEvent e )
+ {
+ if ( !e.text.matches( "[0-9]*" ) ) //$NON-NLS-1$
+ {
+ e.doit = false;
+ }
+ }
+ } );
+ cacheSizeText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ initFromInput();
+ addListeners();
+
+ return composite;
+ }
+
+
+ /**
+ * Initializes the UI from the input.
+ */
+ private void initFromInput()
+ {
+ String attributeId = indexedAttribute.getAttributeId();
+ attributeIdText.setText( ( attributeId == null ) ? "" : attributeId );
+ cacheSizeText.setText( "" + indexedAttribute.getCacheSize() );
+ }
+
+
+ /**
+ * Adds listeners to the UI Fields.
+ */
+ private void addListeners()
+ {
+ attributeIdText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+
+ cacheSizeText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ indexedAttribute.setAttributeId( attributeIdText.getText() );
+ try
+ {
+ indexedAttribute.setCacheSize( Integer.parseInt( cacheSizeText.getText() ) );
+ }
+ catch ( NumberFormatException e )
+ {
+ // Nothing to do, it won't happen
+ }
+
+ super.okPressed();
+ }
+
+
+ /**
+ * Gets the Indexed Attribute.
+ *
+ * @return
+ * the Indexed Attribute
+ */
+ public IndexedAttribute getIndexedAttribute()
+ {
+ return indexedAttribute;
+ }
+
+
+ /**
+ * Returns the dirty flag of the dialog.
+ *
+ * @return
+ * the dirty flag of the dialog
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/InterceptorDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/InterceptorDialog.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/InterceptorDialog.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/InterceptorDialog.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,281 @@
+/*
+ * 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.editor.v153.dialogs;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPlugin;
+import org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPluginConstants;
+import org.apache.directory.studio.apacheds.configuration.model.v153.InterceptorEnum;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Dialog for Interceptor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class InterceptorDialog extends Dialog
+{
+ /** The initial interceptors list */
+ private List<InterceptorEnum> initialInterceptors;
+
+ /** The available interceptors list */
+ private List<InterceptorEnum> availableInterceptors;
+
+ /** The selected interceptor */
+ private InterceptorEnum selectedInterceptor;
+
+ // UI Fields
+ private Table interceptorsTable;
+ private TableViewer interceptorsTableViewer;
+ private Button addButton;
+
+
+ /**
+ * Creates a new instance of InterceptorDialog.
+ */
+ public InterceptorDialog( List<InterceptorEnum> interceptors )
+ {
+ super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
+ this.initialInterceptors = interceptors;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( "Add An Interceptor" );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ composite.setLayout( new GridLayout() );
+ composite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+
+ // Choose Label
+ Label chooseLabel = new Label( composite, SWT.NONE );
+ chooseLabel.setText( "Choose an interceptor:" );
+ chooseLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ // Interceptors Table Viewer
+ interceptorsTable = new Table( composite, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
+ | SWT.FULL_SELECTION | SWT.HIDE_SELECTION );
+ GridData gridData = new GridData( SWT.FILL, SWT.FILL, true, true );
+ gridData.heightHint = 148;
+ gridData.minimumHeight = 148;
+ gridData.widthHint = 350;
+ gridData.minimumWidth = 350;
+ interceptorsTable.setLayoutData( gridData );
+ interceptorsTable.addMouseListener( new MouseAdapter()
+ {
+ public void mouseDoubleClick( MouseEvent e )
+ {
+ if ( interceptorsTable.getSelectionIndex() != -1 )
+ {
+ okPressed();
+ }
+ }
+ } );
+
+ interceptorsTableViewer = new TableViewer( interceptorsTable );
+ interceptorsTableViewer.setContentProvider( new ArrayContentProvider() );
+ interceptorsTableViewer.setLabelProvider( new LabelProvider()
+ {
+ public Image getImage( Object element )
+ {
+ return ApacheDSConfigurationPlugin.getDefault().getImage(
+ ApacheDSConfigurationPluginConstants.IMG_INTERCEPTOR );
+ }
+
+
+ public String getText( Object element )
+ {
+ if ( element instanceof InterceptorEnum )
+ {
+ return ( ( InterceptorEnum ) element ).getName();
+
+ }
+
+ return super.getText( element );
+ }
+ } );
+ interceptorsTableViewer.addSelectionChangedListener( new ISelectionChangedListener()
+ {
+ public void selectionChanged( SelectionChangedEvent event )
+ {
+ StructuredSelection selection = ( StructuredSelection ) interceptorsTableViewer.getSelection();
+ if ( selection.isEmpty() )
+ {
+ if ( ( addButton != null ) && ( !addButton.isDisposed() ) )
+ {
+ addButton.setEnabled( false );
+ }
+ }
+ else
+ {
+ if ( ( addButton != null ) && ( !addButton.isDisposed() ) )
+ {
+ addButton.setEnabled( true );
+ }
+ }
+ }
+ } );
+
+ initFromInput();
+
+ return composite;
+ }
+
+
+ /**
+ * Initializes the UI from the input.
+ */
+ private void initFromInput()
+ {
+ // Creating the available interceptors list
+ availableInterceptors = new ArrayList<InterceptorEnum>();
+ if ( !initialInterceptors.contains( InterceptorEnum.NORMALIZATION ) )
+ {
+ availableInterceptors.add( InterceptorEnum.NORMALIZATION );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.AUTHENTICATION ) )
+ {
+ availableInterceptors.add( InterceptorEnum.AUTHENTICATION );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.REFERRAL ) )
+ {
+ availableInterceptors.add( InterceptorEnum.REFERRAL );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.ACI_AUTHORIZATION ) )
+ {
+ availableInterceptors.add( InterceptorEnum.ACI_AUTHORIZATION );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.DEFAULT_AUTHORIZATION ) )
+ {
+ availableInterceptors.add( InterceptorEnum.DEFAULT_AUTHORIZATION );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.EXCEPTION ) )
+ {
+ availableInterceptors.add( InterceptorEnum.EXCEPTION );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.OPERATIONAL_ATTRIBUTE ) )
+ {
+ availableInterceptors.add( InterceptorEnum.OPERATIONAL_ATTRIBUTE );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.SCHEMA ) )
+ {
+ availableInterceptors.add( InterceptorEnum.SCHEMA );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.SUBENTRY ) )
+ {
+ availableInterceptors.add( InterceptorEnum.SUBENTRY );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.COLLECTIVE_ATTRIBUTE ) )
+ {
+ availableInterceptors.add( InterceptorEnum.COLLECTIVE_ATTRIBUTE );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.EVENT ) )
+ {
+ availableInterceptors.add( InterceptorEnum.EVENT );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.TRIGGER ) )
+ {
+ availableInterceptors.add( InterceptorEnum.TRIGGER );
+ }
+ if ( !initialInterceptors.contains( InterceptorEnum.REPLICATION ) )
+ {
+ availableInterceptors.add( InterceptorEnum.REPLICATION );
+ }
+
+ // Setting the input
+ interceptorsTableViewer.setInput( availableInterceptors );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+ */
+ protected void createButtonsForButtonBar( Composite parent )
+ {
+ addButton = createButton( parent, IDialogConstants.OK_ID, "Add", true ); //$NON-NLS-1$
+ createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
+
+ addButton.setEnabled( false );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ StructuredSelection selection = ( StructuredSelection ) interceptorsTableViewer.getSelection();
+ if ( !selection.isEmpty() )
+ {
+ selectedInterceptor = ( InterceptorEnum ) selection.getFirstElement();
+ }
+
+ super.okPressed();
+ }
+
+
+ /**
+ * Gets the interceptor.
+ *
+ * @return
+ * the interceptor
+ */
+ public InterceptorEnum getInterceptor()
+ {
+ return selectedInterceptor;
+ }
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/NtlmProviderDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/NtlmProviderDialog.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/NtlmProviderDialog.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/NtlmProviderDialog.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,158 @@
+/*
+ * 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.editor.v153.dialogs;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Dialog for NTML Provider.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NtlmProviderDialog extends Dialog
+{
+ /** The initial value */
+ private String initialValue;
+
+ /** The return value */
+ private String returnValue;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI Fields
+ private Text ntlmProviderText;
+
+
+ /**
+ * Creates a new instance of SaslRealmDialog.
+ */
+ public NtlmProviderDialog( String initialValue )
+ {
+ super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
+ this.initialValue = initialValue;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( "NTLM Provider Dialog" );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ GridLayout layout = new GridLayout( 2, false );
+ composite.setLayout( layout );
+ composite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+
+ Label ntlmProviderLabel = new Label( composite, SWT.NONE );
+ ntlmProviderLabel.setText( "NTLM Provider:" );
+
+ ntlmProviderText = new Text( composite, SWT.BORDER );
+ ntlmProviderText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ initFromInput();
+ addListeners();
+
+ return composite;
+ }
+
+
+ /**
+ * Initializes the UI from the input.
+ */
+ private void initFromInput()
+ {
+ ntlmProviderText.setText( ( initialValue == null ) ? "" : initialValue );
+ }
+
+
+ /**
+ * Adds listeners to the UI Fields.
+ */
+ private void addListeners()
+ {
+ ntlmProviderText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ returnValue = ntlmProviderText.getText();
+
+ super.okPressed();
+ }
+
+
+ /**
+ * Gets the NTLM Provider.
+ *
+ * @return
+ * the NTLM Provider
+ */
+ public String getNtlmProvider()
+ {
+ return returnValue;
+ }
+
+
+ /**
+ * Returns the dirty flag of the dialog.
+ *
+ * @return
+ * the dirty flag of the dialog
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/SaslRealmDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/SaslRealmDialog.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/SaslRealmDialog.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/dialogs/SaslRealmDialog.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,158 @@
+/*
+ * 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.editor.v153.dialogs;
+
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the Dialog for SASL Realm.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class SaslRealmDialog extends Dialog
+{
+ /** The initial value */
+ private String initialValue;
+
+ /** The return value */
+ private String returnValue;
+
+ /** The dirty flag */
+ private boolean dirty = false;
+
+ // UI Fields
+ private Text saslRealmText;
+
+
+ /**
+ * Creates a new instance of SaslRealmDialog.
+ */
+ public SaslRealmDialog( String initialValue )
+ {
+ super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
+ this.initialValue = initialValue;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+ */
+ protected void configureShell( Shell newShell )
+ {
+ super.configureShell( newShell );
+ newShell.setText( "SASL Realm Dialog" );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ protected Control createDialogArea( Composite parent )
+ {
+ Composite composite = new Composite( parent, SWT.NONE );
+ GridLayout layout = new GridLayout( 2, false );
+ composite.setLayout( layout );
+ composite.setLayoutData( new GridData( GridData.FILL, GridData.FILL, true, true ) );
+
+ Label saslRealmLabel = new Label( composite, SWT.NONE );
+ saslRealmLabel.setText( "SASL Realm:" );
+
+ saslRealmText = new Text( composite, SWT.BORDER );
+ saslRealmText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
+
+ initFromInput();
+ addListeners();
+
+ return composite;
+ }
+
+
+ /**
+ * Initializes the UI from the input.
+ */
+ private void initFromInput()
+ {
+ saslRealmText.setText( ( initialValue == null ) ? "" : initialValue );
+ }
+
+
+ /**
+ * Adds listeners to the UI Fields.
+ */
+ private void addListeners()
+ {
+ saslRealmText.addModifyListener( new ModifyListener()
+ {
+ public void modifyText( ModifyEvent e )
+ {
+ dirty = true;
+ }
+ } );
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ protected void okPressed()
+ {
+ returnValue = saslRealmText.getText();
+
+ super.okPressed();
+ }
+
+
+ /**
+ * Gets the SASL Realm.
+ *
+ * @return
+ * the SASL Realm
+ */
+ public String getSaslRealm()
+ {
+ return returnValue;
+ }
+
+
+ /**
+ * Returns the dirty flag of the dialog.
+ *
+ * @return
+ * the dirty flag of the dialog
+ */
+ public boolean isDirty()
+ {
+ return dirty;
+ }
+}
Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationVersionEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationVersionEnum.java?rev=675657&r1=675656&r2=675657&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationVersionEnum.java (original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/ServerConfigurationVersionEnum.java Thu Jul 10 10:36:30 2008
@@ -29,6 +29,18 @@
public enum ServerConfigurationVersionEnum
{
/** Version 1.5.2 */
+ VERSION_1_5_3
+ {
+ /* (non-Javadoc)
+ * @see java.lang.Enum#toString()
+ */
+ public String toString()
+ {
+ return "Version 1.5.3";
+ }
+ },
+
+ /** Version 1.5.2 */
VERSION_1_5_2
{
/* (non-Javadoc)
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ExtendedOperationEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ExtendedOperationEnum.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ExtendedOperationEnum.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ExtendedOperationEnum.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,113 @@
+/*
+ * 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.v153;
+
+
+/**
+ * This enum contains all the extended operations.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum ExtendedOperationEnum
+{
+ /** The Start TLS Extended Operation */
+ START_TLS("Start TLS", "The Start TLS extended operation allows an application to serialize secure and "
+ + "plain requests against an LDAP server on a single connection."),
+
+ /** The Graceful Shutdown Extended Operation */
+ GRACEFUL_SHUTDOWN("Graceful Shutdown", "The Graceful Shutdown TLS extended operation allows an application to "
+ + "gracefully manage server's that must go offline or shutdown with proper notification to bound clients."),
+
+ /** The Launch Diagnostic UI Extended Operation */
+ LAUNCH_DIAGNOSTIC_UI("Launch Diagnostic UI",
+ "The Launch Diagnostic UI extended operation allows an application to "
+ + "launch the diagnostic user interface which can be used to look at "
+ + "the master table and the indices.");
+
+ /** The name */
+ private String name;
+
+ /** The description */
+ private String description;
+
+
+ /**
+ * Creates a new instance of InterceptorEnum.
+ *
+ * @param name
+ * the name
+ * @param description
+ * the description
+ */
+ private ExtendedOperationEnum( String name, String description )
+ {
+ this.name = name;
+ this.description = description;
+ }
+
+
+ /**
+ * Gets the name.
+ *
+ * @return
+ * the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Sets the name.
+ *
+ * @param name
+ * the name
+ */
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Gets the description.
+ *
+ * @return
+ * the description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+
+ /**
+ * Sets the description.
+ *
+ * @param description
+ * the description
+ */
+ public void setDescription( String description )
+ {
+ this.description = description;
+ }
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/IndexedAttribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/IndexedAttribute.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/IndexedAttribute.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/IndexedAttribute.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,108 @@
+/*
+ * 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.v153;
+
+
+/**
+ * This class represents an Indexed Attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class IndexedAttribute
+{
+ /** The attribute id */
+ private String attributeId;
+
+ /** The cache size */
+ private int cacheSize;
+
+
+ /**
+ * Creates a new instance of IndexedAttribute.
+ *
+ * @param attributeId
+ * the attribute id
+ * @param cacheSize
+ * the cache size
+ */
+ public IndexedAttribute( String attributeId, int cacheSize )
+ {
+ this.attributeId = attributeId;
+ this.cacheSize = cacheSize;
+ }
+
+
+ /**
+ * Gets the attribute id.
+ *
+ * @return
+ * the attribute id
+ */
+ public String getAttributeId()
+ {
+ return attributeId;
+ }
+
+
+ /**
+ * Sets the attribute id.
+ *
+ * @param attributeId
+ * the new attribute id
+ */
+ public void setAttributeId( String attributeId )
+ {
+ this.attributeId = attributeId;
+ }
+
+
+ /**
+ * Gets the cache size.
+ *
+ * @return
+ * the cache size
+ */
+ public int getCacheSize()
+ {
+ return cacheSize;
+ }
+
+
+ /**
+ * Gets the cache size.
+ *
+ * @param cacheSize
+ * the new cache size
+ */
+ public void setCacheSize( int cacheSize )
+ {
+ this.cacheSize = cacheSize;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return attributeId + " [" + cacheSize + "]";
+ }
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/InterceptorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/InterceptorConfiguration.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/InterceptorConfiguration.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/InterceptorConfiguration.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,31 @@
+/*
+ * 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.v153;
+
+
+/**
+ * This interface defines an interceptor configuration.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface InterceptorConfiguration
+{
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/InterceptorEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/InterceptorEnum.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/InterceptorEnum.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/InterceptorEnum.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,203 @@
+/*
+ * 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.v153;
+
+
+
+
+/**
+ * This enum contains all the interceptors.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum InterceptorEnum
+{
+ /** The Normalization Interceptor */
+ NORMALIZATION("Normalization", "A name normalization interceptor. This interceptor makes sure all relative "
+ + "and distinguished names are normalized before calls are made against "
+ + "the respective interface methods on PartitionNexus."),
+
+ /** The Authentication Interceptor */
+ AUTHENTICATION("Authentication", "An interceptor that authenticates users."),
+
+ /** The Referral Interceptor */
+ REFERRAL("Referral", "An interceptor which is responsible referral handling behaviors. It "
+ + "manages referral handling behavior when the Context#REFERRAL "
+ + "is implicitly or explicitly set to \"ignore\", when set to \"throw\" " + "and when set to \"follow\"."),
+
+ /** The ACI Authorization Interceptor */
+ ACI_AUTHORIZATION("ACI Authorization", "An ACI based authorization interceptor."),
+
+ /** The Default Authorization Interceptor */
+ DEFAULT_AUTHORIZATION("Default Authorization", "An interceptor that controls access to PartitionNexus. If a user "
+ + "tries to perform any operations that requires permission he or she "
+ + "doesn't have, NoPermissionException will be thrown and therefore the "
+ + "current invocation chain will terminate."),
+
+ /** The Exception Interceptor */
+ EXCEPTION("Exception", "An interceptor that detects any operations that breaks integrity of "
+ + "Partition and terminates the current invocation chain by throwing a "
+ + "NamingException. Those operations include when an entry already "
+ + "exists at a DN and is added once again to the same DN."),
+
+ /** The Operational Attribute Interceptor */
+ OPERATIONAL_ATTRIBUTE("Operational Attribute", "An interceptor that adds or modifies the default attributes of "
+ + "entries. There are four default attributes for now; 'creatorsName', "
+ + "'createTimestamp', 'modifiersName', 'modifyTimestamp'."),
+
+ /** The Schema Interceptor */
+ SCHEMA("Schema", "An interceptor that manages and enforces schemas."),
+
+ /** The Sub-Entry Interceptor */
+ SUBENTRY("Sub-Entry", "The sub-entry interceptor service which is responsible for filtering "
+ + "out sub-entries on search operations and injecting operational attributes"),
+
+ /** The Collective Attribute Interceptor */
+ COLLECTIVE_ATTRIBUTE("Collective Attribute", "An interceptor based service dealing with collective attribute "
+ + "management. This service intercepts read operations on entries to "
+ + "inject collective attribute value pairs into the response based on "
+ + "the entires inclusion within collectiveAttributeSpecificAreas and collectiveAttributeInnerAreas."),
+
+ /** The Event Interceptor */
+ EVENT("Event", "An interceptor based serivice for notifying NamingListeners of "
+ + "EventContext and EventDirContext changes."),
+
+ /** The Trigger Interceptor */
+ TRIGGER("Trigger", "The trigger interceptor based on the Trigger Specification."),
+
+ /** The Replication Interceptor */
+ REPLICATION("Replication", "An interceptor that intercepts LDAP operations and propagates the "
+ + "changes occurred by the operations into other ReplicaIds so the DIT "
+ + "of each ReplicaId in the cluster has the same content without any conflict.",
+ new ReplicationInterceptorConfiguration());
+
+ /** The name */
+ private String name;
+
+ /** The description */
+ private String description;
+
+ /** The interceptor configuration */
+ private InterceptorConfiguration configuration;
+
+
+ /**
+ * Creates a new instance of InterceptorEnum.
+ *
+ * @param name
+ * the name
+ * @param description
+ * the description
+ */
+ private InterceptorEnum( String name, String description )
+ {
+ this.name = name;
+ this.description = description;
+ }
+
+
+ /**
+ * Creates a new instance of InterceptorEnum.
+ *
+ * @param name
+ * the name
+ * @param description
+ * the description
+ */
+ private InterceptorEnum( String name, String description, InterceptorConfiguration configuration )
+ {
+ this.name = name;
+ this.description = description;
+ this.configuration = configuration;
+ }
+
+
+ /**
+ * Gets the name.
+ *
+ * @return
+ * the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Sets the name.
+ *
+ * @param name
+ * the name
+ */
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Gets the description.
+ *
+ * @return
+ * the description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+
+ /**
+ * Sets the description.
+ *
+ * @param description
+ * the description
+ */
+ public void setDescription( String description )
+ {
+ this.description = description;
+ }
+
+
+ /**
+ * Gets the configuration.
+ *
+ * @return
+ * the configuration
+ */
+ public InterceptorConfiguration getConfiguration()
+ {
+ return configuration;
+ }
+
+
+ /**
+ * Sets the configuration
+ *
+ * @param configuration
+ * the configuration
+ */
+ public void setConfiguration( InterceptorConfiguration configuration )
+ {
+ this.configuration = configuration;
+ }
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/Partition.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/Partition.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/Partition.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/Partition.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,314 @@
+/*
+ * 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.v153;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
+
+
+/**
+ * This class represents a Partition.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Partition
+{
+ /** The ID of the partition */
+ private String id;
+
+ /** The cache size of the partition */
+ private int cacheSize;
+
+ /** The suffix of the partition */
+ private String suffix;
+
+ /** The Enable Optimizer flag */
+ private boolean enableOptimizer;
+
+ /** The Synchronization On Write flag */
+ private boolean synchronizationOnWrite;
+
+ /** The Context Entry */
+ private Attributes contextEntry;
+
+ /** The indexed attributes */
+ private List<IndexedAttribute> indexedAttributes;
+
+ /** The System Partition flag */
+ private boolean systemPartition = false;
+
+
+ /**
+ * Creates a new instance of Partition.
+ */
+ public Partition()
+ {
+ indexedAttributes = new ArrayList<IndexedAttribute>();
+ contextEntry = new BasicAttributes( true );
+ }
+
+
+ /**
+ * Creates a new instance of Partition.
+ *
+ * @param id
+ * the id of the partition
+ */
+ public Partition( String id )
+ {
+ indexedAttributes = new ArrayList<IndexedAttribute>();
+ contextEntry = new BasicAttributes( true );
+ this.id = id;
+ }
+
+
+ /**
+ * Gets the ID of the partition.
+ *
+ * @return
+ * the ID of the partition
+ */
+ public String getId()
+ {
+ return this.id;
+ }
+
+
+ /**
+ * Sets the ID of the partition.
+ *
+ * @param id
+ * the new ID to set
+ */
+ public void setId( String id )
+ {
+ this.id = id;
+ }
+
+
+ /**
+ * Gets the cache size.
+ *
+ * @return
+ * the cache size
+ */
+ public int getCacheSize()
+ {
+ return cacheSize;
+ }
+
+
+ /**
+ * Sets the cache size.
+ *
+ * @param cacheSize
+ * the new cache size
+ */
+ public void setCacheSize( int cacheSize )
+ {
+ this.cacheSize = cacheSize;
+ }
+
+
+ /**
+ * Gets the Context Entry.
+ *
+ * @return
+ * the Content Entry
+ */
+ public Attributes getContextEntry()
+ {
+ return contextEntry;
+ }
+
+
+ /**
+ * Sets the Context Entry
+ *
+ * @param contextEntry
+ * the new Context Entry
+ */
+ public void setContextEntry( Attributes contextEntry )
+ {
+ this.contextEntry = contextEntry;
+ }
+
+
+ /**
+ * Gets the Enable Optimizer flag.
+ *
+ * @return
+ * the Enable Optimizer flag
+ */
+ public boolean isEnableOptimizer()
+ {
+ return enableOptimizer;
+ }
+
+
+ /**
+ * Sets the Enable Optimizer flag.
+ *
+ * @param enableOptimizer
+ * the new value for the Enable Optimizer flag
+ */
+ public void setEnableOptimizer( boolean enableOptimizer )
+ {
+ this.enableOptimizer = enableOptimizer;
+ }
+
+
+ /**
+ * Get the Indexed Attributes List.
+ *
+ * @return
+ * the Indexed Attributes List
+ */
+ public List<IndexedAttribute> getIndexedAttributes()
+ {
+ return indexedAttributes;
+ }
+
+
+ /**
+ * Set the Indexed Attributes List.
+ *
+ * @param indexedAttributes
+ * the new Indexed Attributes List
+ */
+ public void setIndexedAttributes( List<IndexedAttribute> indexedAttributes )
+ {
+ this.indexedAttributes = indexedAttributes;
+ }
+
+
+ /**
+ * Adds an Indexed Attribute.
+ *
+ * @param indexedAttribute
+ * the Indexed Attribute to add
+ * @return
+ * true (as per the general contract of the Collection.add method).
+ */
+ public boolean addIndexedAttribute( IndexedAttribute indexedAttribute )
+ {
+ return indexedAttributes.add( indexedAttribute );
+ }
+
+
+ /**
+ * Removes a Indexed Attribute.
+ *
+ * @param indexedAttribute
+ * the Indexed Attribute to remove
+ * @return
+ * true if this list contained the specified element.
+ */
+ public boolean removeIndexedAttribute( IndexedAttribute indexedAttribute )
+ {
+ return indexedAttributes.remove( indexedAttribute );
+ }
+
+
+ /**
+ * Gets the suffix.
+ *
+ * @return
+ * the suffix
+ */
+ public String getSuffix()
+ {
+ return suffix;
+ }
+
+
+ /**
+ * Sets the suffix.
+ *
+ * @param suffix
+ * the new suffix
+ */
+ public void setSuffix( String suffix )
+ {
+ this.suffix = suffix;
+ }
+
+
+ /**
+ * Gets the Synchronization On Write flag.
+ *
+ * @return
+ * the Synchronization On Write flag
+ */
+ public boolean isSynchronizationOnWrite()
+ {
+ return synchronizationOnWrite;
+ }
+
+
+ /**
+ * Sets the Synchronization On Write flag.
+ *
+ * @param synchronizationOnWrite
+ * the Synchronization On Write flag
+ */
+ public void setSynchronizationOnWrite( boolean synchronizationOnWrite )
+ {
+ this.synchronizationOnWrite = synchronizationOnWrite;
+ }
+
+
+ /**
+ * Returns the System Partition flag.
+ *
+ * @return
+ * true if the partition is the System Partition
+ */
+ public boolean isSystemPartition()
+ {
+ return systemPartition;
+ }
+
+
+ /**
+ * Sets the System Partition flag.
+ *
+ * @param systemPartition
+ * the System Partition flag
+ */
+ public void setSystemPartition( boolean systemPartition )
+ {
+ this.systemPartition = systemPartition;
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return id;
+ }
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ReplicationInterceptorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ReplicationInterceptorConfiguration.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ReplicationInterceptorConfiguration.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ReplicationInterceptorConfiguration.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,30 @@
+/*
+ * 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.v153;
+
+/**
+ * This class implements a interceptor configuration for the replication interceptor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ReplicationInterceptorConfiguration implements InterceptorConfiguration
+{
+}
Added: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/SaslQualityOfProtectionEnum.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/SaslQualityOfProtectionEnum.java?rev=675657&view=auto
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/SaslQualityOfProtectionEnum.java (added)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/SaslQualityOfProtectionEnum.java Thu Jul 10 10:36:30 2008
@@ -0,0 +1,84 @@
+/*
+ * 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.v153;
+
+
+/**
+ * This enum contains all the SASL qualities of protection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum SaslQualityOfProtectionEnum
+{
+ /** The auth QoP */
+ AUTH("auth (Authentication only)"),
+
+ /** The auth-int QoP */
+ AUTH_INT("auth-int (Authentication with integrity protection)"),
+
+ /** The auth-conf QoP */
+ AUTH_CONF("auth-conf (Authentication with integrity and privacy protection)");
+
+ /** The name */
+ private String name;
+
+
+ /**
+ * Creates a new instance of SaslQualityOfProtectionEnum.
+ *
+ * @param name
+ * the name
+ */
+ private SaslQualityOfProtectionEnum( String name )
+ {
+ this.name = name;
+ }
+
+
+ /**
+ * Gets the name.
+ *
+ * @return
+ * the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+
+ /**
+ * Sets the name.
+ *
+ * @param name
+ * the name
+ */
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+
+ public String toString()
+ {
+ return name;
+ }
+}