directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r488345 [2/12] - in /directory/sandbox/pamarcelot/ldapstudio: ldapstudio-browser-core/ ldapstudio-browser-core/META-INF/ ldapstudio-browser-core/about_files/ ldapstudio-browser-core/lib/ ldapstudio-browser-core/src/ ldapstudio-browser-core/...
Date Mon, 18 Dec 2006 17:15:08 GMT
Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCoreMessages.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,401 @@
+/*
+ *  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.browser.core;
+
+
+import org.eclipse.osgi.util.NLS;
+
+
+public class BrowserCoreMessages extends NLS
+{
+    private static final String BUNDLE_NAME = "org.apache.directory.ldapstudio.browser.core.browsercoremessages"; //$NON-NLS-1$
+
+
+    private BrowserCoreMessages()
+    {
+    }
+
+    static
+    {
+        // initialize resource bundle
+        NLS.initializeMessages( BUNDLE_NAME, BrowserCoreMessages.class );
+    }
+
+    public static String copy_n_of_s;
+
+    public static String event__added_att_to_dn;
+
+    public static String event__deleted_att_from_dn;
+
+    public static String event__dn_attributes_initialized;
+
+    public static String event__dn_children_initialized;
+
+    public static String event__empty_value_added_to_att_at_dn;
+
+    public static String event__empty_value_deleted_from_att_at_dn;
+
+    public static String event__added_dn;
+
+    public static String event__deleted_dn;
+
+    public static String event__moved_oldrdn_from_oldparent_to_newparent;
+
+    public static String event__renamed_olddn_to_newdn;
+
+    public static String event__added_val_to_att_at_dn;
+
+    public static String event__deleted_val_from_att_at_dn;
+
+    public static String event__replaced_oldval_by_newval_at_att_at_dn;
+
+    public static String event__renamed_oldval_by_newval_at_dn;
+
+    public static String jobs__copy_entries_source_and_target_are_equal;
+
+    public static String model__empty_connection;
+
+    public static String model__empty_entry;
+
+    public static String model__empty_attribute;
+
+    public static String model__empty_value;
+
+    public static String model__empty_url;
+
+    public static String model__empty_dn;
+
+    public static String model__empty_rdn;
+
+    public static String model__empty_password;
+
+    public static String model__invalid_url;
+
+    public static String model__invalid_protocol;
+
+    public static String model__attribute_does_not_exist;
+
+    public static String model__attribute_already_exists;
+
+    public static String model__attributes_entry_is_not_myself;
+
+    public static String model__url_no_attributes;
+
+    public static String model__url_no_dn;
+
+    public static String model__url_no_extensions;
+
+    public static String model__url_no_filter;
+
+    public static String model__url_no_host;
+
+    public static String model__url_no_port;
+
+    public static String model__url_no_protocol;
+
+    public static String model__url_no_scope;
+
+    public static String model__values_attribute_is_not_myself;
+
+    public static String model__move_between_different_connections_not_supported;
+
+    public static String model__copied_n_entries;
+
+    public static String model__deleted_n_entries;
+
+    public static String model__retrieved_n_entries;
+
+    public static String model__retrieved_1_entry;
+
+    public static String model__no_connection_provider;
+
+    public static String model__connecting;
+
+    public static String model__binding;
+
+    public static String model__loading_rootdse;
+
+    public static String model__error_loading_rootdse;
+
+    public static String model__setting_base_dn;
+
+    public static String model__error_setting_base_dn;
+
+    public static String model__error_setting_metadata;
+
+    public static String model__loading_schema;
+
+    public static String model__no_schema_information;
+
+    public static String model__missing_schema_location;
+
+    public static String model__error_loading_schema;
+
+    public static String model__no_such_entry;
+
+    public static String model__error_logging_modification;
+
+    public static String model__no_hash;
+
+    public static String model__unsupported_hash;
+
+    public static String ldif__imported_n_entries_m_errors;
+
+    public static String ldif__n_errors_see_logfile;
+
+    public static String ldif__imported_into_host_port_on_date;
+
+    public static String ldif__import_into_host_port_failed_on_date;
+
+    public static String ldif__error_msg;
+
+    public static String model__no_connection;
+
+    public static String model__no_auth_handler;
+
+    public static String model__no_credentials;
+
+    public static String model__no_referral_handler;
+
+    public static String model__no_referral_connection;
+
+    public static String model__invalid_record;
+
+    public static String model__unknown_host;
+
+    public static String jobs__error_occurred;
+
+    public static String jobs__check_bind_name;
+
+    public static String jobs__check_bind_task;
+
+    public static String jobs__check_bind_error;
+
+    public static String jobs__check_network_name;
+
+    public static String jobs__check_network_task;
+
+    public static String jobs__check_network_error;
+
+    public static String jobs__fetch_basedns_name;
+
+    public static String jobs__fetch_basedns_task;
+
+    public static String jobs__fetch_basedns_error;
+
+    public static String jobs__copy_entries_name_1;
+
+    public static String jobs__copy_entries_name_n;
+
+    public static String jobs__copy_entries_task_1;
+
+    public static String jobs__copy_entries_task_n;
+
+    public static String jobs__copy_entries_error_1;
+
+    public static String jobs__copy_entries_error_n;
+
+    public static String jobs__create_entry_name_1;
+
+    public static String jobs__create_entry_name_n;
+
+    public static String jobs__create_entry_task_1;
+
+    public static String jobs__create_entry_task_n;
+
+    public static String jobs__create_entry_error_1;
+
+    public static String jobs__create_entry_error_n;
+
+    public static String jobs__create_values_name_1;
+
+    public static String jobs__create_values_name_n;
+
+    public static String jobs__create_values_task_1;
+
+    public static String jobs__create_values_task_n;
+
+    public static String jobs__create_values_error_1;
+
+    public static String jobs__create_values_error_n;
+
+    public static String jobs__delete_attributes_name_1;
+
+    public static String jobs__delete_attributes_name_n;
+
+    public static String jobs__delete_attributes_task_1;
+
+    public static String jobs__delete_attributes_task_n;
+
+    public static String jobs__delete_attributes_error_1;
+
+    public static String jobs__delete_attributes_error_n;
+
+    public static String jobs__delete_entries_name_1;
+
+    public static String jobs__delete_entries_name_n;
+
+    public static String jobs__delete_entries_task_1;
+
+    public static String jobs__delete_entries_task_n;
+
+    public static String jobs__delete_entries_error_1;
+
+    public static String jobs__delete_entries_error_n;
+
+    public static String jobs__execute_ldif_name;
+
+    public static String jobs__execute_ldif_task;
+
+    public static String jobs__execute_ldif_error;
+
+    public static String jobs__export_cvs_error;
+
+    public static String jobs__export_csv_name;
+
+    public static String jobs__export_csv_task;
+
+    public static String jobs__export_ldif_name;
+
+    public static String jobs__export_ldif_task;
+
+    public static String jobs__export_ldif_error;
+
+    public static String jobs__export_progress;
+
+    public static String jobs__progressmonitor_check_cancellation;
+
+    public static String jobs__progressmonitor_report_progress;
+
+    public static String jobs__export_xls_name;
+
+    public static String jobs__export_xls_task;
+
+    public static String jobs__export_xls_error;
+
+    public static String jobs__import_ldif_name;
+
+    public static String jobs__import_ldif_task;
+
+    public static String jobs__import_ldif_error;
+
+    public static String jobs__init_entries_title_attandsub;
+
+    public static String jobs__init_entries_title_subonly;
+
+    public static String jobs__init_entries_title_attonly;
+
+    public static String jobs__init_entries_title;
+
+    public static String jobs__init_entries_task;
+
+    public static String jobs__init_entries_progress_att;
+
+    public static String jobs__init_entries_progress_sub;
+
+    public static String jobs__init_entries_progress_subcount;
+
+    public static String jobs__init_entries_error_1;
+
+    public static String jobs__init_entries_error_n;
+
+    public static String jobs__modify_value_name;
+
+    public static String jobs__modify_value_task;
+
+    public static String jobs__modify_value_error;
+
+    public static String jobs__open_connections_name_1;
+
+    public static String jobs__open_connections_name_n;
+
+    public static String jobs__open_connections_task;
+
+    public static String jobs__open_connections_error_1;
+
+    public static String jobs__open_connections_error_n;
+
+    public static String jobs__read_entry_name;
+
+    public static String jobs__read_entry_task;
+
+    public static String jobs__read_entry_error;
+
+    public static String jobs__reload_schemas_name_1;
+
+    public static String jobs__reload_schemas_name_n;
+
+    public static String jobs__reload_schemas_task;
+
+    public static String jobs__reload_schemas_error_1;
+
+    public static String jobs__reload_schemas_error_n;
+
+    public static String jobs__move_entry_name_1;
+
+    public static String jobs__move_entry_name_n;
+
+    public static String jobs__move_entry_task_1;
+
+    public static String jobs__move_entry_task_n;
+
+    public static String jobs__move_entry_error_1;
+
+    public static String jobs__move_entry_error_n;
+
+    public static String jobs__rename_entry_name;
+
+    public static String jobs__rename_entry_task;
+
+    public static String jobs__rename_entry_error;
+
+    public static String jobs__rename_value_name_1;
+
+    public static String jobs__rename_value_name_n;
+
+    public static String jobs__rename_value_task_1;
+
+    public static String jobs__rename_value_task_n;
+
+    public static String jobs__rename_value_error_1;
+
+    public static String jobs__rename_value_error_n;
+
+    public static String jobs__search_name;
+
+    public static String jobs__search_task;
+
+    public static String jobs__search_error_1;
+
+    public static String jobs__search_error_n;
+
+    public static String model__empty_string_value;
+
+    public static String model__empty_binary_value;
+
+    public static String model__invalid_rdn;
+
+    public static String model_filter_missing_closing_parenthesis;
+
+    public static String model_filter_missing_filter_expression;
+
+    // BrowserCoreMessages.bind(BrowserCoreMessages.xxx, new String[]{});
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePlugin.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,152 @@
+/*
+ *  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.browser.core;
+
+
+import org.apache.directory.ldapstudio.browser.core.events.EventPerformanceMeter;
+import org.apache.directory.ldapstudio.browser.core.model.IAuthHandler;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IReferralHandler;
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class BrowserCorePlugin extends Plugin
+{
+
+    // The plugin ID
+    public static final String PLUGIN_ID = "org.apache.directory.ldapstudio.browser.core"; //$NON-NLS-1$
+
+    // The shared instance.
+    private static BrowserCorePlugin plugin;
+
+    // The connection manager
+    private ConnectionManager connectionManager;
+
+    // The credential provider
+    private IAuthHandler authHandler;
+
+    // The connection provider
+    private IReferralHandler referralHandler;
+
+    // The preferences
+    private BrowserCorePreferences preferences;
+
+    private EventPerformanceMeter eventPerformanceMeter;
+
+
+    public BrowserCorePlugin()
+    {
+        super();
+        plugin = this;
+        this.preferences = new BrowserCorePreferences();
+        this.eventPerformanceMeter = new EventPerformanceMeter();
+    }
+
+
+    public void start( BundleContext context ) throws Exception
+    {
+        super.start( context );
+
+        if ( this.connectionManager == null )
+        {
+            this.connectionManager = new ConnectionManager();
+        }
+
+        // this.eventPerformanceMeter.start();
+    }
+
+
+    public void stop( BundleContext context ) throws Exception
+    {
+        super.stop( context );
+
+        if ( this.connectionManager != null )
+        {
+            IConnection[] connections = this.connectionManager.getConnections();
+            for ( int i = 0; i < connections.length; i++ )
+            {
+                connections[i].close();
+            }
+            this.connectionManager = null;
+        }
+
+        // this.eventPerformanceMeter.stop();
+    }
+
+
+    /**
+     * Returns the BrowserPlugin instance.
+     * 
+     * @return The BrowserPlugin instance
+     */
+    public static BrowserCorePlugin getDefault()
+    {
+        return plugin;
+    }
+
+
+    /**
+     * @return The connection mamanger
+     */
+    public ConnectionManager getConnectionManager()
+    {
+        return this.connectionManager;
+    }
+
+
+    /**
+     * 
+     * @return The preferences
+     */
+    public BrowserCorePreferences getCorePreferences()
+    {
+        return this.preferences;
+    }
+
+
+    public IAuthHandler getAuthHandler()
+    {
+        return authHandler;
+    }
+
+
+    public void setAuthHandler( IAuthHandler authHandler )
+    {
+        this.authHandler = authHandler;
+    }
+
+
+    public IReferralHandler getReferralHandler()
+    {
+        return referralHandler;
+    }
+
+
+    public void setReferralHandler( IReferralHandler referralHandler )
+    {
+        this.referralHandler = referralHandler;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferences.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,172 @@
+/*
+ *  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.browser.core;
+
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.directory.ldapstudio.browser.core.model.schema.BinaryAttribute;
+import org.apache.directory.ldapstudio.browser.core.model.schema.BinarySyntax;
+import org.apache.directory.ldapstudio.browser.core.utils.Utils;
+import org.eclipse.core.runtime.Preferences;
+
+
+public class BrowserCorePreferences
+{
+
+    private Set binaryAttributeCache;
+
+
+    public Set getBinaryAttributeOidsAndNames()
+    {
+        if ( this.binaryAttributeCache == null )
+        {
+            this.binaryAttributeCache = new HashSet();
+            BinaryAttribute[] binaryAttributes = this.getBinaryAttributes();
+            for ( int i = 0; i < binaryAttributes.length; i++ )
+            {
+                if ( binaryAttributes[i].getAttributeNumericOidOrName() != null )
+                {
+                    this.binaryAttributeCache.add( binaryAttributes[i].getAttributeNumericOidOrName() );
+                }
+                // if(binaryAttributes[i].getNames() != null) {
+                // for(int ii=0; ii<binaryAttributes[i].getNames().length; ii++)
+                // {
+                // if(binaryAttributes[i].getNames()[ii] != null) {
+                // this.binaryAttributeCache.add(binaryAttributes[i].getNames()[ii]);
+                // }
+                // }
+                // }
+            }
+        }
+        return this.binaryAttributeCache;
+    }
+
+
+    public BinaryAttribute[] getBinaryAttributes()
+    {
+        BinaryAttribute[] binaryAttributes = ( BinaryAttribute[] ) load( BrowserCoreConstants.PREFERENCE_BINARY_ATTRIBUTES );
+        return binaryAttributes;
+    }
+
+
+    public void setBinaryAttributes( BinaryAttribute[] binaryAttributes )
+    {
+        store( BrowserCoreConstants.PREFERENCE_BINARY_ATTRIBUTES, binaryAttributes );
+        this.binaryAttributeCache = null;
+    }
+
+
+    public BinaryAttribute[] getDefaultBinaryAttributes()
+    {
+        BinaryAttribute[] binaryAttributes = ( BinaryAttribute[] ) loadDefault( BrowserCoreConstants.PREFERENCE_BINARY_ATTRIBUTES );
+        return binaryAttributes;
+    }
+
+
+    public void setDefaultBinaryAttributes( BinaryAttribute[] defaultBinaryAttributes )
+    {
+        storeDefault( BrowserCoreConstants.PREFERENCE_BINARY_ATTRIBUTES, defaultBinaryAttributes );
+    }
+
+    private Set binarySyntaxCache;
+
+
+    public Set getBinarySyntaxOids()
+    {
+        if ( this.binarySyntaxCache == null )
+        {
+            this.binarySyntaxCache = new HashSet();
+            BinarySyntax[] binarySyntaxes = this.getBinarySyntaxes();
+            for ( int i = 0; i < binarySyntaxes.length; i++ )
+            {
+                if ( binarySyntaxes[i].getSyntaxNumericOid() != null )
+                {
+                    this.binarySyntaxCache.add( binarySyntaxes[i].getSyntaxNumericOid() );
+                }
+            }
+        }
+        return this.binarySyntaxCache;
+    }
+
+
+    public BinarySyntax[] getBinarySyntaxes()
+    {
+        BinarySyntax[] binarySyntaxes = ( BinarySyntax[] ) load( BrowserCoreConstants.PREFERENCE_BINARY_SYNTAXES );
+        return binarySyntaxes;
+    }
+
+
+    public void setBinarySyntaxes( BinarySyntax[] binarySyntaxes )
+    {
+        store( BrowserCoreConstants.PREFERENCE_BINARY_SYNTAXES, binarySyntaxes );
+        this.binarySyntaxCache = null;
+    }
+
+
+    public BinarySyntax[] getDefaultBinarySyntaxes()
+    {
+        BinarySyntax[] binarySyntaxes = ( BinarySyntax[] ) loadDefault( BrowserCoreConstants.PREFERENCE_BINARY_SYNTAXES );
+        return binarySyntaxes;
+    }
+
+
+    public void setDefaultBinarySyntaxes( BinarySyntax[] defaultBinarySyntaxes )
+    {
+        storeDefault( BrowserCoreConstants.PREFERENCE_BINARY_SYNTAXES, defaultBinarySyntaxes );
+    }
+
+
+    private static Object load( String key )
+    {
+        Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
+        String s = store.getString( key );
+        return Utils.deserialize( s );
+    }
+
+
+    private static void store( String key, Object o )
+    {
+        Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
+        String s = Utils.serialize( o );
+        store.setValue( key, s );
+        BrowserCorePlugin.getDefault().savePluginPreferences();
+    }
+
+
+    private static Object loadDefault( String key )
+    {
+        Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
+        String s = store.getDefaultString( key );
+        return Utils.deserialize( s );
+    }
+
+
+    private static void storeDefault( String key, Object o )
+    {
+        Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
+        String s = Utils.serialize( o );
+        store.setDefault( key, s );
+        BrowserCorePlugin.getDefault().savePluginPreferences();
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/BrowserCorePreferencesInitializer.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,119 @@
+/*
+ *  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.browser.core;
+
+
+import org.apache.directory.ldapstudio.browser.core.model.schema.BinaryAttribute;
+import org.apache.directory.ldapstudio.browser.core.model.schema.BinarySyntax;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+
+
+public class BrowserCorePreferencesInitializer extends AbstractPreferenceInitializer
+{
+
+    public void initializeDefaultPreferences()
+    {
+
+        Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
+
+        store.setDefault( BrowserCoreConstants.PREFERENCE_CHECK_FOR_CHILDREN, true );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_SHOW_ALIAS_AND_REFERRAL_OBJECTS, true );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_FETCH_SUBENTRIES, false );
+
+        store.setDefault( BrowserCoreConstants.PREFERENCE_FORMAT_CSV_ATTRIBUTEDELIMITER, "," );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_FORMAT_CSV_VALUEDELIMITER, "|" );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_FORMAT_CSV_QUOTECHARACTER, "\"" );
+        store
+            .setDefault( BrowserCoreConstants.PREFERENCE_FORMAT_CSV_LINESEPARATOR, BrowserCoreConstants.LINE_SEPARATOR );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_FORMAT_CSV_BINARYENCODING,
+            BrowserCoreConstants.BINARYENCODING_IGNORE );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_FORMAT_CSV_ENCODING, BrowserCoreConstants.DEFAULT_ENCODING );
+
+        store.setDefault( BrowserCoreConstants.PREFERENCE_FORMAT_XLS_VALUEDELIMITER, "|" );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_FORMAT_XLS_BINARYENCODING,
+            BrowserCoreConstants.BINARYENCODING_IGNORE );
+
+        store.setDefault( BrowserCoreConstants.PREFERENCE_LDIF_LINE_WIDTH, 76 );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_LDIF_LINE_SEPARATOR, BrowserCoreConstants.LINE_SEPARATOR );
+        store.setDefault( BrowserCoreConstants.PREFERENCE_LDIF_SPACE_AFTER_COLON, true );
+
+        // default binary attributes
+        BinaryAttribute[] defaultBinaryAttributes = new BinaryAttribute[]
+            { new BinaryAttribute( "0.9.2342.19200300.100.1.7" ), // photo
+                // //$NON-NLS-1$
+                new BinaryAttribute( "0.9.2342.19200300.100.1.53" ), // personalSignature
+                // //$NON-NLS-1$
+                new BinaryAttribute( "0.9.2342.19200300.100.1.55" ), // audio
+                // //$NON-NLS-1$
+                new BinaryAttribute( "0.9.2342.19200300.100.1.60" ), // jpegPhoto
+                // //$NON-NLS-1$
+                new BinaryAttribute( "1.3.6.1.4.1.42.2.27.4.1.8" ), // javaSerializedData
+                // //$NON-NLS-1$
+                new BinaryAttribute( "1.3.6.1.4.1.1466.101.120.35" ), // thumbnailPhoto
+                // //$NON-NLS-1$
+                new BinaryAttribute( "1.3.6.1.4.1.1466.101.120.36" ), // thumbnailLogo
+                // //$NON-NLS-1$
+                new BinaryAttribute( "2.5.4.35" ), // userPassword
+                // //$NON-NLS-1$
+                new BinaryAttribute( "2.5.4.36" ), // userCertificate
+                // //$NON-NLS-1$
+                new BinaryAttribute( "2.5.4.37" ), // cACertificate
+                // //$NON-NLS-1$
+                new BinaryAttribute( "2.5.4.38" ), // authorityRevocationList
+                // //$NON-NLS-1$
+                new BinaryAttribute( "2.5.4.39" ), // certificateRevocationList
+                // //$NON-NLS-1$
+                new BinaryAttribute( "2.5.4.40" ), // crossCertificatePair
+                // //$NON-NLS-1$
+                new BinaryAttribute( "2.5.4.45" ), // x500UniqueIdentifier
+            // //$NON-NLS-1$
+            };
+        BrowserCorePlugin.getDefault().getCorePreferences().setDefaultBinaryAttributes( defaultBinaryAttributes );
+
+        // default binary syntaxes
+        BinarySyntax[] defaultBinarySyntaxes = new BinarySyntax[]
+            { new BinarySyntax( "1.3.6.1.4.1.1466.115.121.1.5" ), // Binary
+                // //$NON-NLS-1$
+                new BinarySyntax( "1.3.6.1.4.1.1466.115.121.1.8" ), // Certificate
+                // //$NON-NLS-1$
+                new BinarySyntax( "1.3.6.1.4.1.1466.115.121.1.9" ), // Certificate
+                // List
+                // //$NON-NLS-1$
+                new BinarySyntax( "1.3.6.1.4.1.1466.115.121.1.10" ), // Certificate
+                // Pair
+                // //$NON-NLS-1$
+                new BinarySyntax( "1.3.6.1.4.1.1466.115.121.1.23" ), // Fax
+                // //$NON-NLS-1$
+                new BinarySyntax( "1.3.6.1.4.1.1466.115.121.1.28" ), // JPEG
+                // //$NON-NLS-1$
+                new BinarySyntax( "1.3.6.1.4.1.1466.115.121.1.40" ), // Octet
+                // String
+                // //$NON-NLS-1$
+                new BinarySyntax( "1.3.6.1.4.1.1466.115.121.1.49" ) // Supported
+            // Algorithm
+            // //$NON-NLS-1$
+            };
+        BrowserCorePlugin.getDefault().getCorePreferences().setDefaultBinarySyntaxes( defaultBinarySyntaxes );
+
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/ConnectionManager.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,457 @@
+/*
+ *  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.browser.core;
+
+
+import java.beans.ExceptionListener;
+import java.beans.XMLDecoder;
+import java.beans.XMLEncoder;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.directory.ldapstudio.browser.core.events.BookmarkUpdateEvent;
+import org.apache.directory.ldapstudio.browser.core.events.BookmarkUpdateListener;
+import org.apache.directory.ldapstudio.browser.core.events.ConnectionRenamedEvent;
+import org.apache.directory.ldapstudio.browser.core.events.ConnectionUpdateEvent;
+import org.apache.directory.ldapstudio.browser.core.events.ConnectionUpdateListener;
+import org.apache.directory.ldapstudio.browser.core.events.EventRegistry;
+import org.apache.directory.ldapstudio.browser.core.events.SearchUpdateEvent;
+import org.apache.directory.ldapstudio.browser.core.events.SearchUpdateListener;
+import org.apache.directory.ldapstudio.browser.core.internal.model.Bookmark;
+import org.apache.directory.ldapstudio.browser.core.internal.model.Connection;
+import org.apache.directory.ldapstudio.browser.core.internal.model.Search;
+import org.apache.directory.ldapstudio.browser.core.model.BookmarkParameter;
+import org.apache.directory.ldapstudio.browser.core.model.ConnectionParameter;
+import org.apache.directory.ldapstudio.browser.core.model.IBookmark;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.ISearch;
+import org.apache.directory.ldapstudio.browser.core.model.SearchParameter;
+import org.apache.directory.ldapstudio.browser.core.model.schema.Schema;
+import org.apache.directory.ldapstudio.browser.core.utils.LdifUtils;
+import org.eclipse.core.runtime.IPath;
+
+
+public class ConnectionManager implements ConnectionUpdateListener, SearchUpdateListener, BookmarkUpdateListener
+{
+
+    private List connectionList;
+
+
+    public ConnectionManager()
+    {
+        this.connectionList = new ArrayList();
+        this.loadConnections();
+        EventRegistry.addConnectionUpdateListener( this );
+        EventRegistry.addSearchUpdateListener( this );
+        EventRegistry.addBookmarkUpdateListener( this );
+    }
+
+
+    public static final String getSchemaCacheFileName( String connectionName )
+    {
+        return BrowserCorePlugin.getDefault().getStateLocation().append(
+            "schema-" + toSaveString( connectionName ) + ".ldif" ).toOSString(); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+
+    public static final String getModificationLogFileName( String connectionName )
+    {
+        IPath p = BrowserCorePlugin.getDefault().getStateLocation().append( "logs" ); //$NON-NLS-1$
+        File file = p.toFile();
+        if ( !file.exists() )
+        {
+            file.mkdir();
+        }
+        return p.append( "modifications-" + toSaveString( connectionName ) + "-%u-%g.ldiflog" ).toOSString(); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+
+    public static final String getConnectionStoreFileName()
+    {
+        return BrowserCorePlugin.getDefault().getStateLocation().append( "connections.xml" ).toOSString(); //$NON-NLS-1$
+    }
+
+
+    private static String toSaveString( String s )
+    {
+
+        if ( s == null )
+            return null;
+
+        byte[] b = LdifUtils.utf8encode( s );
+        StringBuffer sb = new StringBuffer();
+        for ( int i = 0; i < b.length; i++ )
+        {
+
+            if ( b[i] == '-' || b[i] == '_' || ( '0' <= b[i] && b[i] <= '9' ) || ( 'A' <= b[i] && b[i] <= 'Z' )
+                || ( 'a' <= b[i] && b[i] <= 'z' ) )
+            {
+                sb.append( ( char ) b[i] );
+            }
+            else
+            {
+                int x = ( int ) b[i];
+                if ( x < 0 )
+                    x = 256 + x;
+                String t = Integer.toHexString( x );
+                if ( t.length() == 1 )
+                    t = "0" + t; //$NON-NLS-1$
+                sb.append( t );
+            }
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * Adds the connection to the end of the connection list. If there is
+     * already a connection with this name, the new connection is renamed.
+     * 
+     * @param connection
+     */
+    public void addConnection( IConnection connection )
+    {
+        this.addConnection( this.connectionList.size(), connection );
+    }
+
+
+    /**
+     * Adds the connection at the specified position of the connection list.
+     * If there is already a connection with this name the new connection is
+     * renamed.
+     * 
+     * @param index
+     * @param connection
+     */
+    public void addConnection( int index, IConnection connection )
+    {
+        if ( this.getConnection( connection.getName() ) != null )
+        {
+            String newConnectionName = BrowserCoreMessages.bind( BrowserCoreMessages.copy_n_of_s,
+                "", connection.getName() ); //$NON-NLS-1$
+            for ( int i = 2; this.getConnection( newConnectionName ) != null; i++ )
+            {
+                newConnectionName = BrowserCoreMessages.bind( BrowserCoreMessages.copy_n_of_s,
+                    i + " ", connection.getName() ); //$NON-NLS-1$
+            }
+            connection.getConnectionParameter().setName( newConnectionName );
+        }
+
+        this.connectionList.add( index, connection );
+        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( connection,
+            ConnectionUpdateEvent.CONNECTION_ADDED ), this );
+    }
+
+
+    public IConnection getConnection( String name )
+    {
+        for ( Iterator it = this.connectionList.iterator(); it.hasNext(); )
+        {
+            IConnection conn = ( IConnection ) it.next();
+            if ( conn.getName().equals( name ) )
+            {
+                return conn;
+            }
+        }
+        return null;
+    }
+
+
+    public int indexOf( IConnection connection )
+    {
+        return this.connectionList.indexOf( connection );
+    }
+
+
+    public void removeConnection( IConnection conn )
+    {
+        this.connectionList.remove( conn );
+        EventRegistry.fireConnectionUpdated(
+            new ConnectionUpdateEvent( conn, ConnectionUpdateEvent.CONNECTION_REMOVED ), this );
+    }
+
+
+    public IConnection[] getConnections()
+    {
+        return ( IConnection[] ) this.connectionList.toArray( new IConnection[0] );
+    }
+
+
+    public int getConnectionCount()
+    {
+        return this.connectionList.size();
+    }
+
+
+    public void connectionUpdated( ConnectionUpdateEvent connectionUpdateEvent )
+    {
+        if ( connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.CONNECTION_ADDED
+            || connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.CONNECTION_REMOVED
+            || connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.CONNECTION_RENAMED
+            || connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.CONNECTION_PARAMETER_UPDATED )
+        {
+            this.saveConnections();
+        }
+
+        if ( connectionUpdateEvent instanceof ConnectionRenamedEvent )
+        {
+            String oldName = ( ( ConnectionRenamedEvent ) connectionUpdateEvent ).getOldName();
+            String newName = connectionUpdateEvent.getConnection().getName();
+            String oldSchemaFile = getSchemaCacheFileName( oldName );
+            String newSchemaFile = getSchemaCacheFileName( newName );
+            File oldFile = new File( oldSchemaFile );
+            File newFile = new File( newSchemaFile );
+            if ( oldFile.exists() )
+            {
+                oldFile.renameTo( newFile );
+            }
+        }
+        if ( connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.CONNECTION_SCHEMA_LOADED )
+        {
+            this.saveSchema( connectionUpdateEvent.getConnection() );
+        }
+        if ( connectionUpdateEvent.getDetail() == ConnectionUpdateEvent.CONNECTION_REMOVED )
+        {
+            File file = new File( getSchemaCacheFileName( connectionUpdateEvent.getConnection().getName() ) );
+            if ( file.exists() )
+            {
+                file.delete();
+            }
+        }
+    }
+
+
+    public void searchUpdated( SearchUpdateEvent searchUpdateEvent )
+    {
+        if ( searchUpdateEvent.getDetail() == SearchUpdateEvent.SEARCH_ADDED
+            || searchUpdateEvent.getDetail() == SearchUpdateEvent.SEARCH_REMOVED
+            || searchUpdateEvent.getDetail() == SearchUpdateEvent.SEARCH_RENAMED
+            || searchUpdateEvent.getDetail() == SearchUpdateEvent.SEARCH_PARAMETER_UPDATED )
+        {
+            this.saveConnections();
+        }
+    }
+
+
+    public void bookmarkUpdated( BookmarkUpdateEvent bookmarkUpdateEvent )
+    {
+        if ( bookmarkUpdateEvent.getDetail() == BookmarkUpdateEvent.BOOKMARK_ADDED
+            || bookmarkUpdateEvent.getDetail() == BookmarkUpdateEvent.BOOKMARK_REMOVED
+            || bookmarkUpdateEvent.getDetail() == BookmarkUpdateEvent.BOOKMARK_UPDATED )
+        {
+            this.saveConnections();
+        }
+    }
+
+
+    private void saveConnections()
+    {
+        Object[][] object = new Object[connectionList.size()][3];
+
+        Iterator connectionIterator = connectionList.iterator();
+        for ( int i = 0; connectionIterator.hasNext(); i++ )
+        {
+            IConnection conn = ( IConnection ) connectionIterator.next();
+            ConnectionParameter connectionParameters = conn.getConnectionParameter();
+            ISearch[] searches = conn.getSearchManager().getSearches();
+            SearchParameter[] searchParameters = new SearchParameter[searches.length];
+            for ( int k = 0; k < searches.length; k++ )
+            {
+                searchParameters[k] = searches[k].getSearchParameter();
+            }
+            IBookmark[] bookmarks = conn.getBookmarkManager().getBookmarks();
+            BookmarkParameter[] bookmarkParameters = new BookmarkParameter[bookmarks.length];
+            for ( int k = 0; k < bookmarks.length; k++ )
+            {
+                bookmarkParameters[k] = bookmarks[k].getBookmarkParameter();
+            }
+
+            // object[i][0] = conn.getClass().getName();
+            object[i][0] = connectionParameters;
+            object[i][1] = searchParameters;
+            object[i][2] = bookmarkParameters;
+        }
+
+        // long t1 = System.currentTimeMillis();
+        this.save( object, getConnectionStoreFileName() );
+        // long t2 = System.currentTimeMillis();
+        // System.out.println("Saved connections in " + (t2-t1) + "ms");
+
+    }
+
+
+    private void saveSchema( IConnection connection )
+    {
+        try
+        {
+            String filename = getSchemaCacheFileName( connection.getName() );
+            FileWriter writer = new FileWriter( filename );
+            connection.getSchema().saveToLdif( writer );
+            writer.close();
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+            // BrowserPlugin.getDefault().getExceptionHandler().handleException(e.getMessage(),
+            // e);
+        }
+    }
+
+
+    private void loadConnections()
+    {
+        try
+        {
+            // long t1 = System.currentTimeMillis();
+            Object[][] object = ( Object[][] ) this.load( getConnectionStoreFileName() );
+            // long t2 = System.currentTimeMillis();
+            // System.out.println("Loaded connections in " + (t2-t1) +
+            // "ms");
+
+            if ( object != null )
+            {
+                try
+                {
+                    for ( int i = 0; i < object.length; i++ )
+                    {
+                        IConnection conn = new Connection();
+
+                        ConnectionParameter connectionParameters = ( ConnectionParameter ) object[i][0];
+                        conn.setConnectionParameter( connectionParameters );
+
+                        if ( object[i].length > 1 )
+                        {
+                            SearchParameter[] searchParameters = ( SearchParameter[] ) object[i][1];
+                            for ( int k = 0; k < searchParameters.length; k++ )
+                            {
+                                ISearch search = new Search( conn, searchParameters[k] );
+                                conn.getSearchManager().addSearch( search );
+                            }
+                        }
+
+                        if ( object[i].length > 2 )
+                        {
+                            BookmarkParameter[] bookmarkParameters = ( BookmarkParameter[] ) object[i][2];
+                            for ( int k = 0; k < bookmarkParameters.length; k++ )
+                            {
+                                IBookmark bookmark = new Bookmark( conn, bookmarkParameters[k] );
+                                conn.getBookmarkManager().addBookmark( bookmark );
+                            }
+                        }
+
+                        try
+                        {
+                            String schemaFilename = getSchemaCacheFileName( conn.getName() );
+                            FileReader reader = new FileReader( schemaFilename );
+                            Schema schema = new Schema();
+                            schema.loadFromLdif( reader );
+                            conn.setSchema( schema );
+                        }
+                        catch ( Exception e )
+                        {
+                        }
+
+                        this.connectionList.add( conn );
+                    }
+
+                }
+                catch ( ArrayIndexOutOfBoundsException e )
+                {
+                    // Thrown by decoder.readObject(), signals EOF
+                }
+                catch ( Exception e )
+                {
+                    e.printStackTrace();
+                }
+            }
+        }
+        catch ( Exception e )
+        {
+        }
+    }
+
+
+    private synchronized Object load( String filename )
+    {
+        try
+        {
+            Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
+            XMLDecoder decoder = new XMLDecoder( new BufferedInputStream( ( new FileInputStream( filename ) ) ) );
+            Object object = decoder.readObject();
+            decoder.close();
+            return object;
+        }
+        catch ( IOException ioe )
+        {
+            return null;
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+
+    private synchronized void save( Object object, String filename )
+    {
+        XMLEncoder encoder = null;
+        try
+        {
+            Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
+            encoder = new XMLEncoder( new BufferedOutputStream( new FileOutputStream( filename ) ) );
+
+            encoder.setExceptionListener( new ExceptionListener()
+            {
+
+                public void exceptionThrown( Exception e )
+                {
+                    e.printStackTrace();
+                }
+
+            } );
+
+            encoder.writeObject( object );
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+        }
+        finally
+        {
+            if ( encoder != null )
+            {
+                encoder.close();
+            }
+        }
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/elbecoremessages.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/elbecoremessages.properties?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/elbecoremessages.properties (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/elbecoremessages.properties Mon Dec 18 09:15:00 2006
@@ -0,0 +1,209 @@
+
+copy_n_of_s=Copy {0}of {1}
+
+event__added_att_to_dn=Added {0} to {1}
+event__deleted_att_from_dn=Deleted {0} from {1}
+event__dn_attributes_initialized={0}: attributes initialized
+event__dn_children_initialized={0}: children initialized
+event__empty_value_added_to_att_at_dn=Empty value added to {0} at {1}
+event__empty_value_deleted_from_att_at_dn=Empty value deleted from {0} at {1}
+event__added_dn=Added {0}
+event__deleted_dn=Deleted {0}
+event__moved_oldrdn_from_oldparent_to_newparent=Moved {0} from {1} to {2}
+event__renamed_olddn_to_newdn=Renamed {0} to {1}
+event__added_val_to_att_at_dn=Added {0} to {1} at {2}
+event__deleted_val_from_att_at_dn=Deleted {0} from {1} at {2}
+event__replaced_oldval_by_newval_at_att_at_dn=Replaced {0} by {1} at {2} at {3}
+event__renamed_oldval_by_newval_at_dn=Renamed {0} by {1} at {2}
+
+
+model__empty_connection=Empty Connection is not allowed\!
+model__empty_string_value=<EMPTY STRING VALUE>
+model__empty_binary_value=<EMPTY BINARY VALUE>
+model__empty_entry=Empty Entry is not allowed\!
+model__empty_attribute=Empty Attribute is not allowed\!
+model__empty_value=Empty Value is not allowed\!
+model__empty_url=Empty URL is not allowed\!
+model__empty_dn=Empty DN is not allowed\!
+model__empty_rdn=Empty RDN is not allowed\!
+model__url_no_dn=No DN
+model__empty_password=Empty password is not allowed\!
+model__loading_schema=Loading Schema...
+model__invalid_record=Record is invalid
+model__invalid_rdn=Invalid RDN
+model__invalid_protocol=Invalid protocol
+model__invalid_url=Invalid URL
+model__loading_rootdse=Loading Root DSE...
+model__setting_base_dn=Setting Base DN...
+model__no_such_entry=Entry doesn't exist or wasn't returned from server
+model__binding=Binding...
+model__connecting=Connecting...
+
+model_filter_missing_closing_parenthesis=Missing closing parenthesis ')'
+model_filter_missing_filter_expression=Missing filter expression
+model__attributes_entry_is_not_myself=Attribute's entry isn't myself
+model__values_attribute_is_not_myself=Value's attribute isn't myself
+
+model__no_connection_provider=No connection provider set.
+model__no_connection=No Connection
+model__no_auth_handler=No authentification handler
+model__no_credentials=No credentials
+model__no_referral_handler=No referral handler
+model__no_referral_connection=No referral connection
+model__unknown_host=Unknow Host: 
+model__url_no_host=No host
+model__url_no_port=No port
+model__url_no_scope=No scope
+model__url_no_filter=No filter
+model__error_loading_rootdse=Error occurred while loading root DSE
+model__error_setting_base_dn=Can't set Base DN entry
+model__error_setting_metadata=Can't set Metadata entries
+model__no_schema_information=No schema information returned by server, using default schema.
+model__missing_schema_location=Missing schema location in RootDSE, using default schema.
+model__error_loading_schema=Error occurred while loading schema, using default schema
+model__attribute_does_not_exist=Attribute doesn't exist\!
+model__attribute_already_exists=Attribute already exists\!
+model__error_logging_modification=Error while logging modification
+
+model__move_between_different_connections_not_supported=Move between different connections not supported\!
+model__copied_n_entries=Copied {0} entries
+model__deleted_n_entries=Deleted {0} entries
+model__retrieved_n_entries=Fetched {0} entries
+model__retrieved_1_entry=Fetched 1 entry
+
+
+ldif__imported_n_entries_m_errors=Imported {0} entries, {1} errors
+ldif__n_errors_see_logfile={0} errors occurred, see logfile for details
+ldif__imported_into_host_port_on_date=# Imported into ldap://{0}:{1} on {2}
+ldif__import_into_host_port_failed_on_date=# Import into ldap://{0}:{1} failed on {2}
+ldif__error_msg=# ERROR: {0}
+
+model__unsupported_hash=Unsupported hash method
+model__url_no_protocol=No protocol
+model__url_no_attributes=No attributes
+model__url_no_extensions=No extensions
+model__no_hash=Plaintext
+
+jobs__error_occurred=Error occurred
+jobs__progressmonitor_check_cancellation=Check Cancellation
+jobs__progressmonitor_report_progress=Report Progress
+
+jobs__search_name=Search
+jobs__search_task=Performing search {0}
+jobs__search_error_1=Error while performing search
+jobs__search_error_n=Error while performing searches
+
+jobs__check_bind_name=Check Authentication
+jobs__check_bind_task=Checking authentication
+jobs__check_bind_error=The authentication failed
+jobs__check_network_name=Check Network Parameter
+jobs__check_network_task=Checking network parameter
+jobs__check_network_error=The connection failed
+
+jobs__fetch_basedns_name=Fetch Base DNs
+jobs__fetch_basedns_task=Fetching base DNs
+jobs__fetch_basedns_error=Error while fetching base DNs
+
+jobs__copy_entries_name_1=Copy Entry
+jobs__copy_entries_name_n=Copy Entries
+jobs__copy_entries_task_1="Copying {0} to {1}
+jobs__copy_entries_task_n=Copying {0} entries to {1}
+jobs__copy_entries_error_1=Error while copying entry
+jobs__copy_entries_error_n=Error while copying entries
+
+jobs__create_entry_name_1=Create Entry
+jobs__create_entry_name_n=Create Entries
+jobs__create_entry_task_1=Creating entry {0}
+jobs__create_entry_task_n=Creating {0} entries
+jobs__create_entry_error_1=Error while creating entry
+jobs__create_entry_error_n=Error while creating entries
+
+jobs__execute_ldif_name=Execute LDIF
+jobs__execute_ldif_task=Executing LDIF
+jobs__execute_ldif_error=Error while executing LDIF
+
+jobs__create_values_name_1=Create Value
+jobs__create_values_name_n=Create Values
+jobs__create_values_task_1=Creating value
+jobs__create_values_task_n=Creating values
+jobs__create_values_error_1=Error while creating value
+jobs__create_values_error_n=Error while creating values
+
+jobs__delete_attributes_name_1=Delete Attribute
+jobs__delete_attributes_name_n=Delete Attributes
+jobs__delete_attributes_task_1=Deleting attribute
+jobs__delete_attributes_task_n=Deleting attributes
+jobs__delete_attributes_error_1=Error while deleting attribute
+jobs__delete_attributes_error_n=Error while deleting attributes
+
+jobs__delete_entries_name_1=Delete Entry
+jobs__delete_entries_name_n=Delete Entries
+jobs__delete_entries_task_1=Deleting entry {0}
+jobs__delete_entries_task_n=Deleting {0} entries
+jobs__delete_entries_error_1=Error while deleting entry
+jobs__delete_entries_error_n=Error while deleting entries
+
+jobs__reload_schemas_name_1=Reload Schema
+jobs__reload_schemas_name_n=Reload Schemas
+jobs__reload_schemas_task=Reloading schema of {0}
+jobs__reload_schemas_error_1=Error while reloading schema
+jobs__reload_schemas_error_n=Error while reloading schemas
+
+jobs__open_connections_name_1=Open Connection
+jobs__open_connections_name_n=Open Connections
+jobs__open_connections_task=Opening connection {0}
+jobs__open_connections_error_1=Error while opening connection
+jobs__open_connections_error_n=Error while opening connections
+
+jobs__export_ldif_name=LDIF Export
+jobs__export_ldif_task=Exporting LDIF
+jobs__export_ldif_error=Error while exporting LDIF
+jobs__export_cvs_error=Error while exporting CVS
+jobs__export_csv_name=CSV Export
+jobs__export_csv_task=Exporting CSV
+jobs__export_progress=Exported {0} entries
+jobs__export_xls_name=XLS Export
+jobs__export_xls_task=Exporting XLS
+jobs__export_xls_error=Error while exporting XLS
+
+jobs__read_entry_name=Read Entry
+jobs__read_entry_task=Reading entry {0}
+jobs__read_entry_error=Error while reading entry
+
+jobs__move_entry_name_1=Move Entry
+jobs__move_entry_name_n=Move Entries
+jobs__move_entry_task_1=Moving entry
+jobs__move_entry_task_n=Moving entries
+jobs__move_entry_error_1=Error while moving entry
+jobs__move_entry_error_n=Error while moving entries
+
+jobs__rename_entry_name=Rename Entry
+jobs__rename_entry_task=Renaming entry {0}
+jobs__rename_entry_error=Error while renaming entry
+
+jobs__rename_value_name_1=Rename Value
+jobs__rename_value_name_n=Rename Values
+jobs__rename_value_task_1=Renaming Value
+jobs__rename_value_task_n=Renaming Values
+jobs__rename_value_error_1=Error while renaming value
+jobs__rename_value_error_n=Error while renaming values
+
+jobs__import_ldif_name=Import LDIF
+jobs__import_ldif_task=Importing LDIF
+jobs__import_ldif_error=Error while importing LDIF
+
+jobs__init_entries_title_attandsub=Read Attributes and Children
+jobs__init_entries_title_subonly=Read Children
+jobs__init_entries_title_attonly=Read Attributes
+jobs__init_entries_title=Read Entries
+jobs__init_entries_task=Reading entry {0}
+jobs__init_entries_progress_att=Reading attributes of {0}
+jobs__init_entries_progress_sub=Reading children of {0}
+jobs__init_entries_progress_subcount=Got {0} children of {1}, sorting...
+jobs__init_entries_error_1=Error while reading entry
+jobs__init_entries_error_n=Error while reading entries
+
+jobs__modify_value_error=Error while modifying value
+jobs__modify_value_name=Modify Value
+jobs__modify_value_task=Modifying Value
+jobs__copy_entries_source_and_target_are_equal=Source- and target entry are equal\!

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributeAddedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributeAddedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributeAddedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributeAddedEvent.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,56 @@
+/*
+ *  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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages;
+import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IEntry;
+
+
+public class AttributeAddedEvent extends EntryModificationEvent
+{
+
+    private IAttribute addedAttribute;
+
+
+    public AttributeAddedEvent( IConnection connection, IEntry modifiedEntry, IAttribute addedAttribute,
+        ModelModifier source )
+    {
+        super( connection, modifiedEntry, source );
+        this.addedAttribute = addedAttribute;
+    }
+
+
+    public IAttribute getAddedAttribute()
+    {
+        return this.addedAttribute;
+    }
+
+
+    public String toString()
+    {
+        return BrowserCoreMessages.bind( BrowserCoreMessages.event__added_att_to_dn, new String[]
+            { getAddedAttribute().getDescription(), getModifiedEntry().getDn().toString() } );
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributeDeletedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributeDeletedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributeDeletedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributeDeletedEvent.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,55 @@
+/*
+ *  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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages;
+import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IEntry;
+
+
+public class AttributeDeletedEvent extends EntryModificationEvent
+{
+
+    private IAttribute deletedAttribute;
+
+
+    public AttributeDeletedEvent( IConnection connection, IEntry modifiedEntry, IAttribute deletedAttribute,
+        ModelModifier source )
+    {
+        super( connection, modifiedEntry, source );
+        this.deletedAttribute = deletedAttribute;
+    }
+
+
+    public IAttribute getDeletedAttribute()
+    {
+        return this.deletedAttribute;
+    }
+
+
+    public String toString()
+    {
+        return BrowserCoreMessages.bind( BrowserCoreMessages.event__deleted_att_from_dn, new String[]
+            { getDeletedAttribute().getDescription(), getModifiedEntry().getDn().toString() } );
+    }
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributesInitializedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributesInitializedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributesInitializedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/AttributesInitializedEvent.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,43 @@
+/*
+ *  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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages;
+import org.apache.directory.ldapstudio.browser.core.model.IEntry;
+
+
+public class AttributesInitializedEvent extends EntryModificationEvent
+{
+
+    public AttributesInitializedEvent( IEntry initializedEntry, ModelModifier source )
+    {
+        super( initializedEntry.getConnection(), initializedEntry, source );
+    }
+
+
+    public String toString()
+    {
+        return BrowserCoreMessages.bind( BrowserCoreMessages.event__dn_attributes_initialized, new String[]
+            { getModifiedEntry().getDn().toString() } );
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/BookmarkUpdateEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/BookmarkUpdateEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/BookmarkUpdateEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/BookmarkUpdateEvent.java Mon Dec 18 09:15:00 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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.model.IBookmark;
+
+
+public class BookmarkUpdateEvent
+{
+
+    public static final int BOOKMARK_ADDED = 1;
+
+    public static final int BOOKMARK_REMOVED = 2;
+
+    public static final int BOOKMARK_UPDATED = 3;
+
+    private int detail;
+
+    private IBookmark bookmark;
+
+
+    public BookmarkUpdateEvent( IBookmark bookmark, int detail )
+    {
+        this.bookmark = bookmark;
+        this.detail = detail;
+    }
+
+
+    public IBookmark getBookmark()
+    {
+        return bookmark;
+    }
+
+
+    public int getDetail()
+    {
+        return detail;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/BookmarkUpdateListener.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/BookmarkUpdateListener.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/BookmarkUpdateListener.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/BookmarkUpdateListener.java Mon Dec 18 09:15:00 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. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.browser.core.events;
+
+
+public interface BookmarkUpdateListener extends EventListener
+{
+
+    public void bookmarkUpdated( BookmarkUpdateEvent bookmarkUpdateEvent );
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ChildrenInitializedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ChildrenInitializedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ChildrenInitializedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ChildrenInitializedEvent.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,43 @@
+/*
+ *  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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages;
+import org.apache.directory.ldapstudio.browser.core.model.IEntry;
+
+
+public class ChildrenInitializedEvent extends EntryModificationEvent
+{
+
+    public ChildrenInitializedEvent( IEntry initializedEntry, ModelModifier source )
+    {
+        super( initializedEntry.getConnection(), initializedEntry, source );
+    }
+
+
+    public String toString()
+    {
+        return BrowserCoreMessages.bind( BrowserCoreMessages.event__dn_children_initialized, new String[]
+            { getModifiedEntry().getDn().toString() } );
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionRenamedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionRenamedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionRenamedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionRenamedEvent.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,45 @@
+/*
+ *  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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+
+
+public class ConnectionRenamedEvent extends ConnectionUpdateEvent
+{
+
+    private String oldName;
+
+
+    public ConnectionRenamedEvent( IConnection connection, String oldName )
+    {
+        super( connection, CONNECTION_RENAMED );
+        this.oldName = oldName;
+    }
+
+
+    public String getOldName()
+    {
+        return oldName;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionUpdateEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionUpdateEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionUpdateEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionUpdateEvent.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,67 @@
+/*
+ *  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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+
+
+public class ConnectionUpdateEvent
+{
+
+    public static final int CONNECTION_OPENED = 1;
+
+    public static final int CONNECTION_CLOSED = 2;
+
+    public static final int CONNECTION_SCHEMA_LOADED = 3;
+
+    public static final int CONNECTION_ADDED = 4;
+
+    public static final int CONNECTION_REMOVED = 5;
+
+    public static final int CONNECTION_PARAMETER_UPDATED = 6;
+
+    public static final int CONNECTION_RENAMED = 7;
+
+    private int detail;
+
+    private IConnection connection;
+
+
+    public ConnectionUpdateEvent( IConnection connection, int detail )
+    {
+        this.connection = connection;
+        this.detail = detail;
+    }
+
+
+    public IConnection getConnection()
+    {
+        return connection;
+    }
+
+
+    public int getDetail()
+    {
+        return detail;
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionUpdateListener.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionUpdateListener.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionUpdateListener.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/ConnectionUpdateListener.java Mon Dec 18 09:15:00 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. 
+ *  
+ */
+
+package org.apache.directory.ldapstudio.browser.core.events;
+
+
+public interface ConnectionUpdateListener extends EventListener
+{
+
+    public void connectionUpdated( ConnectionUpdateEvent connectionUpdateEvent );
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EmptyValueAddedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EmptyValueAddedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EmptyValueAddedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EmptyValueAddedEvent.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,66 @@
+/*
+ *  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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages;
+import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IEntry;
+import org.apache.directory.ldapstudio.browser.core.model.IValue;
+
+
+public class EmptyValueAddedEvent extends EntryModificationEvent
+{
+
+    private IAttribute modifiedAttribute;
+
+    private IValue addedValue;
+
+
+    public EmptyValueAddedEvent( IConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
+        IValue addedValue, ModelModifier source )
+    {
+        super( connection, modifiedEntry, source );
+        this.modifiedAttribute = modifiedAttribute;
+        this.addedValue = addedValue;
+    }
+
+
+    public IAttribute getModifiedAttribute()
+    {
+        return this.modifiedAttribute;
+    }
+
+
+    public IValue getAddedValue()
+    {
+        return this.addedValue;
+    }
+
+
+    public String toString()
+    {
+        return BrowserCoreMessages.bind( BrowserCoreMessages.event__empty_value_added_to_att_at_dn, new String[]
+            { getModifiedAttribute().getDescription(), getModifiedEntry().getDn().toString() } );
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EmptyValueDeletedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EmptyValueDeletedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EmptyValueDeletedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EmptyValueDeletedEvent.java Mon Dec 18 09:15:00 2006
@@ -0,0 +1,66 @@
+/*
+ *  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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages;
+import org.apache.directory.ldapstudio.browser.core.model.IAttribute;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IEntry;
+import org.apache.directory.ldapstudio.browser.core.model.IValue;
+
+
+public class EmptyValueDeletedEvent extends EntryModificationEvent
+{
+
+    private IAttribute modifiedAttribute;
+
+    private IValue deletedValue;
+
+
+    public EmptyValueDeletedEvent( IConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
+        IValue deletedValue, ModelModifier source )
+    {
+        super( connection, modifiedEntry, source );
+        this.modifiedAttribute = modifiedAttribute;
+        this.deletedValue = deletedValue;
+    }
+
+
+    public IAttribute getModifiedAttribute()
+    {
+        return this.modifiedAttribute;
+    }
+
+
+    public IValue getDeletedValue()
+    {
+        return this.deletedValue;
+    }
+
+
+    public String toString()
+    {
+        return BrowserCoreMessages.bind( BrowserCoreMessages.event__empty_value_deleted_from_att_at_dn, new String[]
+            { getModifiedAttribute().getDescription(), getModifiedEntry().getDn().toString() } );
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EntryAddedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EntryAddedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EntryAddedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EntryAddedEvent.java Mon Dec 18 09:15:00 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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IEntry;
+
+
+public class EntryAddedEvent extends EntryModificationEvent
+{
+
+    public EntryAddedEvent( IConnection connection, IEntry addedEntry, ModelModifier source )
+    {
+        super( connection, addedEntry, source );
+    }
+
+
+    public String toString()
+    {
+        return BrowserCoreMessages.bind( BrowserCoreMessages.event__added_dn, new String[]
+            { getModifiedEntry().getDn().toString() } );
+    }
+
+}

Added: directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EntryDeletedEvent.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EntryDeletedEvent.java?view=auto&rev=488345
==============================================================================
--- directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EntryDeletedEvent.java (added)
+++ directory/sandbox/pamarcelot/ldapstudio/ldapstudio-browser-core/src/org/apache/directory/ldapstudio/browser/core/events/EntryDeletedEvent.java Mon Dec 18 09:15:00 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.browser.core.events;
+
+
+import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages;
+import org.apache.directory.ldapstudio.browser.core.model.IConnection;
+import org.apache.directory.ldapstudio.browser.core.model.IEntry;
+
+
+public class EntryDeletedEvent extends EntryModificationEvent
+{
+
+    public EntryDeletedEvent( IConnection connection, IEntry deletedEntry, ModelModifier source )
+    {
+        super( connection, deletedEntry, source );
+    }
+
+
+    public String toString()
+    {
+        return BrowserCoreMessages.bind( BrowserCoreMessages.event__deleted_dn, new String[]
+            { getModifiedEntry().getDn().toString() } );
+    }
+
+}



Mime
View raw message