|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.ldap.entry.AbstractValue<T>
public abstract class AbstractValue<T>
A wrapper around byte[] values in entries.
Field Summary | |
---|---|
protected AttributeType |
attributeType
reference to the attributeType zssociated with the value |
protected boolean |
normalized
A flag set when the value has been normalized |
protected T |
normalizedValue
the canonical representation of the wrapped value |
protected boolean |
same
A flag set if the normalized data is different from the wrapped data |
protected java.lang.Boolean |
valid
cached results of the isValid() method call |
protected T |
wrappedValue
the wrapped binary value |
Constructor Summary | |
---|---|
AbstractValue()
|
Method Summary | |
---|---|
void |
apply(AttributeType attributeType)
|
Value<T> |
clone()
|
AttributeType |
getAttributeType()
Get the associated AttributeType |
protected LdapComparator<T> |
getLdapComparator()
Gets a comparator using getMatchingRule() to resolve the matching that the comparator is extracted from. |
protected MatchingRule |
getMatchingRule()
Find a matchingRule to use for normalization and comparison. |
T |
getNormalizedValue()
Gets the normalized (canonical) representation for the wrapped value. |
T |
getNormalizedValueReference()
Gets a reference to the the normalized (canonical) representation for the wrapped value. |
protected Normalizer |
getNormalizer()
Gets a normalizer using getMatchingRule() to resolve the matchingRule that the normalizer is extracted from. |
T |
getReference()
Gets a reference to the wrapped binary value. |
boolean |
instanceOf(AttributeType attributeType)
Check if the value is stored into an instance of the given AttributeType, or one of its ascendant. |
boolean |
isNormalized()
Tells if the value has already be normalized or not. |
boolean |
isNull()
Check if the contained value is null or not |
boolean |
isValid()
Uses the syntaxChecker associated with the attributeType to check if the value is valid. |
boolean |
isValid(SyntaxChecker syntaxChecker)
Uses the syntaxChecker associated with the attributeType to check if the value is valid. |
void |
normalize()
Normalize the value. |
void |
setNormalized(boolean normalized)
Set the normalized flag. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.directory.shared.ldap.entry.Value |
---|
get, getBytes, getNormalizedValueCopy, getString, isBinary, length, normalize |
Methods inherited from interface java.io.Externalizable |
---|
readExternal, writeExternal |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected transient AttributeType attributeType
protected T wrappedValue
protected T normalizedValue
protected boolean normalized
protected java.lang.Boolean valid
protected transient boolean same
Constructor Detail |
---|
public AbstractValue()
Method Detail |
---|
public Value<T> clone()
clone
in interface Value<T>
clone
in class java.lang.Object
public T getReference()
getReference
in interface Value<T>
public AttributeType getAttributeType()
public void apply(AttributeType attributeType)
protected LdapComparator<T> getLdapComparator() throws LdapException
LdapException
- if resolution of schema entities failprotected MatchingRule getMatchingRule() throws LdapException
LdapException
- if resolution of schema entities failprotected Normalizer getNormalizer() throws LdapException
LdapException
- if resolution of schema entities failpublic boolean instanceOf(AttributeType attributeType) throws LdapException
attributeType
- The AttributeType we are looking at
true
if the value is associated with the given
attributeType or one of its ascendant
LdapException
public T getNormalizedValue()
getNormalizedValue
in interface Value<T>
public T getNormalizedValueReference()
getNormalizedValueReference
in interface Value<T>
public final boolean isNull()
isNull
in interface Value<T>
true
if the inner value is null.public final boolean isValid()
isValid
in interface Value<T>
true
if the value is validValue.isValid()
public final boolean isValid(SyntaxChecker syntaxChecker) throws LdapException
isValid
in interface Value<T>
syntaxChecker
- the SyntaxChecker to use to validate the value
true
if the value is valid
LdapException
- if the value cannot be validatedServerValue#isValid()
public void normalize() throws LdapException
normalize
in interface Value<T>
LdapException
- If the value cannot be normalizedpublic final boolean isNormalized()
isNormalized
in interface Value<T>
true
if the value has already been normalized.public final void setNormalized(boolean normalized)
setNormalized
in interface Value<T>
the
- value : true or false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |