@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface LDAPSetter
LDAPObject
annotation type. Those methods must not be static and
must take a single argument, which is the value to set from the corresponding
LDAP attribute, but they may have any access modifier (including
public
, protected
, private
, or no access modifier at
all indicating package-level access). The associated attribute must not be
referenced by any other LDAPField
or LDAPSetter
annotations
in the same class, and it may be referenced by at most one LDAPGetter
annotation.Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
attribute
The name of the attribute type in which the value of the associated method
will be stored.
|
java.lang.Class<? extends ObjectEncoder> |
encoderClass
The class that provides the logic for encoding the value of this method to
an LDAP attribute.
|
boolean |
failOnInvalidValue
Indicates whether attempts to initialize an object should fail if the LDAP
attribute has a value that cannot be represented in the required argument
type for the associated method.
|
boolean |
failOnTooManyValues
Indicates whether attempts to initialize an object should fail if the
LDAP attribute has multiple values but the argument for the associated
method only accepts a single value.
|
public abstract boolean failOnInvalidValue
true
, then an exception
will be thrown in such instances. If this is false
, then the
associated method will not be invoked, and attempts to modify the
corresponding entry in the directory may cause the existing values to be
lost.true
if attempts to initialize an object should fail if
the LDAP attribute has a value that cannot be represented in the
required argument type, or false
if not.public abstract boolean failOnTooManyValues
true
, then an
exception will be thrown in such instances. If this is false
, then
only the first value returned will be used, and attempts to modify the
corresponding entry in the directory may cause those additional values to
be lost.true
if attempts to initialize an object should fail if
the LDAP attribute has multiple values but the argument for the
associated method only accepts a single value, or false
if
not.@NotNull public abstract java.lang.Class<? extends ObjectEncoder> encoderClass
@NotNull public abstract java.lang.String attribute