public final class LDAPProfile extends Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
LDAPProfile.Wrapper
LDAP profile wrappers can be used to provide temporary LDAP
profile information for components which do not have LDAP profile
property files.
|
Modifier and Type | Method and Description |
---|---|
String |
getAttributeName(AbstractManagedObjectDefinition<?,?> d,
PropertyDefinition<?> pd)
Get the name of the LDAP attribute associated with the specified
property definition.
|
static LDAPProfile |
getInstance()
Get the global LDAP profile instance.
|
String |
getObjectClass(AbstractManagedObjectDefinition<?,?> d)
Get the principle object class associated with the specified
definition.
|
List<String> |
getObjectClasses(AbstractManagedObjectDefinition<?,?> d)
Get all the object classes associated with the specified
definition.
|
String |
getRelationChildRDNType(InstantiableRelationDefinition<?,?> r)
Gets the LDAP RDN attribute type for child entries of an
instantiable relation.
|
String |
getRelationChildRDNType(SetRelationDefinition<?,?> r)
Gets the LDAP RDN attribute type for child entries of an set
relation.
|
List<String> |
getRelationObjectClasses(RelationDefinition<?,?> r)
Gets the LDAP object classes associated with an instantiable or set
relation branch.
|
String |
getRelationRDNSequence(RelationDefinition<?,?> r)
Get an LDAP RDN sequence associated with a relation.
|
void |
popWrapper()
Removes the last LDAP profile wrapper added using
pushWrapper(org.opends.server.admin.LDAPProfile.Wrapper) . |
void |
pushWrapper(LDAPProfile.Wrapper wrapper)
Decorates the core LDAP profile with the provided LDAP profile
wrapper.
|
public static LDAPProfile getInstance()
public String getAttributeName(AbstractManagedObjectDefinition<?,?> d, PropertyDefinition<?> pd) throws MissingResourceException
d
- The managed object definition.pd
- The property definition.MissingResourceException
- If the LDAP profile properties file associated with the
provided managed object definition could not be loaded.public String getRelationChildRDNType(InstantiableRelationDefinition<?,?> r) throws MissingResourceException
r
- The instantiable relation.MissingResourceException
- If the LDAP profile properties file associated with the
provided managed object definition could not be loaded.public List<String> getRelationObjectClasses(RelationDefinition<?,?> r)
r
- The instantiable or set relation.public String getRelationChildRDNType(SetRelationDefinition<?,?> r) throws MissingResourceException
r
- The set relation.MissingResourceException
- If the LDAP profile properties file associated with the
provided managed object definition could not be loaded.public String getObjectClass(AbstractManagedObjectDefinition<?,?> d) throws MissingResourceException
d
- The managed object definition.MissingResourceException
- If the LDAP profile properties file associated with the
provided managed object definition could not be loaded.public List<String> getObjectClasses(AbstractManagedObjectDefinition<?,?> d) throws MissingResourceException
The returned list is ordered such that the uppermost object classes appear first (e.g. top).
d
- The managed object definition.MissingResourceException
- If the LDAP profile properties file associated with the
provided managed object definition could not be loaded.public String getRelationRDNSequence(RelationDefinition<?,?> r) throws MissingResourceException
r
- The relation.MissingResourceException
- If the LDAP profile properties file associated with the
provided managed object definition could not be loaded.public void popWrapper() throws NoSuchElementException
pushWrapper(org.opends.server.admin.LDAPProfile.Wrapper)
.NoSuchElementException
- If there are no LDAP profile wrappers.public void pushWrapper(LDAPProfile.Wrapper wrapper)
wrapper
- The LDAP profile wrapper.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.