You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/10/08 01:33:47 UTC

svn commit: rev 54033 - incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema

Author: akarasulu
Date: Thu Oct  7 16:33:46 2004
New Revision: 54033

Added:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseAttributeType.java
      - copied, changed from rev 53886, incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DefaultAttributeType.java
Removed:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DefaultAttributeType.java
Log:
make setters protected and rename class to match scheme

Copied: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseAttributeType.java (from rev 53886, incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DefaultAttributeType.java)
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DefaultAttributeType.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseAttributeType.java	Thu Oct  7 16:33:46 2004
@@ -17,28 +17,27 @@
 package org.apache.ldap.common.schema;
 
 
-import java.io.Serializable;
-
 import java.util.ArrayList;
+import java.io.Serializable;
 
 import org.apache.ldap.common.util.ArrayUtils;
 
 
 /**
  * Attribute specification bean used to store the schema information for an
- * attribute definition.
+ * attributeType definition.
  *
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class DefaultAttributeType implements Serializable, AttributeType
+public class BaseAttributeType implements Serializable, AttributeType
 {
     // ------------------------------------------------------------------------
     // Specification Attributes 
     // ------------------------------------------------------------------------
 
     /** the object identifier for this attributeType */
-    private String oid;
+    private final String oid;
     /** the optional superior attributeType */
     private AttributeType superior;
     /** a list of names for this attribute of this type */
@@ -68,6 +67,22 @@
 
 
     // ------------------------------------------------------------------------
+    // C O N S T R U C T O R S
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * Creates an AttributeType using a unique OID.
+     *
+     * @param oid the IANA OID number for the attributeType
+     */
+    protected BaseAttributeType( String oid )
+    {
+        this.oid = oid;
+    }
+
+
+    // ------------------------------------------------------------------------
     // Accessor Methods for Specification Properties
     // ------------------------------------------------------------------------
 
@@ -178,85 +193,79 @@
     // ------------------------------------------------------------------------
 
 
-    void setOid( String oid )
-    {
-        this.oid = oid;
-    }
-
-
-    void setSuperior( AttributeType superior )
+    protected void setSuperior( AttributeType superior )
     {
         this.superior = superior;
     }
 
 
-    void setNameList( ArrayList nameList )
+    protected void setNameList( ArrayList nameList )
     {
         this.nameList = nameList;
     }
 
 
-    void setDesc( String desc )
+    protected void setDesc( String desc )
     {
         this.desc = desc;
     }
 
 
-    void setEquality( MatchingRule equality )
+    protected void setEquality( MatchingRule equality )
     {
         this.equality = equality;
     }
 
 
-    void setSubstr( MatchingRule substr )
+    protected void setSubstr( MatchingRule substr )
     {
         this.substr = substr;
     }
 
 
-    void setOrdering( MatchingRule ordering )
+    protected void setOrdering( MatchingRule ordering )
     {
         this.ordering = ordering;
     }
 
 
-    void setSyntax( Syntax syntax )
+    protected void setSyntax( Syntax syntax )
     {
         this.syntax = syntax;
     }
 
 
-    void setSingleValue( boolean singleValue )
+    protected void setSingleValue( boolean singleValue )
     {
         isSingleValue = singleValue;
     }
 
 
-    void setCollective( boolean collective )
+    protected void setCollective( boolean collective )
     {
         isCollective = collective;
     }
 
 
-    void setCanUserModify( boolean canUserModify )
+    protected void setCanUserModify( boolean canUserModify )
     {
         this.canUserModify = canUserModify;
     }
 
 
-    void setObsolete( boolean obsolete )
+    protected void setObsolete( boolean obsolete )
     {
         isObsolete = obsolete;
     }
 
 
-    void setUsage( UsageEnum usage )
+    protected void setUsage( UsageEnum usage )
     {
         this.usage = usage;
     }
 
 
-    void setLength( int length )
+    protected void setLength( int length )
     {
         this.length = length;
     }