@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface LDAPGetter
LDAPObject
annotation type. Those
methods must not be static and must have a non-void
return type, 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 LDAPGetter
annotations in the same
class, and it may be referenced by at most one LDAPSetter
annotation.Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
attribute
The name of the attribute type in which the associated getter value will be
stored in LDAP entries.
|
java.lang.Class<? extends ObjectEncoder> |
encoderClass
The class that provides the logic for encoding the method return value to
an LDAP attribute.
|
FilterUsage |
filterUsage
Indicates whether and under what circumstances the value returned from this
method may be included in a search filter generated to search for entries
that match the object.
|
boolean |
inAdd
Indicates whether the value returned from this method should be included in
the LDAP entry that is generated when adding a new instance of the
associated object to the directory.
|
boolean |
inModify
Indicates whether the value returned from this method should be included in
the set of LDAP modifications if it has been changed when modifying an
existing instance of the associated object in the directory.
|
boolean |
inRDN
Indicates whether the value returned from this method should be included in
the RDN of entries created from the associated object.
|
java.lang.String[] |
objectClass
The names of the object classes in which the associated attribute may
be used.
|
public abstract boolean inAdd
true
if the value returned from this method should be
included in the LDAP entry that is generated when adding a new
instance of the associated object to the directory, or
false
if not.public abstract boolean inModify
true
if the value returned from this method should be
included in the set of LDAP modifications if it has been changed
when modifying an existing instance of the associated object in
the directory, or false
if not.public abstract boolean inRDN
inAdd()
element.
LDAPField
that have
inRDN=true
and all getter methods marked with LDAPGetter
that have inRDN=true
. A class marked with LDAPObject
must
either have at least one LDAPField
or LDAPGetter
with
inRDN=true
, or it must be a direct subclass of another class marked
with LDAPObject
. If a class has one or more fields and/or getters
with inRDN=true
, then only those fields/getters will be used to
construct the RDN, even if that class is a direct subclass of another class
marked with LDAPObject
.true
if the value returned from this method should be
included in the RDN of entries created from the associated
object, or false
if not.@NotNull public abstract java.lang.Class<? extends ObjectEncoder> encoderClass
@NotNull public abstract FilterUsage filterUsage
@NotNull public abstract java.lang.String attribute
@NotNull public abstract java.lang.String[] objectClass
LDAPObject
annotation type for the
associated class. If no values are provided, then it will be assumed to
be only included in the structural object class.