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(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)
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)
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)
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)
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)
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)
r
- The relation.MissingResourceException
- If the LDAP profile properties file associated with the
provided managed object definition could not be loaded.public void popWrapper()
pushWrapper(LdapProfile.Wrapper)
.NoSuchElementException
- If there are no LDAP profile wrappers.public void pushWrapper(LdapProfile.Wrapper wrapper)
wrapper
- The LDAP profile wrapper.Copyright 2010-2018 ForgeRock AS.