public class Ava extends Object implements Externalizable, Cloneable
Constructor and Description |
---|
Ava()
Constructs an empty Ava
|
Ava(SchemaManager schemaManager)
Constructs an empty schema aware Ava.
|
Ava(SchemaManager schemaManager,
String upType,
byte[] upValue)
Construct a schema aware Ava containing a binary value.
|
Ava(SchemaManager schemaManager,
String upType,
String upValue)
Construct a schema aware Ava with a String value.
|
Ava(String upType,
byte[] upValue)
Construct an Ava containing a binary value.
|
Ava(String upType,
String upValue)
Construct an Ava with a String value.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(SchemaManager schemaManager)
Apply a SchemaManager to the Ava.
|
Ava |
clone()
Implements the cloning.
|
boolean |
equals(Object obj) |
AttributeType |
getAttributeType() |
String |
getNormName()
Get the normalized Name of a Ava
|
String |
getNormType()
Get the normalized type of a Ava
|
Value<?> |
getNormValue()
Get the Value of a Ava
|
String |
getUpName()
Get the user provided form of this attribute type and value
|
String |
getUpType()
Get the user provided type of a Ava
|
Value<?> |
getUpValue()
Get the User Provided Value of a Ava
|
int |
hashCode()
Gets the hashcode of this object.
|
boolean |
isSchemaAware()
Tells if the Ava is schema aware or not.
|
String |
normalize()
A Normalized String representation of a Ava :
type is trimed and lowercased
value is trimed and lowercased, and special characters
are escaped if needed.
|
void |
readExternal(ObjectInput in)
We read back the data to create a new ATAV.
|
String |
toString()
A String representation of an Ava, as provided by the user.
|
void |
writeExternal(ObjectOutput out)
An Ava is composed of a type and a value.
|
public Ava()
public Ava(SchemaManager schemaManager)
schemaManager
- The SchemaManager instancepublic Ava(String upType, byte[] upValue) throws LdapInvalidDnException
Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.
upType
- The User Provided typeupValue
- The User Provided binary valueLdapInvalidDnException
- If the given type or value are invalidpublic Ava(SchemaManager schemaManager, String upType, byte[] upValue) throws LdapInvalidDnException
Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.
schemaManager
- The SchemaManager instanceupType
- The User Provided typeupValue
- The User Provided binary valueLdapInvalidDnException
- If the given type or value are invalidpublic Ava(String upType, String upValue) throws LdapInvalidDnException
Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.
upType
- The User Provided typeupValue
- The User Provided String valueLdapInvalidDnException
- If the given type or value are invalidpublic Ava(SchemaManager schemaManager, String upType, String upValue) throws LdapInvalidDnException
Note that the upValue should not be null or empty, or resolve to an empty string after having trimmed it.
schemaManager
- The SchemaManager instanceupType
- The User Provided typeupValue
- The User Provided String valueLdapInvalidDnException
- If the given type or value are invalidpublic void apply(SchemaManager schemaManager) throws LdapInvalidDnException
schemaManager
- The SchemaManager instance to useLdapInvalidDnException
- If the Ava can't be normalized accordingly
to the given SchemaManagerpublic String getNormType()
public String getUpType()
public Value<?> getNormValue()
public Value<?> getUpValue()
public String getNormName()
public String getUpName()
public String normalize()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IoException
- If the Ava can't be written in the streamIOException
Externalizable.readExternal(ObjectInput)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
writeExternal(ObjectOutput)
methodreadExternal
in interface Externalizable
IOException
- If the Ava can't b written to the streamClassNotFoundException
- If we can't deserialize an Ava from the streamExternalizable.readExternal(ObjectInput)
public boolean isSchemaAware()
public AttributeType getAttributeType()
Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.