|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.beans.spring.SpelAttributeValueMutator
public class SpelAttributeValueMutator
Attribute mutator that uses a SPEL expression and evaluation context.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
SpelAttributeValueMutator(Attribute attr,
org.springframework.expression.EvaluationContext context)
Creates a new spel attribute value mutator. |
|
| Method Summary | ||
|---|---|---|
protected
|
convertValue(Object value,
Class<?> sourceType,
Class<T> targetType)
Converts the supplied value to the target type. |
|
protected static
|
createCollection(Class<?> type,
int size)
Creates a best fit collection for the supplied type. |
|
Collection<byte[]> |
getBinaryValues(Object object)
Returns the binary values of the attribute. |
|
String |
getName()
Returns the name of the attribute. |
|
org.ldaptive.SortBehavior |
getSortBehavior()
Returns the sort behavior of the attribute. |
|
Collection<String> |
getStringValues(Object object)
Returns the string values of the attribute. |
|
protected
|
getValues(Object object,
Class<T> type)
Uses the configured expression and evaluation context to retrieve values from the supplied object. |
|
boolean |
isBinary()
Returns whether the attribute is binary. |
|
void |
setBinaryValues(Object object,
Collection<byte[]> values)
Sets the binary values of the attribute. |
|
void |
setStringValues(Object object,
Collection<String> values)
Sets the string values of the attribute. |
|
protected
|
setValues(Object object,
Collection<T> values,
Class<T> type)
Uses the configured expression and evaluation context to set values on the supplied object. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public SpelAttributeValueMutator(Attribute attr,
org.springframework.expression.EvaluationContext context)
attr - containing the SPEL configurationcontext - containing the values| Method Detail |
|---|
public String getName()
getName in interface AttributeValueMutatorpublic boolean isBinary()
isBinary in interface AttributeValueMutatorpublic org.ldaptive.SortBehavior getSortBehavior()
getSortBehavior in interface AttributeValueMutatorpublic Collection<String> getStringValues(Object object)
getStringValues in interface AttributeValueMutatorobject - containing attribute values
public Collection<byte[]> getBinaryValues(Object object)
getBinaryValues in interface AttributeValueMutatorobject - containing attribute values
protected <T> Collection<T> getValues(Object object,
Class<T> type)
T - either String or byte[]object - to get values fromtype - of objects to place in the collection
protected <T> T convertValue(Object value,
Class<?> sourceType,
Class<T> targetType)
T - either String or byte[]value - to convertsourceType - to convert fromtargetType - to convert to
public void setStringValues(Object object,
Collection<String> values)
setStringValues in interface AttributeValueMutatorobject - to set values onvalues - to set
public void setBinaryValues(Object object,
Collection<byte[]> values)
setBinaryValues in interface AttributeValueMutatorobject - to set values onvalues - to set
protected <T> void setValues(Object object,
Collection<T> values,
Class<T> type)
T - either String or byte[]object - to set values onvalues - to settype - of objects in the collectionpublic String toString()
toString in class Object
protected static <T> Collection<T> createCollection(Class<?> type,
int size)
T - collection typetype - of collection to createsize - of the collection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||