directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r475786 [12/13] - in /directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin: ./ META-INF/ icons/ ressources/ ressources/help/ ressources/help/html/ ressources/help/html/concepts/ ressources/help/html/concepts/images/ ressources/...
Date Thu, 16 Nov 2006 16:05:29 GMT
Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/wrappers/SchemaWrapper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/wrappers/SchemaWrapper.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/wrappers/SchemaWrapper.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/wrappers/SchemaWrapper.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,153 @@
+/*
+ *  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.schemas.view.viewers.wrappers;
+
+
+import org.apache.directory.ldapstudio.schemas.controller.Application;
+import org.apache.directory.ldapstudio.schemas.model.Schema;
+import org.apache.directory.ldapstudio.schemas.view.IImageKeys;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * Nasty trick to display object-classes attributes in the tree-viewer
+ */
+public class SchemaWrapper implements DisplayableTreeElement
+{
+    /******************************************
+     *               Fields                   *
+     ******************************************/
+
+    private IntermediateNode parent;
+    private Schema mySchema;
+
+
+    /******************************************
+     *              Constructors              *
+     ******************************************/
+
+    /**
+     * Default constructor
+     * @param mySchema
+     * @param parent
+     */
+    public SchemaWrapper( Schema mySchema, IntermediateNode parent )
+    {
+        this.mySchema = mySchema;
+        this.parent = parent;
+    }
+
+
+    /******************************************
+     *             Wrapper Methods            *
+     ******************************************/
+
+    /**
+     * @return the name of the wrapped schema
+     */
+    public String getName()
+    {
+        return mySchema.getName();
+    }
+
+
+    /******************************************
+     *               Accessors                *
+     ******************************************/
+
+    /**
+     * @return the wrapped schema
+     */
+    public Schema getMySchema()
+    {
+        return mySchema;
+    }
+
+
+    /**
+     * @return the parent element
+     */
+    public IntermediateNode getParent()
+    {
+        return parent;
+    }
+
+
+    /******************************************
+     *       DisplayableTreeElement Impl.     *
+     ******************************************/
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.schemas.view.viewers.wrappers.DisplayableTreeElement#getDisplayImage()
+     */
+    public Image getDisplayImage()
+    {
+        if ( this.mySchema.type.equals( Schema.SchemaType.coreSchema ) )
+        {
+            return AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID, IImageKeys.SCHEMA_CORE )
+                .createImage();
+        }
+        else
+        {
+            return AbstractUIPlugin.imageDescriptorFromPlugin( Application.PLUGIN_ID, IImageKeys.SCHEMA ).createImage();
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.schemas.view.viewers.wrappers.DisplayableTreeElement#getDisplayName()
+     */
+    public String getDisplayName()
+    {
+        String res = ""; //$NON-NLS-1$
+        if ( mySchema.hasBeenModified() )
+            res += "*"; //$NON-NLS-1$
+        return res + mySchema.getName();
+    }
+
+
+    /******************************************
+     *           Object Redefinition          *
+     ******************************************/
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals( Object obj )
+    {
+        if ( obj instanceof SchemaWrapper )
+        {
+            SchemaWrapper compared = ( SchemaWrapper ) obj;
+            return compared.getName().equals( this.getName() );
+        }
+        return false;
+    }
+
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return mySchema + " wrapper"; //$NON-NLS-1$
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/wrappers/UnAlphabeticalOrderComparator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/wrappers/UnAlphabeticalOrderComparator.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/wrappers/UnAlphabeticalOrderComparator.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/viewers/wrappers/UnAlphabeticalOrderComparator.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,44 @@
+/*
+ *  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.schemas.view.viewers.wrappers;
+
+
+import java.util.Comparator;
+
+
+/**
+ * This class is used to compare in alphabetical order two DisplayableTreeElement
+ */
+public class UnAlphabeticalOrderComparator implements Comparator
+{
+    /* (non-Javadoc)
+     * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+     */
+    public int compare( Object o1, Object o2 )
+    {
+        DisplayableTreeElement one = ( DisplayableTreeElement ) o1;
+        DisplayableTreeElement two = ( DisplayableTreeElement ) o2;
+
+        String oneName = one.getDisplayName();
+        String twoName = two.getDisplayName();
+        return twoName.compareTo( oneName );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewAttributeTypeWizard.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewAttributeTypeWizard.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewAttributeTypeWizard.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewAttributeTypeWizard.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,110 @@
+/*
+ *  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.schemas.view.wizards;
+
+
+import org.apache.directory.ldapstudio.schemas.model.AttributeType;
+import org.apache.directory.ldapstudio.schemas.model.Schema;
+import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
+import org.apache.directory.server.core.tools.schema.AttributeTypeLiteral;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+/**
+ * Wizard for creation of a new attribute type
+ */
+public class CreateANewAttributeTypeWizard extends Wizard implements INewWizard
+{
+
+    private ISelection selection;
+
+    private CreateANewAttributeTypeWizardPage page;
+
+    private String schemaName;
+
+
+    /**
+     * Default Constructor
+     * 
+     * @param schemaName
+     *            the schema name in which should be added the new attribute
+     *            type
+     */
+    public CreateANewAttributeTypeWizard( String schemaName )
+    {
+        super();
+        this.schemaName = schemaName;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    @Override
+    public boolean performFinish()
+    {
+        // Getting the SchemaPool
+        SchemaPool pool = SchemaPool.getInstance();
+
+        // Getting the right schema
+        Schema schema = pool.getSchema( schemaName );
+
+        // Creating the new attribute type and adding it to the schema
+        AttributeTypeLiteral attributeTypeLiteral = new AttributeTypeLiteral( this.page.getOidField() );
+        attributeTypeLiteral.setNames( new String[]
+            { this.page.getNameField() } );
+
+        AttributeType attributeType = new AttributeType( attributeTypeLiteral, schema );
+        schema.addAttributeType( attributeType );
+
+        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 )
+    {
+        this.selection = selection;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    public void addPages()
+    {
+        this.page = new CreateANewAttributeTypeWizardPage( selection );
+        addPage( page );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewAttributeTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewAttributeTypeWizardPage.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewAttributeTypeWizardPage.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewAttributeTypeWizardPage.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,229 @@
+/*
+ *  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.schemas.view.wizards;
+
+
+import java.util.Hashtable;
+
+import org.apache.directory.ldapstudio.schemas.controller.Application;
+import org.apache.directory.ldapstudio.schemas.model.AttributeType;
+import org.apache.directory.ldapstudio.schemas.model.OID;
+import org.apache.directory.ldapstudio.schemas.model.SchemaElement;
+import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
+import org.apache.directory.ldapstudio.schemas.view.preferences.GeneralPreferencePage;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * Default Page for new attribute type wizard
+ */
+public class CreateANewAttributeTypeWizardPage extends WizardPage
+{
+
+    @SuppressWarnings("unused")//$NON-NLS-1$
+    private ISelection selection;
+
+    private Hashtable<String, AttributeType> typesByName;
+
+    private Hashtable<String, SchemaElement> elementsByOID;
+
+    private Text oidField;
+
+    private Text nameField;
+
+
+    /**
+     * Default constructor
+     * 
+     * @param selection
+     */
+    public CreateANewAttributeTypeWizardPage( ISelection selection )
+    {
+        super( "CreateANewAttributeTypeWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "CreateANewAttributeTypeWizardPage.Page_Title" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "CreateANewAttributeTypeWizardPage.Page_Description" ) ); //$NON-NLS-1$
+        this.selection = selection;
+
+        typesByName = SchemaPool.getInstance().getAttributeTypesAsHashTableByName();
+        elementsByOID = SchemaPool.getInstance().getSchemaElementsAsHashTableByOID();
+    }
+
+
+    /**
+     * OID field getter
+     * 
+     * @return the value of the OID field
+     */
+    public String getOidField()
+    {
+        return this.oidField.getText();
+    }
+
+
+    /**
+     * Name field getter
+     * 
+     * @return the value of the name field
+     */
+    public String getNameField()
+    {
+        return this.nameField.getText();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createControl( Composite parent )
+    {
+        Composite container = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout();
+        container.setLayout( layout );
+        layout.numColumns = 2;
+        layout.verticalSpacing = 1;
+        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+
+        // Setting up the OID section
+        new Label( container, SWT.NULL );
+
+        final Button autoOID = new Button( container, SWT.CHECK );
+        autoOID.setText( Messages.getString( "CreateANewAttributeTypeWizardPage.Prefix_with_the_default_OID" ) ); //$NON-NLS-1$
+
+        autoOID.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                IEclipsePreferences prefs = new ConfigurationScope().getNode( Application.PLUGIN_ID );
+
+                prefs.putBoolean( GeneralPreferencePage.AUTO_OID, autoOID.getSelection() );
+                if ( autoOID.getSelection() )
+                {
+                    String temp = prefs.get( GeneralPreferencePage.COMPANY_OID, "1.2.3.4.5.6" ); //$NON-NLS-1$
+                    oidField.setText( temp + "." ); //$NON-NLS-1$
+                }
+                else
+                {
+                    oidField.setText( "" ); //$NON-NLS-1$
+                }
+            }
+        } );
+
+        IEclipsePreferences prefs = new ConfigurationScope().getNode( Application.PLUGIN_ID );
+
+        boolean auto_oid = prefs.getBoolean( GeneralPreferencePage.AUTO_OID, true );
+        autoOID.setSelection( auto_oid );
+
+        Label label = new Label( container, SWT.NULL );
+        label.setText( Messages.getString( "CreateANewAttributeTypeWizardPage.OID" ) ); //$NON-NLS-1$
+        oidField = new Text( container, SWT.BORDER | SWT.SINGLE );
+        if ( auto_oid )
+        {
+            String temp = prefs.get( GeneralPreferencePage.COMPANY_OID, "1.2.3.4.5.6" ); //$NON-NLS-1$
+            oidField.setText( temp + "." ); //$NON-NLS-1$
+        }
+        oidField.setLayoutData( gd );
+        oidField.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                dialogChanged();
+            }
+        } );
+
+        // Setting up the Name section
+        Label label2 = new Label( container, SWT.NULL );
+        label2.setText( Messages.getString( "CreateANewAttributeTypeWizardPage.Name" ) ); //$NON-NLS-1$
+        nameField = new Text( container, SWT.BORDER | SWT.SINGLE );
+        nameField.setLayoutData( gd );
+        nameField.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                dialogChanged();
+            }
+        } );
+        dialogChanged();
+        setControl( container );
+        setErrorMessage( null );
+        setPageComplete( false );
+    }
+
+
+    private void dialogChanged()
+    {
+        if ( getOidField().length() == 0 )
+        {
+            updateStatus( Messages.getString( "CreateANewAttributeTypeWizardPage.An_OID_must_be_specified" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( !OID.validate( getOidField() ) )
+        {
+            updateStatus( Messages.getString( "CreateANewAttributeTypeWizardPage.Malformed_OID" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( getNameField().length() == 0 )
+        {
+            updateStatus( Messages.getString( "CreateANewAttributeTypeWizardPage.A_name_must_be_specified" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( elementsByOID.containsKey( getOidField() ) )
+        {
+            updateStatus( Messages
+                .getString( "CreateANewAttributeTypeWizardPage.An_element_of_the_same_OID_already_exists" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( typesByName.containsKey( getNameField() ) )
+        {
+            updateStatus( Messages
+                .getString( "CreateANewAttributeTypeWizardPage.An_attribute_type_of_the_same_name_already_exists" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        updateStatus( null );
+    }
+
+
+    private void updateStatus( String message )
+    {
+        setErrorMessage( message );
+        setPageComplete( message == null );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewObjectClassWizard.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewObjectClassWizard.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewObjectClassWizard.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewObjectClassWizard.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,111 @@
+/*
+ *  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.schemas.view.wizards;
+
+
+import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
+import org.apache.directory.ldapstudio.schemas.model.Schema;
+import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
+import org.apache.directory.server.core.tools.schema.ObjectClassLiteral;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+/**
+ * Wizard for creation of a new object class
+ */
+public class CreateANewObjectClassWizard extends Wizard implements INewWizard
+{
+
+    private ISelection selection;
+
+    private CreateANewObjectClassWizardPage page;
+
+    private String schemaName;
+
+
+    /**
+     * Default constructor
+     * 
+     * @param schemaName
+     *            the schema name in which should be added the new object class
+     */
+    public CreateANewObjectClassWizard( String schemaName )
+    {
+        super();
+        this.schemaName = schemaName;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    @Override
+    public boolean performFinish()
+    {
+        // Getting the SchemaPool
+        SchemaPool pool = SchemaPool.getInstance();
+
+        // Getting the right schema
+        Schema schema = pool.getSchema( schemaName );
+
+        // Creating the new object class and adding it to the schema
+        ObjectClassLiteral objectClassLiteral = new ObjectClassLiteral( this.page.getOidField() );
+        objectClassLiteral.setNames( new String[]
+            { this.page.getNameField() } );
+        objectClassLiteral.setSuperiors( new String[]
+            { "top" } ); //$NON-NLS-1$
+
+        ObjectClass objectClass = new ObjectClass( objectClassLiteral, schema );
+        schema.addObjectClass( objectClass );
+
+        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 )
+    {
+        this.selection = selection;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    public void addPages()
+    {
+        this.page = new CreateANewObjectClassWizardPage( selection );
+        addPage( page );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewObjectClassWizardPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewObjectClassWizardPage.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewObjectClassWizardPage.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewObjectClassWizardPage.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,230 @@
+/*
+ *  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.schemas.view.wizards;
+
+
+import java.util.Hashtable;
+
+import org.apache.directory.ldapstudio.schemas.controller.Application;
+import org.apache.directory.ldapstudio.schemas.model.OID;
+import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
+import org.apache.directory.ldapstudio.schemas.model.SchemaElement;
+import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
+import org.apache.directory.ldapstudio.schemas.view.preferences.GeneralPreferencePage;
+import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * Default Page for new attribute type wizard
+ */
+public class CreateANewObjectClassWizardPage extends WizardPage
+{
+
+    @SuppressWarnings("unused")//$NON-NLS-1$
+    private ISelection selection;
+
+    private Hashtable<String, ObjectClass> classesByName;
+
+    private Hashtable<String, SchemaElement> elementsByOID;
+
+    private Text oidField;
+
+    private Text nameField;
+
+
+    /**
+     * Default constructor
+     * 
+     * @param selection
+     */
+    public CreateANewObjectClassWizardPage( ISelection selection )
+    {
+        super( "CreateANewObjecClassWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "CreateANewObjectClassWizardPage.Page_Title" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "CreateANewObjectClassWizardPage.Page_Description" ) ); //$NON-NLS-1$
+        this.selection = selection;
+
+        classesByName = SchemaPool.getInstance().getObjectClassesAsHashTableByName();
+        elementsByOID = SchemaPool.getInstance().getSchemaElementsAsHashTableByOID();
+    }
+
+
+    /**
+     * OID field getter
+     * 
+     * @return the value of the OID field
+     */
+    public String getOidField()
+    {
+        return this.oidField.getText();
+    }
+
+
+    /**
+     * Name field getter
+     * 
+     * @return the value of the Name field
+     */
+    public String getNameField()
+    {
+        return this.nameField.getText();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createControl( Composite parent )
+    {
+        Composite container = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        layout.verticalSpacing = 1;
+        container.setLayout( layout );
+
+        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+
+        // Setting up the OID section
+        new Label( container, SWT.NULL );
+
+        final Button autoOID = new Button( container, SWT.CHECK );
+        autoOID.setText( Messages.getString( "CreateANewObjectClassWizardPage.Prefix_with_the_default_OID" ) ); //$NON-NLS-1$
+
+        autoOID.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                IEclipsePreferences prefs = new ConfigurationScope().getNode( Application.PLUGIN_ID );
+
+                prefs.putBoolean( GeneralPreferencePage.AUTO_OID, autoOID.getSelection() );
+                if ( autoOID.getSelection() )
+                {
+                    String temp = prefs.get( GeneralPreferencePage.COMPANY_OID, "1.2.3.4.5.6" ); //$NON-NLS-1$
+                    oidField.setText( temp + "." ); //$NON-NLS-1$
+                }
+                else
+                {
+                    oidField.setText( "" ); //$NON-NLS-1$
+                }
+            }
+        } );
+
+        IEclipsePreferences prefs = new ConfigurationScope().getNode( Application.PLUGIN_ID );
+
+        boolean auto_oid = prefs.getBoolean( GeneralPreferencePage.AUTO_OID, true );
+        autoOID.setSelection( auto_oid );
+
+        Label label = new Label( container, SWT.NULL );
+        label.setText( Messages.getString( "CreateANewObjectClassWizardPage.OID" ) ); //$NON-NLS-1$
+        oidField = new Text( container, SWT.BORDER | SWT.SINGLE );
+        if ( auto_oid )
+        {
+            String temp = prefs.get( GeneralPreferencePage.COMPANY_OID, "1.2.3.4.5.6" ); //$NON-NLS-1$
+            oidField.setText( temp + "." ); //$NON-NLS-1$
+        }
+        oidField.setLayoutData( gd );
+        oidField.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                dialogChanged();
+            }
+        } );
+
+        // Setting up the Name section
+        Label label2 = new Label( container, SWT.NULL );
+        label2.setText( Messages.getString( "CreateANewObjectClassWizardPage.Name" ) ); //$NON-NLS-1$
+        nameField = new Text( container, SWT.BORDER | SWT.SINGLE );
+        nameField.setLayoutData( gd );
+        nameField.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                dialogChanged();
+            }
+        } );
+        dialogChanged();
+        setControl( container );
+        setErrorMessage( null );
+        setPageComplete( false );
+    }
+
+
+    private void dialogChanged()
+    {
+        if ( getOidField().length() == 0 )
+        {
+            updateStatus( Messages.getString( "CreateANewObjectClassWizardPage.An_OID_must_be_specified" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( !OID.validate( getOidField() ) )
+        {
+            updateStatus( Messages.getString( "CreateANewObjectClassWizardPage.Malforme_OID" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( getNameField().length() == 0 )
+        {
+            updateStatus( Messages.getString( "CreateANewObjectClassWizardPage.A_name_must_be_specified" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( elementsByOID.containsKey( getOidField() ) )
+        {
+            updateStatus( Messages
+                .getString( "CreateANewObjectClassWizardPage.An_element_of_the_same_OID_already_exists" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( classesByName.containsKey( getNameField() ) )
+        {
+            updateStatus( Messages
+                .getString( "CreateANewObjectClassWizardPage.An_object_class_of_the_same_name_already_exists" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        updateStatus( null );
+    }
+
+
+    private void updateStatus( String message )
+    {
+        setErrorMessage( message );
+        setPageComplete( message == null );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewSchemaWizard.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewSchemaWizard.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewSchemaWizard.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewSchemaWizard.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,88 @@
+/*
+ *  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.schemas.view.wizards;
+
+
+import org.apache.directory.ldapstudio.schemas.model.Schema;
+import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+
+/**
+ * Wizard for creation of a new schema
+ */
+public class CreateANewSchemaWizard extends Wizard implements INewWizard
+{
+    private ISelection selection;
+
+    private CreateANewSchemaWizardPage page;
+
+
+    /**
+     * Default constructor
+     */
+    public CreateANewSchemaWizard()
+    {
+        super();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+     */
+    @Override
+    public boolean performFinish()
+    {
+        SchemaPool pool = SchemaPool.getInstance();
+        pool.addSchema( this.page.getNameField(), Schema.SchemaType.userSchema );
+        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 )
+    {
+        this.selection = selection;
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.Wizard#addPages()
+     */
+    public void addPages()
+    {
+        this.page = new CreateANewSchemaWizardPage( selection );
+        addPage( page );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewSchemaWizardPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewSchemaWizardPage.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewSchemaWizardPage.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/CreateANewSchemaWizardPage.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,129 @@
+/*
+ *  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.schemas.view.wizards;
+
+
+import org.apache.directory.ldapstudio.schemas.model.SchemaPool;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.wizard.WizardPage;
+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.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+/**
+ * Default Page for new schema wizard
+ */
+public class CreateANewSchemaWizardPage extends WizardPage
+{
+
+    @SuppressWarnings("unused")//$NON-NLS-1$
+    private ISelection selection;
+
+    private Text nameField;
+
+
+    /**
+     * Default constructor
+     * 
+     * @param selection
+     */
+    public CreateANewSchemaWizardPage( ISelection selection )
+    {
+        super( "CreateANewSchemaWizardPage" ); //$NON-NLS-1$
+        setTitle( Messages.getString( "CreateANewSchemaWizardPage.Page_Title" ) ); //$NON-NLS-1$
+        setDescription( Messages.getString( "CreateANewSchemaWizardPage.Page_Description" ) ); //$NON-NLS-1$
+        this.selection = selection;
+    }
+
+
+    /**
+     * Name field getter
+     * 
+     * @return
+     */
+    public String getNameField()
+    {
+        return this.nameField.getText();
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+     */
+    public void createControl( Composite parent )
+    {
+        Composite container = new Composite( parent, SWT.NULL );
+        GridLayout layout = new GridLayout();
+        container.setLayout( layout );
+        layout.numColumns = 2;
+        layout.verticalSpacing = 1;
+        Label label = new Label( container, SWT.NULL );
+        label.setText( Messages.getString( "CreateANewSchemaWizardPage.Name" ) ); //$NON-NLS-1$
+        nameField = new Text( container, SWT.BORDER | SWT.SINGLE );
+        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+        nameField.setLayoutData( gd );
+        nameField.addModifyListener( new ModifyListener()
+        {
+            public void modifyText( ModifyEvent e )
+            {
+                dialogChanged();
+            }
+        } );
+        dialogChanged();
+        setControl( container );
+        setErrorMessage( null );
+        setPageComplete( false );
+    }
+
+
+    private void dialogChanged()
+    {
+        if ( getNameField().length() == 0 )
+        {
+            updateStatus( Messages.getString( "CreateANewSchemaWizardPage.A_name_must_be_specified" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        if ( SchemaPool.getInstance().getSchema( getNameField() ) != null )
+        {
+            updateStatus( Messages
+                .getString( "CreateANewSchemaWizardPage.A_schema_of_the_same_name_is_already_loaded_in_the_pool" ) ); //$NON-NLS-1$
+            return;
+        }
+
+        updateStatus( null );
+    }
+
+
+    private void updateStatus( String message )
+    {
+        setErrorMessage( message );
+        setPageComplete( message == null );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/Messages.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/Messages.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/Messages.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/java/org/apache/directory/ldapstudio/schemas/view/wizards/Messages.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,51 @@
+/*
+ *  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.schemas.view.wizards;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.ldapstudio.schemas.view.wizards.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+
+    private Messages()
+    {
+    }
+
+
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/controller/actions/messages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/controller/actions/messages.properties?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/controller/actions/messages.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/controller/actions/messages.properties Thu Nov 16 08:05:20 2006
@@ -0,0 +1,52 @@
+#
+#  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.  
+
+#
+# This file stores the Strings used by the User Interface of the application
+#
+
+CreateANewAttributeTypeAction.Create_a_new_attribute_type=Create a new attribute type
+CreateANewAttributeTypeAction.A_schema_must_be_selected=A schema must be selected to add a new attribute type.
+CreateANewObjectClassAction.Create_a_new_object_class=Create a new object class
+CreateANewObjectClassAction.A_schema_must_be_selected=A schema must be selected to add a new object class.
+CreateANewAttributeTypeAction.The_schema=The schema "
+CreateANewSchemaAction.Create_a_new_schema=Create a new schema
+CreateANewObjectClassAction.The_schema=The schema "
+CreateANewAttributeTypeAction.Is_a_core_schema_It_cant_be_modified=" is a core schema. It can't be modified.
+CreateANewObjectClassAction.Is_a_core_schema_It_cant_be_modified=" is a core schema. It can't be modified.
+DeleteAction.Delete_the_selected_item=Delete the selected item
+DeleteAction.This_item_cant_be_deleted=This item can't be deleted.
+DeleteAction.The_schema=The schema "
+DeleteAction.Is_a_core_schema_It_cant_be_modified=" is a core schema. It can't be modified.
+DeleteAction.Are_you_sure_you_want_to_delete_the_attribute_type=Are you sure you want to delete the attribute type "
+DeleteAction.Interrogation="?
+DeleteAction.Are_you_sure_you_want_to_delete_the_object_class=Are you sure you want to delete the object class "
+OpenLocalFileAction.Open_a_schema_file=Open a schema file
+RemoveSchemaAction.Remove_the_selected_schema=Remove the selected schema
+RemoveSchemaAction.The_schema=The schema "
+RemoveSchemaAction.Is_a_core_schema_It_cant_be_removed_from_the_pool=" is a core schema. It can't be removed from the pool.
+RemoveSchemaAction.This_schema_has_been_modified_or_has_pending_modifications=This schema has been modified or has pending modifications in opened editors, are you sure you want to remove it from the pool without saving it first ?
+SaveAction.Save_schema=Save schema
+SaveAction.Error=Error
+SaveAllAction.Error=Error
+SaveAsAction.Error=Error
+SaveAction.An_error_occurred_when_saving_schema=An error occurred when saving schema 
+SaveAllAction.Save_all_schemas=Save all schemas
+SaveAsAction.Save_schema_as=Save schema as...
+SaveAllAction.An_error_occured_when_saving_schemas=An error occured when saving schemas
+SaveAsAction.An_error_occurred_when_saving_schemas=An error occurred when saving schema 

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/io/messages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/io/messages.properties?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/io/messages.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/io/messages.properties Thu Nov 16 08:05:20 2006
@@ -0,0 +1,25 @@
+#
+#  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.  
+
+#
+# This file stores the Strings used by the User Interface of the application
+#
+
+SchemaParser.0=Schema parser: no path or url specified\!
+SchemaParser.An_error_has_occurred_when_parsing_the_file=An error has occurred when parsing the file : 
+SchemaParser.The_schema_cannot_be_opened=.\nThe schema cannot be opened.

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/model/messages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/model/messages.properties?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/model/messages.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/model/messages.properties Thu Nov 16 08:05:20 2006
@@ -0,0 +1,29 @@
+#
+#  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.  
+
+#
+# This file stores the Strings used by the User Interface of the application
+#
+
+Schema.The_schema=The schema "
+Schema.Has_pending_modifications_in_editors_Do_you_want_to_apply_them=" has pending modifications in editors. Do you want to apply them?
+Schema.Has_been_modified_Do_you_want_to_save_it=" has been modified. Do you want to save it?
+Schema.Save_this_schema=Save this schema: 
+Schema.Schema_files=Schema files
+Schema.All_files=All files
+Schema.A_schema_of_the_same_name_is_already_loaded_in_the_pool=A schema of the same name is already loaded in the pool. Save aborded \!

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/editors/messages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/editors/messages.properties?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/editors/messages.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/editors/messages.properties Thu Nov 16 08:05:20 2006
@@ -0,0 +1,90 @@
+#
+#  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.  
+
+#
+# This file stores the Strings used by the User Interface of the application
+#
+
+AttributeTypeFormEditor.Overview=Overview
+AttributeTypeSelectionDialog.Name=Name
+AttributeTypeSelectionDialog.Add=Add
+AttributeTypeFormEditor.Source_Code=Source Code
+AttributeTypeFormEditorInput.In_the=\ in the "
+AttributeTypeFormEditorInput.Schema=" schema
+AttributeTypeSelectionDialog.Schema=Schema
+AttributeTypeFormEditorOverviewPage.General_Section_Description=Specify general information (name, OID, etc.).
+AttributeTypeSelectionDialog.You_have_to_choose_an_attribute_type=You have to choose an attribute type.
+AttributeTypeFormEditorOverviewPage.General_Section_Text=General information
+AttributeTypeFormEditorOverviewPage.Name=Name:
+AttributeTypeFormEditorOverviewPage.Aliases=Aliases:
+AttributeTypeFormEditorOverviewPage.Manage_aliases=Manage aliases
+AttributeTypeFormEditorOverviewPage.OID=OID:
+AttributeTypeFormEditorOverviewPage.Description=Description:
+AttributeTypeFormEditorOverviewPage.Superior_type=Superior type:
+AttributeTypeFormEditorOverviewPage.Usage=Usage:
+AttributeTypeFormEditorOverviewPage.Synatx=Syntax:
+AttributeTypeFormEditorOverviewPage.Syntax_length=Syntax length:
+AttributeTypeFormEditorOverviewPage.Obsolete=Obsolete
+AttributeTypeFormEditorOverviewPage.Single-Value=Single-Value
+AttributeTypeFormEditorOverviewPage.Collective=Collective
+AttributeTypeSelectionDialog.Invalid_Selection=Invalid Selection
+AttributeTypeFormEditorOverviewPage.No-User-Modification=No-User-Modification
+AttributeTypeFormEditorOverviewPage.Specify_matching_rules=Specify matching rules (Equality, Ordering & Substring).
+AttributeTypeFormEditorOverviewPage.Matching_Rules=Matching Rules
+AttributeTypeSelectionDialog.Attribute_type_Selection=Attribute type Selection
+AttributeTypeSelectionDialog.Choose_an_attribute_type=Choose an attribute type:
+AttributeTypeSelectionDialog.Matching_attribute_types=Matching attribute types:
+AttributeTypeFormEditorOverviewPage.Equility=Equality:
+AttributeTypeFormEditorOverviewPage.Ordering=Ordering:
+AttributeTypeFormEditorOverviewPage.Substring=Substring:
+AttributeTypeFormEditorOverviewPage.(None)=(None)
+ManageAliasesDialog.Manage_aliases=Manage aliases
+ManageAliasesDialog.Aliases=Aliases:
+ManageAliasesDialog.Add_an_alias=Add an alias:
+ManageAliasesDialog.Add=Add
+ManageAliasesDialog.Delete=Delete
+ObjectClassFormEditor.Overview=Overview
+ObjectClassFormEditor.Source_Code=Source Code
+ObjectClassFormEditorInput.In_the=\ in the "
+ObjectClassFormEditorInput.Schema=" schema
+ObjectClassFormEditorOverviewPage.General_Information_Section_Description=Specify general information (name, OID, etc.).
+ObjectClassFormEditorOverviewPage.General_Information_Section_Text=General information
+ObjectClassFormEditorOverviewPage.Name=Name:
+ObjectClassFormEditorOverviewPage.Aliases=Aliases:
+ObjectClassFormEditorOverviewPage.Manage_Aliases=Manage aliases
+ObjectClassFormEditorOverviewPage.OID=OID:
+ObjectClassFormEditorOverviewPage.Description=Description:
+ObjectClassFormEditorOverviewPage.Superior_class=Superior class:
+ObjectClassFormEditorOverviewPage.Class_type=Class type:
+ObjectClassFormEditorOverviewPage.Obsolete=Obsolete
+ObjectClassFormEditorOverviewPage.Mandatory_Attribute_Section_Text=Mandatory attributes
+ObjectClassFormEditorOverviewPage.Mandatory_Attribute_Section_Description=Specify the mandatory attribute types.
+ObjectClassFormEditorOverviewPage.Add...=Add...
+ObjectClassFormEditorOverviewPage.Remove=Remove
+ObjectClassFormEditorOverviewPage.Invalid_Selection=Invalid Selection
+ObjectClassFormEditorOverviewPage.The_selected_attribute_type_is_already_in_the_Optionnal_Attributes_section=The selected attribute type is already in the Optionnal Attributes section
+ObjectClassFormEditorOverviewPage.The_selected_attribute_type_is_already_in_the_this_section=The selected attribute type is already in the this section
+ObjectClassFormEditorOverviewPage.Optionnal_Attributes_Section_Text=Optionnal attributes
+ObjectClassFormEditorOverviewPage.Optionnal_Attributes_Section_Description=Specify the optionnal attribute types.
+ObjectClassFormEditorOverviewPage.The_selected_attribute_type_is_already_in_the_Mandatory_Attributes_section=The selected attribute type is already in the Mandatory Attributes section
+ObjectClassFormEditorOverviewPage.(None)=(None)
+ObjectClassFormEditorOverviewPage.Abstract=Abstract
+ObjectClassFormEditorOverviewPage.Auxiliary=Auxiliary
+ObjectClassFormEditorOverviewPage.Structural=Structural
+SchemaFormEditor.Source_code=Source code
+SchemaFormEditorInput.Source_code_of=Source code of 

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/preferences/messages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/preferences/messages.properties?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/preferences/messages.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/preferences/messages.properties Thu Nov 16 08:05:20 2006
@@ -0,0 +1,28 @@
+#
+#  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.  
+
+#
+# This file stores the Strings used by the User Interface of the application
+#
+
+GeneralPreferencePage.Your_organizations_default_OID=Your organization's default OID:
+GeneralPreferencePage.Automatically_prefix_new_elements_with_this_OID=Automatically prefix new elements with this OID
+SchemaPreferencePage.Default_save-load_dialogs_directory=Default save/load dialogs directory:
+SchemaPreferencePage.Save_schemas_configuration_when_exiting_LDAP_Studio=Save schemas configuration when exiting LDAP Studio
+SchemaPreferencePage.Use_specific_core_files=Use specific core files (if not selected, core schemas are loaded from LDAPStudio's bundle)
+SchemaPreferencePage.Core_schemas_directory=Core schemas directory:

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/viewers/messages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/viewers/messages.properties?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/viewers/messages.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/viewers/messages.properties Thu Nov 16 08:05:20 2006
@@ -0,0 +1,36 @@
+#
+#  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.  
+
+#
+# This file stores the Strings used by the User Interface of the application
+#
+
+HierarchicalViewer.Sort_alphabetically=Sort alphabetically
+HierarchicalViewer.Sort_unalphabetically=Sort unalphabetically
+PoolManager.Sort_alphabetically=Sort alphabetically
+PoolManager.Sort_unalphabetically=Sort unalphabetically
+SearchContentProvider.Search=Search
+SearchViewer.Type_Column=Type
+SearchViewer.Name_Column=Name
+SearchViewer.Schema_Column=Schema
+SearchViewer.Search_Name=Name
+SearchContentProvider.Search_(=Search (
+SearchContentProvider.Results)=\ results)
+SearchViewer.Search_All_metadata=All metadata
+SearchViewer.Search_OID=OID
+SearchViewer.Search_Description=Description

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/wizards/messages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/wizards/messages.properties?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/wizards/messages.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/org/apache/directory/ldapstudio/schemas/view/wizards/messages.properties Thu Nov 16 08:05:20 2006
@@ -0,0 +1,47 @@
+#
+#  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.  
+
+#
+# This file stores the Strings used by the User Interface of the application
+#
+
+CreateANewAttributeTypeWizardPage.Page_Title=Create a new attribute type
+CreateANewObjectClassWizardPage.Page_Title=Create a new object class
+CreateANewObjectClassWizardPage.Malforme_OID=Malformed OID
+CreateANewSchemaWizardPage.Page_Description=This wizard creates a new schema.
+CreateANewAttributeTypeWizardPage.Page_Description=This wizard creates a new attribute type.
+CreateANewSchemaWizardPage.A_name_must_be_specified=A name must be specified
+CreateANewAttributeTypeWizardPage.Prefix_with_the_default_OID=Prefix with the default OID
+CreateANewAttributeTypeWizardPage.OID=&OID :
+CreateANewSchemaWizardPage.Page_Title=Create a new schema
+CreateANewObjectClassWizardPage.OID=&OID :
+CreateANewSchemaWizardPage.Name=&Name :
+CreateANewObjectClassWizardPage.Name=&Name :
+CreateANewAttributeTypeWizardPage.Name=&Name :
+CreateANewAttributeTypeWizardPage.An_OID_must_be_specified=An OID must be specified
+CreateANewAttributeTypeWizardPage.Malformed_OID=Malformed OID
+CreateANewObjectClassWizardPage.Page_Description=This wizard creates a new object class.
+CreateANewAttributeTypeWizardPage.A_name_must_be_specified=A name must be specified
+CreateANewObjectClassWizardPage.Prefix_with_the_default_OID=Prefix with the default OID
+CreateANewObjectClassWizardPage.An_OID_must_be_specified=An OID must be specified
+CreateANewObjectClassWizardPage.A_name_must_be_specified=A name must be specified
+CreateANewAttributeTypeWizardPage.An_element_of_the_same_OID_already_exists=An element of the same OID already exists
+CreateANewObjectClassWizardPage.An_element_of_the_same_OID_already_exists=An element of the same OID already exists
+CreateANewAttributeTypeWizardPage.An_attribute_type_of_the_same_name_already_exists=An attribute type of the same name already exists
+CreateANewSchemaWizardPage.A_schema_of_the_same_name_is_already_loaded_in_the_pool=A schema of the same name is already loaded in the pool
+CreateANewObjectClassWizardPage.An_object_class_of_the_same_name_already_exists=An object class of the same name already exists

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/plugin.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/plugin.properties?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/plugin.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/main/resources/plugin.properties Thu Nov 16 08:05:20 2006
@@ -0,0 +1,85 @@
+#
+#  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.  
+
+#
+# This file stores the Strings used by the User Interface of the application
+#
+
+# Contains translated Strings for the Schemas plugin
+
+ldapstudio-schemas-plugin.perspective.schemas.name=Schemas
+
+ldapstudio-schemas-plugin.views.hierarchy.name=Hierarchy
+ldapstudio-schemas-plugin.views.schemas.name=Schemas
+ldapstudio-schemas-plugin.views.search.name=Search
+
+ldapstudio-schemas-plugin.commands.openalocalschema.name=Open a local schema
+ldapstudio-schemas-plugin.commands.openalocalschema.description=Opens a local schema
+ldapstudio-schemas-plugin.commands.saveselectedschema.name=Save selected schema
+ldapstudio-schemas-plugin.commands.saveselectedschema.description=Saves the selected schema
+ldapstudio-schemas-plugin.commands.saveselectedschemaas.name=Save selected schema as...
+ldapstudio-schemas-plugin.commands.saveselectedschemaas.description=Saves the selected schema as...
+ldapstudio-schemas-plugin.commands.saveallschemas.name=Save all schemas
+ldapstudio-schemas-plugin.commands.saveallschemas.description=Saves all schemas
+ldapstudio-schemas-plugin.commands.removeselectedschema.name=Remove selected schema from the pool
+ldapstudio-schemas-plugin.commands.removeselectedschema.description=Removes selected schema from the pool
+ldapstudio-schemas-plugin.commands.viewschemasourcecode.name=View schema source code
+ldapstudio-schemas-plugin.commands.viewschemasourcecode.description=Open source code page of the selected schema
+ldapstudio-schemas-plugin.commands.delete.name=Delete selected item
+ldapstudio-schemas-plugin.commands.delete.description=Deletes the selected item
+ldapstudio-schemas-plugin.commands.createanewschema.name=Create a new schema
+ldapstudio-schemas-plugin.commands.createanewschema.description=Creates a new schema
+ldapstudio-schemas-plugin.commands.createanewobjectclass.name=Create a new object class
+ldapstudio-schemas-plugin.commands.createanewobjectclass.description=Creates a new object class
+ldapstudio-schemas-plugin.commands.createanewattributetype.name=Create a new attribute type
+ldapstudio-schemas-plugin.commands.createanewattributetype.description=Creates a new attribute type
+ldapstudio-schemas-plugin.commands.sorthierarchicalviewer.name=Sort Hierarchical Viewer
+ldapstudio-schemas-plugin.commands.sorthierarchicalviewer.description=Sorts the Hierarchical Viewer
+ldapstudio-schemas-plugin.commands.sortpoolmanager.name=Sort Pool Manager
+ldapstudio-schemas-plugin.commands.sortpoolmanager.description=Sorts the Pool Manager
+ldapstudio-schemas-plugin.commands.category.name=LDAPStudio Category
+
+ldapstudio-schemas-plugin.editors.objectclassformeditor.name=Object Class Form Editor
+ldapstudio-schemas-plugin.editors.attributetypeformeditor.name=Attribute Type Form Editor
+ldapstudio-schemas-plugin.editors.schemaformeditor.name=Schema Form Editor
+
+ldapstudio-schemas-plugin.wizards.createanewschema.name=Create a new schema
+ldapstudio-schemas-plugin.wizards.createanewobjectclass.name=Create a new object class
+ldapstudio-schemas-plugin.wizards.createanewattributetype.name=Create a new attribute type
+
+ldapstudio-schemas-plugin.preferencepages.objectclassandattributetype.name=ObjectClass And AttributeType
+ldapstudio-schemas-plugin.preferencepages.schema.name=Schema
+
+ldapstudio-schemas-plugin.actionsets.actionset.label=Schema Plugin ActionSet
+ldapstudio-schemas-plugin.actionsets.menu.schemas.label=Schemas
+ldapstudio-schemas-plugin.actionsets.action.removeselectedschema.label=Remove selected schema
+ldapstudio-schemas-plugin.actionsets.action.removeselectedschema.tooltip=Removes the selected schema
+ldapstudio-schemas-plugin.actionsets.action.openaschemafile.label=Open a schema file
+ldapstudio-schemas-plugin.actionsets.action.openaschemafile.tooltip=Opens a schema file
+ldapstudio-schemas-plugin.actionsets.action.saveschemaas.label=Save schema as...
+ldapstudio-schemas-plugin.actionsets.action.saveschemaas.tooltip=Saves schema as...
+ldapstudio-schemas-plugin.actionsets.action.saveschema.label=Save schema
+ldapstudio-schemas-plugin.actionsets.action.saveschema.tooltip=Saves schema
+ldapstudio-schemas-plugin.actionsets.action.deleteselecteditem.label=Delete selected item
+ldapstudio-schemas-plugin.actionsets.action.deleteselecteditem.tooltip=Deletes selected item
+ldapstudio-schemas-plugin.actionsets.action.createanewschema.label=Create a new schema
+ldapstudio-schemas-plugin.actionsets.action.createanewschema.tooltip=Creates a new schema
+ldapstudio-schemas-plugin.actionsets.action.createanewobjectclass.label=Create a new object class
+ldapstudio-schemas-plugin.actionsets.action.createanewobjectclass.tooltip=Creates a new object class
+ldapstudio-schemas-plugin.actionsets.action.createanewattributetype.label=Create a new attribute type
+ldapstudio-schemas-plugin.actionsets.action.createanewattributetype.tooltip=Creates a new attribute type

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/AllTests.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/AllTests.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/AllTests.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/AllTests.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,50 @@
+/*
+ *  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.schemas.tests;
+
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * Main test class -> activate all the other tests
+ *
+ */
+public class AllTests
+{
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite( "Test for org.apache.directory.ldapstudio.tests" ); //$NON-NLS-1$
+        //$JUnit-BEGIN$
+        suite.addTestSuite( ObjectClassTest.class );
+        suite.addTestSuite( AttributeTypeTest.class );
+        suite.addTestSuite( SchemaPoolTest.class );
+        suite.addTestSuite( PoolListenerTest.class );
+        suite.addTestSuite( SchemaListenerTest.class );
+        suite.addTestSuite( SchemaElementListenerTest.class );
+        suite.addTestSuite( OIDTest.class );
+        //$JUnit-END$
+        return suite;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/AttributeTypeTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/AttributeTypeTest.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/AttributeTypeTest.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/AttributeTypeTest.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,126 @@
+/*
+ *  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.schemas.tests;
+
+
+import junit.framework.TestCase;
+
+import org.apache.directory.ldapstudio.schemas.model.AttributeType;
+import org.apache.directory.ldapstudio.schemas.model.Schema;
+import org.apache.directory.server.core.tools.schema.AttributeTypeLiteral;
+
+
+/**
+ * Attribute Type tests
+ *
+ */
+public class AttributeTypeTest extends TestCase
+{
+
+    AttributeTypeLiteral literal;
+    Schema schema;
+    final String name = "toto"; //$NON-NLS-1$
+    final String oid = "1.2.3"; //$NON-NLS-1$
+    final String desc = "toto description"; //$NON-NLS-1$
+    final String equality = "equ1"; //$NON-NLS-1$
+
+
+    public void setUp()
+    {
+        literal = new AttributeTypeLiteral( oid );
+        literal.setNames( new String[]
+            { name } );
+        literal.setDescription( desc );
+        literal.setCollective( true );
+        literal.setEquality( equality );
+        schema = new Schema( "test" ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * Tries to create a new attribute type
+     * @throws Exception
+     */
+    public void testCreateAttributeTypeFromLiteral() throws Exception
+    {
+        AttributeType at = new AttributeType( literal, schema );
+    }
+
+
+    /**
+     * Tries to access the underlying litteral issued by the parser from the
+     * attribute type instance
+     * @throws Exception
+     */
+    public void testAccessLiteralFromAttributeType() throws Exception
+    {
+        AttributeType at = new AttributeType( literal, schema );
+        assertEquals( at.getLiteral(), literal );
+    }
+
+
+    /**
+     * Tries to access an attribute type's related schema
+     * @throws Exception
+     */
+    public void testAccessSchemaFromAttributeType() throws Exception
+    {
+        AttributeType at = new AttributeType( literal, schema );
+        assertEquals( at.getOriginatingSchema(), schema );
+    }
+
+
+    /**
+     * Tries the various wrapper methods
+     * @throws Exception
+     */
+    public void testWrapperMethods() throws Exception
+    {
+        AttributeType at = new AttributeType( literal, schema );
+        assertEquals( at.getOid(), oid );
+        assertEquals( at.getDescription(), desc );
+        assertEquals( at.getEquality(), equality );
+    }
+
+
+    /**
+     * Tests the toString() method
+     * @throws Exception
+     */
+    public void testToString() throws Exception
+    {
+        AttributeType at = new AttributeType( literal, schema );
+        assertEquals( at.toString(), name );
+    }
+
+
+    /**
+     * Tests the write method
+     * @throws Exception
+     */
+    public void testWrite() throws Exception
+    {
+        AttributeType at1 = new AttributeType( literal, schema );
+        AttributeType at2 = new AttributeType( literal, schema );
+
+        assertEquals( at1.write(), at2.write() );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/OIDTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/OIDTest.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/OIDTest.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/OIDTest.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,59 @@
+/*
+ *  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.schemas.tests;
+
+
+import org.apache.directory.ldapstudio.schemas.model.OID;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Tests OID validation
+ *
+ */
+public class OIDTest extends TestCase
+{
+
+    public void testValid() throws Exception
+    {
+        assertTrue( OID.validate( "1" ) ); //$NON-NLS-1$
+        assertTrue( OID.validate( "1.2" ) ); //$NON-NLS-1$
+        assertTrue( OID.validate( "1.2.3" ) ); //$NON-NLS-1$
+        assertTrue( OID.validate( "123.456.789" ) ); //$NON-NLS-1$
+        assertTrue( OID.validate( "123.456.789.1" ) ); //$NON-NLS-1$
+        assertTrue( OID.validate( "0.0.0.0.0.0.0" ) ); //$NON-NLS-1$
+
+    }
+
+
+    public void testInvalid() throws Exception
+    {
+        assertFalse( OID.validate( "" ) ); //$NON-NLS-1$
+        assertFalse( OID.validate( "." ) ); //$NON-NLS-1$
+        assertFalse( OID.validate( ".1" ) ); //$NON-NLS-1$
+        assertFalse( OID.validate( "1." ) ); //$NON-NLS-1$
+        assertFalse( OID.validate( "0..0" ) ); //$NON-NLS-1$
+        assertFalse( OID.validate( "1.2.3....5.6" ) ); //$NON-NLS-1$
+        assertFalse( OID.validate( "...." ) ); //$NON-NLS-1$
+        assertFalse( OID.validate( "1.2.3.4.5..6" ) ); //$NON-NLS-1$
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/ObjectClassTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/ObjectClassTest.java?view=auto&rev=475786
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/ObjectClassTest.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-schemas-plugin/src/test/java/org/apache/directory/ldapstudio/schemas/tests/ObjectClassTest.java Thu Nov 16 08:05:20 2006
@@ -0,0 +1,132 @@
+/*
+ *  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.schemas.tests;
+
+
+import junit.framework.TestCase;
+
+import org.apache.directory.ldapstudio.schemas.model.ObjectClass;
+import org.apache.directory.ldapstudio.schemas.model.Schema;
+import org.apache.directory.server.core.tools.schema.ObjectClassLiteral;
+
+
+public class ObjectClassTest extends TestCase
+{
+
+    ObjectClassLiteral literal;
+    Schema schema;
+    final String name = "toto"; //$NON-NLS-1$
+    final String oid = "1.2.3"; //$NON-NLS-1$
+    final String desc = "toto description"; //$NON-NLS-1$
+    final String[] superiors = new String[]
+        { "titi", "tata", "tutu" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+    final String[] may = new String[]
+        { "att1", "att2", "att3" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+    final String[] must = new String[]
+        { "att4", "att5", "att6" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+
+    public void setUp()
+    {
+        literal = new ObjectClassLiteral( oid );
+        literal.setNames( new String[]
+            { name } );
+        literal.setDescription( desc );
+        literal.setSuperiors( superiors );
+        literal.setMay( may );
+        literal.setMust( must );
+
+        schema = new Schema( "test" ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * Tries to create a new Object Class
+     * @throws Exception
+     */
+    public void testCreateObjectClassFromLiteral() throws Exception
+    {
+        ObjectClass oc = new ObjectClass( literal, schema );
+    }
+
+
+    /**
+     * Tries to access the underlying litteral issued by the parser from the
+     * object class instance
+     * @throws Exception
+     */
+    public void testAccessLiteralFromObjectClass() throws Exception
+    {
+        ObjectClass oc = new ObjectClass( literal, schema );
+        assertEquals( oc.getLiteral(), literal );
+    }
+
+
+    /**
+     * Tries to access an object-class' related schema
+     * @throws Exception
+     */
+    public void testAccessSchemaFromObjectClass() throws Exception
+    {
+        ObjectClass oc = new ObjectClass( literal, schema );
+        assertEquals( oc.getOriginatingSchema(), schema );
+    }
+
+
+    /**
+     * Tries the various wrapper methods
+     * @throws Exception
+     */
+    public void testWrapperMethods() throws Exception
+    {
+        ObjectClass oc = new ObjectClass( literal, schema );
+        assertEquals( oc.getOid(), oid );
+        assertEquals( oc.getDescription(), desc );
+        assertEquals( oc.getSuperiors(), superiors );
+        assertEquals( oc.getMay(), may );
+        assertEquals( oc.getMust(), must );
+    }
+
+
+    /**
+     * Tests the toString() method
+     * @throws Exception
+     */
+    public void testToString() throws Exception
+    {
+        ObjectClass oc = new ObjectClass( literal, schema );
+        assertEquals( oc.toString(), name );
+    }
+
+
+    /**
+     * Tests the write method
+     * @throws Exception
+     */
+    public void testWrite() throws Exception
+    {
+        ObjectClass oc1 = new ObjectClass( literal, schema );
+        ObjectClass oc2 = new ObjectClass( literal, schema );
+
+        assertEquals( oc1.write(), oc2.write() );
+    }
+
+}



Mime
View raw message