|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ldap.util.LDIFAttribute
The LDIFAttribute class represents the name and values of an attribute. It is used to specify an attribute to be added to, deleted from, or modified in a Directory entry. It is also returned on a search of a Directory.
Constructor Summary | |
LDIFAttribute(LDIFAttribute ldapAttribute)
Constructs an attribute with copies of all values of the input LDIFAttribute. |
|
LDIFAttribute(java.lang.String attrName)
Constructs an attribute with no values. |
|
LDIFAttribute(java.lang.String attrName,
byte[] attrBytes)
Constructs an attribute with a byte-formatted value. |
|
LDIFAttribute(java.lang.String attrName,
java.lang.String attrString)
Constructs an attribute that has a single string value. |
|
LDIFAttribute(java.lang.String attrName,
java.lang.String[] attrStrings)
Constructs an attribute that has an array of string values. |
Method Summary | |
void |
addValue(byte[] attrBytes)
Adds a byte[] -formatted value to the attribute. |
void |
addValue(java.lang.String attrString)
Adds a string value to the attribute. |
void |
addValue(java.lang.String[] attrValues)
Adds an array of string values to the attribute. |
boolean |
contains(byte[] attrBytes)
Reports whether this object contains the specified attribute value. |
boolean |
contains(java.lang.String attrString)
Reports whether this object contains the specified attribute value. |
boolean |
equals(java.lang.Object ldifAttr)
|
java.lang.String |
getBaseName()
Returns the base name of this object. |
static java.lang.String |
getBaseName(java.lang.String attrName)
Returns the base name. |
byte[][] |
getByteValueArray()
Returns the values of the attribute as an array of byte[] |
java.util.Enumeration |
getByteValues()
Returns an enumerator for the values of the attribute in byte[] format. |
int |
getChangeType()
Return this the change type associated with this attribute(if any). |
javax.naming.directory.Attribute |
getJNDIAttribute()
Returns an object of javax.naming.directory.Attribute
that describes the attribute |
javax.naming.directory.ModificationItem |
getJNDIModificationItem()
Returns an object of javax.naming.directory.ModificationItem
that represents a JNDI modification item. |
java.lang.String |
getLangSubtype()
Returns the language subtype if any. |
java.lang.String |
getName()
Returns the name of the attribute. |
java.lang.String[] |
getStringValueArray()
Returns the values of the attribute as an array of Strings |
java.util.Enumeration |
getStringValues()
Returns an enumerator for the string values of an attribute. |
java.lang.String[] |
getSubtypes()
Extracts the subtypes from the attribute name of this object. |
static java.lang.String[] |
getSubtypes(java.lang.String attrName)
Extracts the subtypes from the specified attribute name. |
java.lang.String |
getValue()
Retruns the value of a single value attribute. |
boolean |
hasSubtype(java.lang.String subtype)
Reports whether the attribute name contains the specified subtype. |
boolean |
hasSubtypes(java.lang.String[] subtypes)
Reports if the attribute name contains all specified subtypes. |
void |
removeValue(byte[] attrBytes)
Removes a byte[] -formatted value from the attribute. |
void |
removeValue(java.lang.String attrString)
Removes a string value from the attribute. |
void |
setChangeType(int changeType)
Sets the change type for this attribute. |
void |
setValues(java.lang.String[] attrValues)
Sets the string values as the attribute's values. |
int |
size()
Returns the number of values of the attribute. |
java.lang.String |
toString()
Retrieves the string representation of an attribute in an LDAP entry. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LDIFAttribute(java.lang.String attrName)
attrName
- name of the attributepublic LDIFAttribute(LDIFAttribute ldapAttribute)
ldapAttribute
- An attribute to use as template.public LDIFAttribute(java.lang.String attrName, byte[] attrBytes)
attrName
- Name of the attributeattrBytes
- Value of the attribute as raw bytespublic LDIFAttribute(java.lang.String attrName, java.lang.String attrString)
attrName
- name of the attributeattrString
- value of the attribute in String formatpublic LDIFAttribute(java.lang.String attrName, java.lang.String[] attrStrings)
attrName
- name of the attributeattrStrings
- the list of string values for this attributeMethod Detail |
public void addValue(java.lang.String attrString)
attrString
- Value of the attribute as a String.public void addValue(byte[] attrBytes)
byte[]
-formatted value to the attribute.attrBytes
- the value of attribute as raw bytes.
add to the attributepublic void addValue(java.lang.String[] attrValues)
values
- array of string values.
add to the attributepublic java.util.Enumeration getByteValues()
byte[]
format.byte[]
.public java.util.Enumeration getStringValues()
public byte[][] getByteValueArray()
byte[]
byte[]
format.public java.lang.String[] getStringValueArray()
Strings
String
object.public void setValues(java.lang.String[] attrValues)
attrValues
- an array of string values which represent
the attribute values.public java.lang.String getLangSubtype()
cn;lang-fr;phonetic
, this method returns the
String lang-fr
.public static java.lang.String getBaseName(java.lang.String attrName)
cn;lang-fr;phonetic
, this method returns cn
.attrName
- name of the attribute to extract the base name frompublic java.lang.String getBaseName()
cn;lang-fr;phonetic
, this method returns cn
.public java.lang.String getName()
public static java.lang.String[] getSubtypes(java.lang.String attrName)
cn;lang-fr;phonetic
,
this method returns an array containing lang-fr
and
phonetic
.attrName
- name of the attribute to extract the subtypes from.public java.lang.String[] getSubtypes()
cn;lang-fr;phonetic
,
then this method returns an array containing lang-ja
and phonetic
.public boolean hasSubtype(java.lang.String subtype)
lang-fr
and the attribute name is cn;lang-fr
, this method
returns true
.subtype
- the single subtype to check forpublic boolean hasSubtypes(java.lang.String[] subtypes)
lang-fr
and phonetic
and if the attribute name is
cn;lang-fr;phonetic
, this method returns true
.
If the attribute name is cn;phonetic
or
cn;lang-fr
, this method returns false
.subtypes
- an array of subtypes to check forpublic void removeValue(java.lang.String attrString)
attrString
- the string value to removepublic void removeValue(byte[] attrBytes)
byte[]
-formatted value from the attribute.attrBytes
- byte[]
-formatted value to removepublic int size()
public int getChangeType()
public void setChangeType(int changeType)
changeType
- Change Type constant defined in the LDIF classpublic java.lang.String getValue()
public boolean contains(java.lang.String attrString)
attrString
- value as String
object that needs to
be checked forpublic boolean contains(byte[] attrBytes)
attrValue
- value as byte[]
formatted representation
that needs to be checked forpublic javax.naming.directory.Attribute getJNDIAttribute()
javax.naming.directory.Attribute
that describes the attributepublic javax.naming.directory.ModificationItem getJNDIModificationItem()
javax.naming.directory.ModificationItem
that represents a JNDI modification item.public java.lang.String toString()
LDIFAttribute {type='cn', values='Barbara Jensen,Babs Jensen'}
toString
in class java.lang.Object
public boolean equals(java.lang.Object ldifAttr)
equals
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |