directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1087352 - in /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry: DefaultEntryAttribute.java EntryAttribute.java
Date Thu, 31 Mar 2011 15:58:00 GMT
Author: elecharny
Date: Thu Mar 31 15:57:59 2011
New Revision: 1087352

URL: http://svn.apache.org/viewvc?rev=1087352&view=rev
Log:
Uodated the Javadoc

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java?rev=1087352&r1=1087351&r2=1087352&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
Thu Mar 31 15:57:59 2011
@@ -462,16 +462,7 @@ public class DefaultEntryAttribute imple
 
     
     /**
-     * <p>
-     * Get the byte[] value, if and only if the value is known to be Binary,
-     * otherwise a InvalidAttributeValueException will be thrown
-     * </p>
-     * <p>
-     * Note that this method returns the first value only.
-     * </p>
-     *
-     * @return The value as a byte[]
-     * @throws LdapInvalidAttributeValueException If the value is a String
+     * {@inheritDoc}
      */
     public byte[] getBytes() throws LdapInvalidAttributeValueException
     {
@@ -489,16 +480,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * <p>
-     * Get the String value, if and only if the value is known to be a String,
-     * otherwise a InvalidAttributeValueException will be thrown
-     * </p>
-     * <p>
-     * Note that this method returns the first value only.
-     * </p>
-     *
-     * @return The value as a String
-     * @throws LdapInvalidAttributeValueException If the value is a byte[]
+     * {@inheritDoc}
      */
     public String getString() throws LdapInvalidAttributeValueException
     {
@@ -529,10 +511,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * Get's the attribute identifier. Its value is the same than the
-     * user provided ID.
-     *
-     * @return the attribute's identifier
+     * {@inheritDoc}
      */
     public String getId()
     {
@@ -541,15 +520,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * Get's the user provided identifier for this entry.  This is the value
-     * that will be used as the identifier for the attribute within the
-     * entry.  If this is a commonName attribute for example and the user
-     * provides "COMMONname" instead when adding the entry then this is
-     * the format the user will have that entry returned by the directory
-     * server.  To do so we store this value as it was given and track it
-     * in the attribute using this property.
-     *
-     * @return the user provided identifier for this attribute
+     * {@inheritDoc}
      */
     public String getUpId()
     {
@@ -558,15 +529,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * Set the user provided ID. It will also set the ID, normalizing
-     * the upId (removing spaces before and after, and lowercasing it)<br>
-     * <br>
-     * If the Attribute already has an AttributeType, then the upId must
-     * be either the AttributeType name, or OID
-     *
-     * @param upId The attribute ID
-     * @throws IllegalArgumentException If the ID is empty or null or
-     * resolve to an empty value after being trimmed
+     * {@inheritDoc}
      */
     public void setUpId( String upId )
     {
@@ -603,24 +566,7 @@ public class DefaultEntryAttribute imple
     
 
     /**
-     * <p>
-     * Set the user provided ID. If we have none, the upId is assigned
-     * the attributetype's name. If it does not have any name, we will
-     * use the OID.
-     * </p>
-     * <p>
-     * If we have an upId and an AttributeType, they must be compatible. :
-     *  - if the upId is an OID, it must be the AttributeType's OID
-     *  - otherwise, its normalized form must be equals to ones of
-     *  the attributeType's names.
-     * </p>
-     * <p>
-     * In any case, the ATtributeType will be changed. The caller is responsible for
-     * the present values to be compatoble with the new AttributeType.
-     * </p>
-     *
-     * @param upId The attribute ID
-     * @param attributeType The associated attributeType
+     * {@inheritDoc}
      */
     public void setUpId( String upId, AttributeType attributeType )
     {
@@ -693,13 +639,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * <p>
-     * Tells if the attribute is Human Readable. 
-     * </p>
-     * <p>This flag is set by the caller, or implicitly when adding String 
-     * values into an attribute which is not yet declared as Binary.
-     * </p> 
-     * @return
+     * {@inheritDoc}
      */
     public boolean isHumanReadable()
     {
@@ -708,10 +648,7 @@ public class DefaultEntryAttribute imple
 
     
     /**
-     * Checks to see if this attribute is valid along with the values it contains.
-     *
-     * @return true if the attribute and it's values are valid, false otherwise
-     * @throws LdapException if there is a failure to check syntaxes of values
+     * {@inheritDoc}
      */
     public boolean isValid( SyntaxChecker checker ) throws LdapException
     {
@@ -734,42 +671,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * Adds some values to this attribute. If the new values are already present in
-     * the attribute values, the method has no effect.
-     * <p>
-     * The new values are added at the end of list of values.
-     * </p>
-     * <p>
-     * This method returns the number of values that were added.
-     * </p>
-     * <p>
-     * If the value's type is different from the attribute's type,
-     * a conversion is done. For instance, if we try to set some 
-     * StringValue into a Binary attribute, we just store the UTF-8 
-     * byte array encoding for this StringValue.
-     * </p>
-     * <p>
-     * If we try to store some BinaryValue in a HR attribute, we try to 
-     * convert those BinaryValue assuming they represent an UTF-8 encoded
-     * String. Of course, if it's not the case, the stored value will
-     * be incorrect.
-     * </p>
-     * <p>
-     * It's the responsibility of the caller to check if the stored
-     * values are consistent with the attribute's type.
-     * </p>
-     * <p>
-     * The caller can set the HR flag in order to enforce a type for 
-     * the current attribute, otherwise this type will be set while
-     * adding the first value, using the value's type to set the flag.
-     * </p>
-     * <p>
-     * <b>Note : </b>If the entry contains no value, and the unique added value
-     * is a null length value, then this value will be considered as
-     * a binary value.
-     * </p>
-     * @param vals some new values to be added which may be null
-     * @return the number of added values, or 0 if none has been added
+     * {@inheritDoc}
      */
     @edu.umd.cs.findbugs.annotations.SuppressWarnings( value="NP_LOAD_OF_KNOWN_NULL_VALUE",

         justification="Validity of null depends on the checker")
@@ -1028,7 +930,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * @see EntryAttribute#add(String...)
+     * {@inheritDoc}
      */
     public int add( String... vals ) throws LdapInvalidAttributeValueException
     {
@@ -1164,32 +1066,7 @@ public class DefaultEntryAttribute imple
     
     
     /**
-     * Adds some values to this attribute. If the new values are already present in
-     * the attribute values, the method has no effect.
-     * <p>
-     * The new values are added at the end of list of values.
-     * </p>
-     * <p>
-     * This method returns the number of values that were added.
-     * </p>
-     * If the value's type is different from the attribute's type,
-     * a conversion is done. For instance, if we try to set some String
-     * into a Binary attribute, we just store the UTF-8 byte array 
-     * encoding for this String.
-     * If we try to store some byte[] in a HR attribute, we try to 
-     * convert those byte[] assuming they represent an UTF-8 encoded
-     * String. Of course, if it's not the case, the stored value will
-     * be incorrect.
-     * <br>
-     * It's the responsibility of the caller to check if the stored
-     * values are consistent with the attribute's type.
-     * <br>
-     * The caller can set the HR flag in order to enforce a type for 
-     * the current attribute, otherwise this type will be set while
-     * adding the first value, using the value's type to set the flag.
-     *
-     * @param vals some new values to be added which may be null
-     * @return the number of added values, or 0 if none has been added
+     * {@inheritDoc}
      */
     public int add( byte[]... vals ) throws LdapInvalidAttributeValueException
     {
@@ -1239,7 +1116,7 @@ public class DefaultEntryAttribute imple
     
     
     /**
-     * Remove all the values from this attribute.
+     * {@inheritDoc}
      */
     public void clear()
     {
@@ -1248,16 +1125,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * <p>
-     * Indicates whether the specified values are some of the attribute's values.
-     * </p>
-     * <p>
-     * If the Attribute is HR, the binary values will be converted to String before
-     * being checked.
-     * </p>
-     *
-     * @param vals the values
-     * @return true if this attribute contains all the values, otherwise false
+     * {@inheritDoc}
      */
     public boolean contains( Value<?>... vals )
     {
@@ -1384,15 +1252,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * <p>
-     * Indicates whether the specified values are some of the attribute's values.
-     * </p>
-     * <p>
-     * If the Attribute is not HR, the values will be converted to byte[]
-     * </p>
-     *
-     * @param vals the values
-     * @return true if this attribute contains all the values, otherwise false
+     * {@inheritDoc}
      */
     public boolean contains( String... vals )
     {
@@ -1474,15 +1334,7 @@ public class DefaultEntryAttribute imple
     
     
     /**
-     * <p>
-     * Indicates whether the specified values are some of the attribute's values.
-     * </p>
-     * <p>
-     * If the Attribute is HR, the values will be converted to String
-     * </p>
-     *
-     * @param vals the values
-     * @return true if this attribute contains all the values, otherwise false
+     * {@inheritDoc}
      */
     public boolean contains( byte[]... vals )
     {
@@ -1559,19 +1411,7 @@ public class DefaultEntryAttribute imple
     
     
     /**
-     * <p>
-     * Get the first value of this attribute. If there is none, 
-     * null is returned.
-     * </p>
-     * <p>
-     * Note : even if we are storing values into a Set, one can assume
-     * the values are ordered following the insertion order.
-     * </p>
-     * <p> 
-     * This method is meant to be used if the attribute hold only one value.
-     * </p>
-     * 
-     *  @return The first value for this attribute.
+     * {@inheritDoc}
      */
     public Value<?> get()
     {
@@ -1585,16 +1425,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * Returns an iterator over all the attribute's values.
-     * <p>
-     * The effect on the returned enumeration of adding or removing values of
-     * the attribute is not specified.
-     * </p>
-     * <p>
-     * This method will throw any <code>LdapException</code> that occurs.
-     * </p>
-     *
-     * @return an enumeration of all values of the attribute
+     * {@inheritDoc}
      */
     public Iterator<Value<?>> getAll()
     {
@@ -1603,10 +1434,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * Retrieves the number of values in this attribute.
-     *
-     * @return the number of values in this attribute, including any values
-     * wrapping a null value if there is one
+     * {@inheritDoc}
      */
     public int size()
     {
@@ -1615,19 +1443,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * <p>
-     * Removes all the  values that are equal to the given values.
-     * </p>
-     * <p>
-     * Returns true if all the values are removed.
-     * </p>
-     * <p>
-     * If the attribute type is HR and some value which are not String, we
-     * will convert the values first (same thing for a non-HR attribute).
-     * </p>
-     *
-     * @param vals the values to be removed
-     * @return true if all the values are removed, otherwise false
+     * {@inheritDoc}
      */
     public boolean remove( Value<?>... vals )
     {
@@ -1733,19 +1549,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * <p>
-     * Removes all the  values that are equal to the given values.
-     * </p>
-     * <p>
-     * Returns true if all the values are removed.
-     * </p>
-     * <p>
-     * If the attribute type is HR, then the values will be first converted
-     * to String
-     * </p>
-     *
-     * @param vals the values to be removed
-     * @return true if all the values are removed, otherwise false
+     * {@inheritDoc}
      */
     public boolean remove( byte[]... vals )
     {
@@ -1807,17 +1611,7 @@ public class DefaultEntryAttribute imple
 
 
     /**
-     * Removes all the  values that are equal to the given values.
-     * <p>
-     * Returns true if all the values are removed.
-     * </p>
-     * <p>
-     * If the attribute type is not HR, then the values will be first converted
-     * to byte[]
-     * </p>
-     *
-     * @param vals the values to be removed
-     * @return true if all the values are removed, otherwise false
+     * {@inheritDoc}
      */
     public boolean remove( String... vals )
     {
@@ -1890,9 +1684,7 @@ public class DefaultEntryAttribute imple
     
     
     /**
-     * Get the attribute type associated with this ServerAttribute.
-     *
-     * @return the attributeType associated with this entry attribute
+     * {@inheritDoc}
      */
     public AttributeType getAttributeType()
     {
@@ -1901,16 +1693,7 @@ public class DefaultEntryAttribute imple
     
     
     /**
-     * <p>
-     * Set the attribute type associated with this ServerAttribute.
-     * </p>
-     * <p>
-     * The current attributeType will be replaced. It is the responsibility of
-     * the caller to insure that the existing values are compatible with the new
-     * AttributeType
-     * </p>
-     *
-     * @param attributeType the attributeType associated with this entry attribute
+     * {@inheritDoc}
      */
     public void apply( AttributeType attributeType ) throws LdapInvalidAttributeValueException
     {
@@ -1950,18 +1733,7 @@ public class DefaultEntryAttribute imple
     
     
     /**
-     * <p>
-     * Check if the current attribute type is of the expected attributeType
-     * </p>
-     * <p>
-     * This method won't tell if the current attribute is a descendant of 
-     * the attributeType. For instance, the "CN" serverAttribute will return
-     * false if we ask if it's an instance of "Name". 
-     * </p> 
-     *
-     * @param attributeType The AttributeType to check
-     * @return True if the current attribute is of the expected attributeType
-     * @throws LdapInvalidAttributeValueException If there is no AttributeType
+     * {@inheritDoc}
      */
     public boolean isInstanceOf( AttributeType attributeType ) throws LdapInvalidAttributeValueException
     {
@@ -2090,7 +1862,7 @@ public class DefaultEntryAttribute imple
     
     
     /**
-     * @see Cloneable#clone()
+     * {@inheritDoc}
      */
     public EntryAttribute clone()
     {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java?rev=1087352&r1=1087351&r2=1087352&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java
Thu Mar 31 15:57:59 2011
@@ -228,7 +228,7 @@ public interface EntryAttribute extends 
      * than the given attributeType
      *
      * @param attributeType The AttributeType to check
-     * @return True if the current attribute is of the expected attributeType
+     * @return true if the current attribute is of the expected attributeType or a descendant
of it
      * @throws LdapInvalidAttributeValueException If there is no AttributeType
      */
     boolean isInstanceOf( AttributeType attributeType ) throws LdapInvalidAttributeValueException;
@@ -239,10 +239,6 @@ public interface EntryAttribute extends 
      * Get the first value of this attribute. If there is none, 
      * null is returned.
      * </p>
-     * <p>
-     * Note : even if we are storing values into a Set, one can assume
-     * the values are ordered following the insertion order.
-     * </p>
      * <p> 
      * This method is meant to be used if the attribute hold only one value.
      * </p>
@@ -258,9 +254,6 @@ public interface EntryAttribute extends 
      * The effect on the returned enumeration of adding or removing values of
      * the attribute is not specified.
      * </p>
-     * <p>
-     * This method will throw any <code>NamingException</code> that occurs.
-     * </p>
      *
      * @return an enumeration of all values of the attribute
      */
@@ -283,9 +276,9 @@ public interface EntryAttribute extends 
     
     
     /**
-     * Get's the attribute identifier for this entry.  This is the value
+     * Get's the attribute identifier for this entry. This is the value
      * that will be used as the identifier for the attribute within the
-     * entry.  
+     * entry.
      *
      * @return the identifier for this attribute
      */



Mime
View raw message