Package org.opends.server.types
Class VirtualAttributeRule
java.lang.Object
org.opends.server.types.VirtualAttributeRule
This class defines a virtual attribute rule, which associates a virtual attribute provider with its associated
configuration, including the attribute type for which the values should be generated; the base DN(s), group DN(s),
and search filter(s) that should be used to identify which entries should have the virtual attribute, and how
conflicts between real and virtual values should be handled.
-
Constructor Summary
ConstructorsConstructorDescriptionVirtualAttributeRule(AttributeType attributeType, VirtualAttributeProvider<? extends VirtualAttributeCfg> provider, Set<Dn> baseDNs, SearchScope scope, Set<Dn> groupDNs, Set<Filter> anyFilter, VirtualAttributeCfgDefn.ConflictBehavior conflictBehavior, ServerContext serverContext) Creates a new virtual attribute rule with the provided information. -
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesToEntry(Entry entry) Indicates whether this virtual attribute rule applies to the provided entry, taking into account the eligibility requirements defined in the rule.getAttribute(Entry entry) Generates an attribute with the values for the provided entry.Retrieves the attribute description for which the values should be generated.Retrieves the set of base DNs for branches that are eligible to have this virtual attribute.Retrieves the behavior that the server should exhibit for entries that already have one or more real values for the target attribute.Retrieves the set of DNs for groups whose members are eligible to have this virtual attribute.VirtualAttributeProvider<? extends VirtualAttributeCfg>Retrieves the virtual attribute provider used to generate the values.getScope()Retrieves the scope of entries in the base DNs that are eligible to have this virtual attribute.toString()
-
Constructor Details
-
VirtualAttributeRule
public VirtualAttributeRule(AttributeType attributeType, VirtualAttributeProvider<? extends VirtualAttributeCfg> provider, Set<Dn> baseDNs, SearchScope scope, Set<Dn> groupDNs, Set<Filter> anyFilter, VirtualAttributeCfgDefn.ConflictBehavior conflictBehavior, ServerContext serverContext) Creates a new virtual attribute rule with the provided information.- Parameters:
attributeType- The attribute type for which the values should be generated.provider- The virtual attribute provider to use to generate the values.baseDNs- The set of base DNs for branches that are eligible to have this virtual attribute.scope- The scope of entries, related to the base DNs, that are eligible to have this virtual attribute.groupDNs- The set of DNs for groups whose members are eligible to have this virtual attribute.anyFilter- The set of search filters for entries that are eligible to have this virtual attribute.conflictBehavior- The behavior that the server should exhibit for entries that already have one or more real values for the target attribute.serverContext- The server context
-
-
Method Details
-
getAttribute
Generates an attribute with the values for the provided entry.- Parameters:
entry- The entry for which the values are to be generated.- Returns:
- The non-
null(maybe empty) attribute with the values generated for the provided entry.
-
getAttributeDescription
Retrieves the attribute description for which the values should be generated.- Returns:
- The attribute description for which the values should be generated.
-
getProvider
Retrieves the virtual attribute provider used to generate the values.- Returns:
- The virtual attribute provider to use to generate the values.
-
getBaseDNs
Retrieves the set of base DNs for branches that are eligible to have this virtual attribute.- Returns:
- The set of base DNs for branches that are eligible to have this virtual attribute.
-
getScope
Retrieves the scope of entries in the base DNs that are eligible to have this virtual attribute.- Returns:
- The scope of entries that are eligible to have this virtual attribute.
-
getGroupDNs
Retrieves the set of DNs for groups whose members are eligible to have this virtual attribute.- Returns:
- The set of DNs for groups whose members are eligible to have this virtual attribute.
-
getConflictBehavior
Retrieves the behavior that the server should exhibit for entries that already have one or more real values for the target attribute.- Returns:
- The behavior that the server should exhibit for entries that already have one or more real values for the target attribute.
-
appliesToEntry
Indicates whether this virtual attribute rule applies to the provided entry, taking into account the eligibility requirements defined in the rule.- Parameters:
entry- The entry for which to make the determination.- Returns:
trueif this virtual attribute rule may be used to generate values for the entry, orfalseif not.
-
toString
-