|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.RawAttribute
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public abstract class RawAttribute
This class defines a raw attribute, which has a type (which may include zero or more options), and zero or more values. It is an unprocessed element, so it will not have undergone any syntax or other forms of validity checking.
Constructor Summary | |
---|---|
RawAttribute()
|
Method Summary | |
---|---|
static RawAttribute |
create(Attribute attribute)
Creates a new raw attribute from the provided attribute. |
static RawAttribute |
create(java.lang.String attributeType)
Creates a new raw attribute with the provided type and no values. |
static RawAttribute |
create(java.lang.String attributeType,
ByteString value)
Creates a new raw attribute with the provided type value. |
static RawAttribute |
create(java.lang.String attributeType,
java.util.List<ByteString> values)
Creates a new raw attribute with the provided type and values. |
static RawAttribute |
create(java.lang.String attributeType,
java.lang.String value)
Creates a new raw attribute with the provided type value. |
static LDAPAttribute |
decode(ASN1Element element)
Decodes the provided ASN.1 element as an LDAP attribute. |
ASN1Element |
encode()
Encodes this attribute to an ASN.1 element. |
abstract java.lang.String |
getAttributeType()
Retrieves the attribute type for this attribute. |
abstract java.util.ArrayList<ASN1OctetString> |
getValues()
Retrieves the set of values for this attribute. |
abstract void |
setAttributeType(java.lang.String attributeType)
Specifies the attribute type for this attribute. |
abstract Attribute |
toAttribute()
Retrieves a core attribute containing the information for this raw attribute. |
java.lang.String |
toString()
Retrieves a string representation of this attribute. |
abstract void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this attribute to the provided buffer. |
abstract void |
toString(java.lang.StringBuilder buffer,
int indent)
Appends a multi-line string representation of this LDAP attribute to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RawAttribute()
Method Detail |
---|
public static RawAttribute create(java.lang.String attributeType)
attributeType
- The attribute type for this attribute. It
must not be null
.
public static RawAttribute create(java.lang.String attributeType, java.lang.String value)
attributeType
- The attribute type for this attribute. It
must not be null
.value
- The value to use for this attribute. It
must not be null
.
public static RawAttribute create(java.lang.String attributeType, ByteString value)
attributeType
- The attribute type for this attribute. It
must not be null
.value
- The value to use for this attribute. It
must not be null
.
public static RawAttribute create(java.lang.String attributeType, java.util.List<ByteString> values)
attributeType
- The attribute type for this attribute. It
must not be null
.values
- The set of values for this attribute.
public static RawAttribute create(Attribute attribute)
attribute
- The attribute to use to create this raw
attribute. It must not be null
.
public abstract java.lang.String getAttributeType()
public abstract void setAttributeType(java.lang.String attributeType)
attributeType
- The attribute type for this attribute.public abstract java.util.ArrayList<ASN1OctetString> getValues()
public abstract Attribute toAttribute() throws LDAPException
LDAPException
- If the provided value is invalid
according to the attribute syntax.public final ASN1Element encode()
public static LDAPAttribute decode(ASN1Element element) throws LDAPException
element
- The ASN.1 element to decode.
LDAPException
- If a problem occurs while trying to
decode the provided ASN.1 element as a
raw attribute.public java.lang.String toString()
toString
in class java.lang.Object
public abstract void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.public abstract void toString(java.lang.StringBuilder buffer, int indent)
buffer
- The buffer to which the information should be
appended.indent
- The number of spaces from the margin that the
lines should be indented.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |