directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r807600 - /directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
Date Tue, 25 Aug 2009 13:01:05 GMT
Author: elecharny
Date: Tue Aug 25 13:01:04 2009
New Revision: 807600

URL: http://svn.apache.org/viewvc?rev=807600&view=rev
Log:
Added a getOid() method returning the numeric OID from a name

Modified:
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java?rev=807600&r1=807599&r2=807600&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/SchemaObjectRegistry.java
Tue Aug 25 13:01:04 2009
@@ -262,4 +262,23 @@
             }
         }
     }
+    
+    
+    /**
+     * Gets the numericOid associated to a name, if any
+     *
+     * @param name The name we are looking the oid for
+     * @return The numericOID associated with this name
+     */
+    public String getOid( String name )
+    {
+        T schemaObject = byOid.get( name );
+        
+        if ( schemaObject != null )
+        {
+            return schemaObject.getOid();
+        }
+        
+        return null;
+    }
 }



Mime
View raw message