Oracle® Collaboration Suite Contacts Java API Reference
10g Release 1 (10.1.1)

B16235-01

oracle.collabsuite.addressbook
Class AddressBookAttribute

java.lang.Object
  |
  +--oracle.collabsuite.addressbook.AddressBookAttribute

public final class AddressBookAttribute
extends java.lang.Object

This class represents an address book attribute


Constructor Summary
AddressBookAttribute(java.lang.String attrName)

Method Summary
int getLength()
Returns the maximum length defined in the LDAP schema for this attribute.
java.lang.String getName()
This methods gets the name of the attribute.
java.lang.String getSyntax()
Returns the LDAP syntax of this attribute.
java.lang.String getType()
Returns the syntax type of the attribute.
java.lang.Object getValue()
This methods gets the value of the attribute.
boolean ifBinary()
This method lets the caller know whether the value of the attribute is binary or not
boolean ifSingleValued()
Returns the multiplicity of the given attribute.
void setValue(int modificationType, java.lang.Object val)
This methods sets the value the attribute for modification operation.
void setValue(java.lang.Object val)
This methods adds a value to the attribute.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AddressBookAttribute

public AddressBookAttribute(java.lang.String attrName)
Parameters:
attrName - - The name of the attribute (constants from AddressBookContactConstants or AddressBookListConstants)

Method Detail

getName

public java.lang.String getName()
This methods gets the name of the attribute.
Parameters:
void -
Returns:
The name of the attribute

getValue

public java.lang.Object getValue()
                          throws AddressBookException
This methods gets the value of the attribute.
Parameters:
void -
Returns:
val The value Object will be - String when attribute is single valued String[] when attribute is multivalued byte[] when attribute value is binary null when no value is set for the given attribute Callers must type cast this appropriately.

setValue

public void setValue(java.lang.Object val)
              throws AddressBookException
This methods adds a value to the attribute. In case of a modify operation, when this method is used, it will replace the existing values with the new value
Parameters:
val - The value Object will be - String when attribute is single valued String[] when attribute is multivalued byte[] when attribute value is binary null when no value is set for the given attribute
Returns:
void.
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

setValue

public void setValue(int modificationType,
                     java.lang.Object val)
              throws AddressBookException
This methods sets the value the attribute for modification operation.
Parameters:
modificationType - The type of modification
AddressBookConstants.ADD_ATTRIBUTE - to add this value to the existing values
AddressBookConstants.DELETE_ATTRIBUTE - to delete this value from the existing values
AddressBookConstants.REPLACE_ATTRIBUTE - the replace the existing values with this value
val - The value Object will be - String when attribute is single valued String[] when attribute is multivalued byte[] when attribute value is binary null when no value is set for the given attribute
Returns:
void.
Throws:
AddressBookException - Throws AddressBookException if any error is encountered.

getSyntax

public java.lang.String getSyntax()
Returns the LDAP syntax of this attribute.
Parameters:
void -
Returns:
String, the attribute type

getType

public java.lang.String getType()
Returns the syntax type of the attribute.
Parameters:
void -
Returns:
String, the attribute type (for example, String or int or binary)

getLength

public int getLength()
Returns the maximum length defined in the LDAP schema for this attribute. Since max length for the attributes is optional in LDAP, it will return -1 if no value is defined for max length.
Parameters:
void -
Returns:
int the attribute length, -1 if not defined in LDAP.

ifSingleValued

public boolean ifSingleValued()
Returns the multiplicity of the given attribute.
Parameters:
void -
Returns:
boolean true means attribute is single valued, else is multivalued

ifBinary

public boolean ifBinary()
This method lets the caller know whether the value of the attribute is binary or not
Parameters:
void -
Returns:
boolean - true means attribute value if binary (each value is byte[])

Oracle® Collaboration Suite Contacts Java API Reference
10g Release 1 (10.1.1)

B16235-01

Copyright © 1988, 2005, Oracle. All rights reserved.