directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r718191 - in /directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm: Attribute.java MultiValueAttribute.java SingleValueAttribute.java
Date Mon, 17 Nov 2008 08:50:29 GMT
Author: kayyagari
Date: Mon Nov 17 00:50:29 2008
New Revision: 718191

URL: http://svn.apache.org/viewvc?rev=718191&view=rev
Log:
splitted the Attribute interface

Added:
    directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/MultiValueAttribute.java
    directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/SingleValueAttribute.java
Modified:
    directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/Attribute.java

Modified: directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/Attribute.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/Attribute.java?rev=718191&r1=718190&r2=718191&view=diff
==============================================================================
--- directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/Attribute.java
(original)
+++ directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/Attribute.java
Mon Nov 17 00:50:29 2008
@@ -20,13 +20,12 @@
 package org.apache.directory.olm;
 
 
-import java.util.Iterator;
-
-
 /**
  * 
  * Represents an LDAP Attribute.
- *
+ * 
+ * TODO make use of Generics wherever required
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
@@ -43,15 +42,6 @@
 
     /**
      * 
-     * gets the value of the attribute.
-     *
-     * @return value of the attribute
-     */
-    Object getValue();
-
-
-    /**
-     * 
      * gets the syntax of the attribute.
      *
      * @return the syntax of the attribute, null if no syntax defined
@@ -61,17 +51,6 @@
 
     /**
      * 
-     * gets all the values if the Attribute is multivalued, null if it is single valued.
-     * 
-     * @see for single valued Attribute use #getAttrValue()
-     * 
-     * @return iterator values of the attribute
-     */
-    public Iterator getValues();
-
-
-    /**
-     * 
      * tells if the Attribute is Obsolete.
      *
      * @return true if obsolete, false otherwise

Added: directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/MultiValueAttribute.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/MultiValueAttribute.java?rev=718191&view=auto
==============================================================================
--- directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/MultiValueAttribute.java
(added)
+++ directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/MultiValueAttribute.java
Mon Nov 17 00:50:29 2008
@@ -0,0 +1,61 @@
+/*
+ *  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.olm;
+
+
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * 
+ * Represents an Attribute which can hold multiple values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface MultiValueAttribute extends Attribute
+{
+    /**
+     * 
+     * gets all the values if the Attribute is multivalued, null if it is single valued.
+     * 
+     * @see for single valued Attribute use #getAttrValue()
+     * 
+     * @return iterator values of the attribute
+     */
+    Iterator getValues();
+
+
+    /**
+     * 
+     * set the Attribute's values.
+     *
+     * @param values the set of values
+     */
+    void setValues( Set values );
+    
+    /**
+     * 
+     * adds a value.
+     *
+     * @param obj the value to be added
+     */
+   // void addValue( Object obj );
+}

Added: directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/SingleValueAttribute.java
URL: http://svn.apache.org/viewvc/directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/SingleValueAttribute.java?rev=718191&view=auto
==============================================================================
--- directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/SingleValueAttribute.java
(added)
+++ directory/sandbox/kayyagari/apacheds-olm/src/main/java/org/apache/directory/olm/SingleValueAttribute.java
Mon Nov 17 00:50:29 2008
@@ -0,0 +1,46 @@
+/*
+ *  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.olm;
+
+/**
+ * 
+ * A single valued Attribute.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface SingleValueAttribute extends Attribute
+{
+    /**
+     * 
+     * gets the value of the attribute.
+     *
+     * @return value of the attribute
+     */
+    Object getValue();
+
+
+    /**
+     * 
+     * set the Attribute's Value.
+     *
+     */
+    // void setValue( Object obj );
+}
\ No newline at end of file



Mime
View raw message