Package org.forgerock.opendj.config
Class LdapProfile
java.lang.Object
org.forgerock.opendj.config.LdapProfile
This class is used to map configuration elements to their LDAP schema names.
It is possible to augment the core LDAP profile with additional profile
mappings at run-time using instances of LdapProfile.Wrapper
. This is useful for
unit tests which need to add and remove mock components.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
LDAP profile wrappers can be used to provide temporary LDAP profile information for components which do not have LDAP profile property files. -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeName
(AbstractManagedObjectDefinition<?, ?> d, PropertyDefinition<?> pd) Get the name of the LDAP attribute associated with the specified property definition.static LdapProfile
Get the global LDAP profile instance.Get the principle object class associated with the specified definition.Get all the object classes associated with the specified definition.Gets the LDAP RDN attribute type for child entries of an instantiable relation.Gets the LDAP RDN attribute type for child entries of an set relation.Gets the LDAP object classes associated with an instantiable or set relation branch.Get an LDAP RDN sequence associated with a relation.void
Removes the last LDAP profile wrapper added usingpushWrapper(LdapProfile.Wrapper)
.void
pushWrapper
(LdapProfile.Wrapper wrapper) Decorates the core LDAP profile with the provided LDAP profile wrapper.
-
Method Details
-
getInstance
Get the global LDAP profile instance.- Returns:
- Returns the global LDAP profile instance.
-
getAttributeName
Get the name of the LDAP attribute associated with the specified property definition.- Parameters:
d
- The managed object definition.pd
- The property definition.- Returns:
- Returns the name of the LDAP attribute associated with the specified property definition.
- Throws:
MissingResourceException
- If the LDAP profile properties file associated with the provided managed object definition could not be loaded.
-
getRelationChildRdnType
Gets the LDAP RDN attribute type for child entries of an instantiable relation.- Parameters:
r
- The instantiable relation.- Returns:
- Returns the LDAP RDN attribute type for child entries of an instantiable relation.
- Throws:
MissingResourceException
- If the LDAP profile properties file associated with the provided managed object definition could not be loaded.
-
getRelationObjectClasses
Gets the LDAP object classes associated with an instantiable or set relation branch. The branch is the parent entry of child managed objects.- Returns:
- Returns the LDAP object classes associated with an instantiable or set relation branch.
-
getRelationChildRdnType
Gets the LDAP RDN attribute type for child entries of an set relation.- Parameters:
r
- The set relation.- Returns:
- Returns the LDAP RDN attribute type for child entries of an set relation.
- Throws:
MissingResourceException
- If the LDAP profile properties file associated with the provided managed object definition could not be loaded.
-
getObjectClass
Get the principle object class associated with the specified definition.- Parameters:
d
- The managed object definition.- Returns:
- Returns the principle object class associated with the specified definition.
- Throws:
MissingResourceException
- If the LDAP profile properties file associated with the provided managed object definition could not be loaded.
-
getObjectClasses
Get all the object classes associated with the specified definition.The returned list is ordered such that the uppermost object classes appear first (e.g. top).
- Parameters:
d
- The managed object definition.- Returns:
- Returns all the object classes associated with the specified definition.
- Throws:
MissingResourceException
- If the LDAP profile properties file associated with the provided managed object definition could not be loaded.
-
getRelationRdnSequence
Get an LDAP RDN sequence associated with a relation.- Parameters:
r
- The relation.- Returns:
- Returns the LDAP RDN sequence associated with a relation.
- Throws:
MissingResourceException
- If the LDAP profile properties file associated with the provided managed object definition could not be loaded.
-
popWrapper
public void popWrapper()Removes the last LDAP profile wrapper added usingpushWrapper(LdapProfile.Wrapper)
.- Throws:
NoSuchElementException
- If there are no LDAP profile wrappers.
-
pushWrapper
Decorates the core LDAP profile with the provided LDAP profile wrapper. All profile requests will be directed to the provided wrapper before being forwarded onto the core profile if the request could not be satisfied.- Parameters:
wrapper
- The LDAP profile wrapper.
-