directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r823442 - in /directory/studio/trunk: connection-core/src/main/java/org/apache/directory/studio/connection/core/ connection-core/src/main/resources/org/apache/directory/studio/connection/core/ ldapbrowser-common/src/main/java/org/apache/dir...
Date Fri, 09 Oct 2009 07:48:34 GMT
Author: seelmann
Date: Fri Oct  9 07:48:34 2009
New Revision: 823442

URL: http://svn.apache.org/viewvc?rev=823442&view=rev
Log:
o Moved OIDDescription.properties to connection.core project to be able to use it form the
schemaeditor project
o Added lookup to OID descriptions in GenericSchemaConnector

Added:
    directory/studio/trunk/connection-core/src/main/resources/org/apache/directory/studio/connection/core/OIDDescriptions.properties
      - copied unchanged from r823185, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/OIDDescriptions.properties
Removed:
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/OIDDescriptions.properties
Modified:
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/oid/InPlaceOidValueEditor.java

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java?rev=823442&r1=823441&r2=823442&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
(original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
Fri Oct  9 07:48:34 2009
@@ -22,6 +22,8 @@
 
 
 import java.util.Arrays;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
 import javax.naming.InvalidNameException;
 import javax.naming.directory.SearchControls;
@@ -44,6 +46,43 @@
 
     private static final String DOT_DOT_DOT = "..."; //$NON-NLS-1$
 
+    public static ResourceBundle oidDescriptions = null;
+    // Load RessourceBundle with OID descriptions
+    static
+    {
+        try
+        {
+            oidDescriptions = ResourceBundle.getBundle( "org.apache.directory.studio.connection.core.OIDDescriptions"
);
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * Gets the textual OID description for the given numeric OID.
+     * 
+     * @param oid the numeric OID
+     * 
+     * @return the OID description, null if the numeric OID is unknown
+     */
+    public static String getOidDescription( String oid )
+    {
+        if ( oidDescriptions != null )
+        {
+            try
+            {
+                String description = oidDescriptions.getString( oid );
+                return description;
+            }
+            catch ( MissingResourceException ignored )
+            {
+            }
+        }
+        return null;
+    }
 
     /**
      * Shortens the given label to the given maximum length

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java?rev=823442&r1=823441&r2=823442&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
Fri Oct  9 07:48:34 2009
@@ -30,6 +30,7 @@
 
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
+import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
@@ -38,7 +39,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.schema.BinarySyntax;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
-import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.DoubleClickEvent;

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=823442&r1=823441&r2=823442&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
Fri Oct  9 07:48:34 2009
@@ -48,8 +48,8 @@
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescriptionSchemaParser;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescriptionSchemaParser;
+import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription;
-import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldifparser.LdifFormatParameters;
 import org.apache.directory.studio.ldifparser.model.LdifEnumeration;
 import org.apache.directory.studio.ldifparser.model.container.LdifContainer;

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java?rev=823442&r1=823441&r2=823442&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
Fri Oct  9 07:48:34 2009
@@ -29,8 +29,6 @@
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 import java.util.Set;
 
 import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
@@ -66,45 +64,6 @@
 public class Utils
 {
 
-    public static ResourceBundle oidDescriptions = null;
-    // Load RessourceBundle with OID descriptions
-    static
-    {
-        try
-        {
-            oidDescriptions = ResourceBundle.getBundle( "org.apache.directory.studio.ldapbrowser.core.OIDDescriptions"
);
-        }
-        catch ( Exception e )
-        {
-            e.printStackTrace();
-        }
-    }
-
-
-    /**
-     * Gets the textual OID description for the given numeric OID.
-     * 
-     * @param oid the numeric OID
-     * 
-     * @return the OID description, null if the numeric OID is unknown
-     */
-    public static String getOidDescription( String oid )
-    {
-        if ( oidDescriptions != null )
-        {
-            try
-            {
-                String description = oidDescriptions.getString( oid );
-                return description;
-            }
-            catch ( MissingResourceException ignored )
-            {
-            }
-        }
-        return null;
-    }
-
-
     /**
      * Transforms the given DN into a normalized String, usable by the schema cache.
      * The following transformations are performed:

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java?rev=823442&r1=823441&r2=823442&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/RootDSEPropertyPage.java
Fri Oct  9 07:48:34 2009
@@ -23,13 +23,13 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
-import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridLayout;

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java?rev=823442&r1=823441&r2=823442&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
Fri Oct  9 07:48:34 2009
@@ -39,6 +39,7 @@
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescriptionSchemaParser;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper;
@@ -284,10 +285,10 @@
                 SyntaxImpl impl = new SyntaxImpl( syntaxOid );
                 impl.setSchema( schema.getName() );
                 impl.setSchemaObject( schema );
-                // TODO: lookup description/name
-                impl.setDescription( "Dummy" );
+                String oidDescription = Utils.getOidDescription( syntaxOid );
+                impl.setDescription( oidDescription != null ? oidDescription : "Dummy" );
                 impl.setNames( new String[]
-                    { "Dummy" } );
+                    { impl.getDescription() } );
                 schema.addSyntax( impl );
             }
         }
@@ -339,7 +340,6 @@
                 MatchingRuleImpl impl = new MatchingRuleImpl( matchingRuleName );
                 impl.setSchema( schema.getName() );
                 impl.setSchemaObject( schema );
-                // TODO: lookup description/name
                 impl.setDescription( "Dummy" );
                 impl.setNames( new String[]
                     { matchingRuleName } );

Modified: directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/oid/InPlaceOidValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/oid/InPlaceOidValueEditor.java?rev=823442&r1=823441&r2=823442&view=diff
==============================================================================
--- directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/oid/InPlaceOidValueEditor.java
(original)
+++ directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/oid/InPlaceOidValueEditor.java
Fri Oct  9 07:48:34 2009
@@ -21,8 +21,8 @@
 package org.apache.directory.studio.valueeditors.oid;
 
 
+import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.valueeditors.AbstractInPlaceStringValueEditor;
 
 



Mime
View raw message