Package org.forgerock.opendj.rest2ldap
Class ObjectPropertyMapper
- java.lang.Object
-
- org.forgerock.opendj.rest2ldap.PropertyMapper
-
- org.forgerock.opendj.rest2ldap.ObjectPropertyMapper
-
public final class ObjectPropertyMapper extends PropertyMapper
An property mapper which maps JSON objects to LDAP attributes.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectPropertyMapperexcludedDefaultUserAttributes(String... attributeNames)Specifies zero or more user attributes which will be excluded from the default user attribute mappings when enabled usingincludeAllUserAttributesByDefault(boolean).ObjectPropertyMapperexcludedDefaultUserAttributes(Collection<String> attributeNames)Specifies zero or more user attributes which will be excluded from the default user attribute mappings when enabled usingincludeAllUserAttributesByDefault(boolean).ObjectPropertyMapperincludeAllUserAttributesByDefault(boolean include)Specifies whether all LDAP user attributes should be mapped by default using the default schema based mapping rules.ObjectPropertyMapperproperty(String name, PropertyMapper mapper)Creates an explicit mapping for a property contained in the JSON object.StringtoString()
-
-
-
Method Detail
-
property
public ObjectPropertyMapper property(String name, PropertyMapper mapper)
Creates an explicit mapping for a property contained in the JSON object. When user attributes areincludedby default, be careful toexcludeany attributes which have explicit mappings defined using this method, otherwise they will be duplicated in the JSON representation.- Parameters:
name- The name of the JSON property to be mapped.mapper- The property mapper responsible for mapping the JSON attribute to LDAP attribute(s).- Returns:
- A reference to this property mapper.
-
includeAllUserAttributesByDefault
public ObjectPropertyMapper includeAllUserAttributesByDefault(boolean include)
Specifies whether all LDAP user attributes should be mapped by default using the default schema based mapping rules. Individual attributes can be excluded usingexcludedDefaultUserAttributes(Collection)in order to prevent attributes with explicit mappings being mapped twice.- Parameters:
include-trueif all LDAP user attributes be mapped by default.- Returns:
- A reference to this property mapper.
-
excludedDefaultUserAttributes
public ObjectPropertyMapper excludedDefaultUserAttributes(String... attributeNames)
Specifies zero or more user attributes which will be excluded from the default user attribute mappings when enabled usingincludeAllUserAttributesByDefault(boolean). Attributes which have explicit mappings should be excluded in order to prevent duplication.- Parameters:
attributeNames- The list of attributes to be excluded.- Returns:
- A reference to this property mapper.
-
excludedDefaultUserAttributes
public ObjectPropertyMapper excludedDefaultUserAttributes(Collection<String> attributeNames)
Specifies zero or more user attributes which will be excluded from the default user attribute mappings when enabled usingincludeAllUserAttributesByDefault(boolean). Attributes which have explicit mappings should be excluded in order to prevent duplication.- Parameters:
attributeNames- The list of attributes to be excluded.- Returns:
- A reference to this property mapper.
-
-