@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public abstract class RawAttribute extends Object
Constructor and Description |
---|
RawAttribute() |
Modifier and Type | Method and Description |
---|---|
static RawAttribute |
create(Attribute attribute)
Creates a new raw attribute from the provided attribute.
|
static RawAttribute |
create(String attributeType)
Creates a new raw attribute with the provided type and no values.
|
static RawAttribute |
create(String attributeType,
ArrayList<org.forgerock.opendj.ldap.ByteString> values)
Creates a new raw attribute with the provided type and values.
|
static RawAttribute |
create(String attributeType,
org.forgerock.opendj.ldap.ByteString value)
Creates a new raw attribute with the provided type value.
|
static RawAttribute |
create(String attributeType,
String value)
Creates a new raw attribute with the provided type value.
|
static LDAPAttribute |
decode(org.forgerock.opendj.io.Asn1Reader reader)
Decodes the elements from the provided ASN.1 reader as an
LDAP attribute.
|
abstract String |
getAttributeType()
Retrieves the attribute type for this attribute.
|
abstract List<org.forgerock.opendj.ldap.ByteString> |
getValues()
Retrieves the set of values for this attribute.
|
abstract void |
setAttributeType(String attributeType)
Specifies the attribute type for this attribute.
|
abstract Attribute |
toAttribute()
Retrieves a core attribute containing the information for this
raw attribute.
|
String |
toString()
Retrieves a string representation of this attribute.
|
abstract void |
toString(StringBuilder buffer)
Appends a string representation of this attribute to the provided
buffer.
|
abstract void |
toString(StringBuilder buffer,
int indent)
Appends a multi-line string representation of this LDAP attribute
to the provided buffer.
|
void |
write(org.forgerock.opendj.io.Asn1Writer stream)
Writes this attribute to an ASN.1 output stream.
|
public RawAttribute()
public static RawAttribute create(String attributeType)
attributeType
- The attribute type for this attribute. It
must not be null
.public static RawAttribute create(String attributeType, 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(String attributeType, org.forgerock.opendj.ldap.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(String attributeType, ArrayList<org.forgerock.opendj.ldap.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 String getAttributeType()
public abstract void setAttributeType(String attributeType)
attributeType
- The attribute type for this attribute.public abstract List<org.forgerock.opendj.ldap.ByteString> getValues()
public abstract Attribute toAttribute() throws LDAPException
LDAPException
- If the provided value is invalid
according to the attribute syntax.public void write(org.forgerock.opendj.io.Asn1Writer stream) throws IOException
stream
- The ASN.1 output stream to write to.IOException
- If a problem occurs while writing to the
stream.public static LDAPAttribute decode(org.forgerock.opendj.io.Asn1Reader reader) throws LDAPException
reader
- The ASN.1 reader.LDAPException
- If a problem occurs while trying to
decode the provided ASN.1 element as a
raw attribute.public abstract void toString(StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.public abstract void toString(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.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.