directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r425850 - in /directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/directory/ src/main/java/org/apache/directory/server2/ src/...
Date Wed, 26 Jul 2006 21:30:31 GMT
Author: akarasulu
Date: Wed Jul 26 14:30:30 2006
New Revision: 425850

URL: http://svn.apache.org/viewvc?rev=425850&view=rev
Log:
building bundle for OidRegistry service

Added:
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/pom.xml
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/schema/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/schema/registries/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/schema/registries/oid/
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/schema/registries/oid/OidRegistry.java
Modified:
    directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/   (props changed)

Propchange: directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jul 26 14:30:30 2006
@@ -0,0 +1,3 @@
+.classpath
+.project
+target

Added: directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/pom.xml?rev=425850&view=auto
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/pom.xml (added)
+++ directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/pom.xml Wed Jul 26 14:30:30
2006
@@ -0,0 +1,32 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>osgi-bundle</packaging>
+  <name>ApacheDS: Oid Registry</name>
+  <groupId>org.apache.directory.server2</groupId>
+  <version>2.0-SNAPSHOT</version>
+  <artifactId>org.apache.directory.server2.schema.registries.oid</artifactId>
+  <dependencies>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <bundleName>ApacheDS Oid Registry</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleDescription>
+              A bundle containing the OID registry interface.
+            </bundleDescription>
+            <exportPackage>
+              org.apache.directory.server2.schema.registries.oid
+            </exportPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/schema/registries/oid/OidRegistry.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/schema/registries/oid/OidRegistry.java?rev=425850&view=auto
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/schema/registries/oid/OidRegistry.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/schema/registries/oid/src/main/java/org/apache/directory/server2/schema/registries/oid/OidRegistry.java
Wed Jul 26 14:30:30 2006
@@ -0,0 +1,110 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.server2.schema.registries.oid;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.NamingException;
+
+
+/**
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface OidRegistry
+{    
+    /**
+     * Gets the object identifier for a common name or returns the argument
+     * as-is if it is an object identifier.
+     *
+     * @param alias the name to lookup an OID for
+     * @return the OID string associated with a name
+     * @throws NamingException if name does not map to an OID
+     */
+    String getOid( String alias ) throws NamingException;
+
+
+    /**
+     * Checks to see if an identifier, oid or name exists within this registry.
+     *
+     * @param aliasOrOid the oid or name to look for
+     * @return true if the id exists false otherwise
+     */
+    boolean hasOid( String aliasOrOid );
+
+
+    /**
+     * Gets the primary name associated with an OID.  The primary name is the
+     * first name specified for the OID.
+     *
+     * @param oid the object identifier
+     * @return the primary name
+     * @throws NamingException if oid does not exist
+     */
+    String getPrimaryName( String oid ) throws NamingException;
+
+
+    /**
+     * Gets the alias names associated with an OID.  An OID is unique however it 
+     * may have many names used to refer to it.  A good example is the cn and
+     * commonName attribute names for OID 2.5.4.3.  Within a server one name
+     * within the set must be chosen as the primary name.  This is used to
+     * name certain things within the server internally.  If there is more than
+     * one name then the first name is taken to be the primary.
+     *
+     * @param oid the OID for which we return the set of common names
+     * @return a sorted set of names
+     * @throws NamingException if oid does not exist
+     */
+    List<String> getAliases( String oid ) throws NamingException;
+
+
+    /**
+     * Lists all the OIDs within the registry.  This may be a really big list.
+     *
+     * @return all the OIDs registered
+     */
+    Iterator<String> list();
+
+
+    /**
+     * Adds an OID name pair to the registry.
+     *
+     * @param alias the name to associate with the OID
+     * @param oid the OID to add or associate a new name with
+     */
+    void register( String alias, String oid );
+
+
+    /**
+     * Get the map of all the oids by their name
+     * @return The Map that contains all the oids
+     */
+    public Map<String,String> getOidByName();
+
+
+    /**
+     * Get the map of all the oids by their name
+     * @return The Map that contains all the oids
+     */
+    public Map<String,String> getNameByOid();
+}



Mime
View raw message