Package org.forgerock.opendj.rest2ldap
Class InlineResourcePropertyMapper
- java.lang.Object
-
- org.forgerock.opendj.rest2ldap.PropertyMapper
-
- org.forgerock.opendj.rest2ldap.AbstractResourceReferencePropertyMapper<T>
-
- org.forgerock.opendj.rest2ldap.InlineResourcePropertyMapper
-
public final class InlineResourcePropertyMapper extends AbstractResourceReferencePropertyMapper<T>
A property mapper which provides a mapping from a DN (or DN and JSON) LDAP attribute to a JSON object.This property mapper is configured with elements otherwise found on a resource or a sub-resource definition. These resource/sub-resource definitions are provided "inline" with the definition of this property mapper.
This legacy property mapper is kept for compatibility. Prefer using
ResourceReferencePropertyMapper
instead.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
extensibleJsonOrderingMatchingRule(String extensibleJsonOrderingMatchingRule)
Sets the extensible JSON ordering matching rule name that should be used for comparing JSON properties in Name and JSON LDAP attributes.T
isMultiValued(boolean isMultiValued)
Indicates that the LDAP attribute is multi-valued and should be represented in JSON using an array of values.T
isRequired(boolean isRequired)
Indicates that the LDAP attribute is mandatory and must be provided during create requests.T
jsonFirstComponentMatchingRule(String jsonFirstComponentMatchingRule)
Sets the JSON matching rule name that should be used for matching JSON properties in Name and JSON LDAP attributes.static void
putWritabilityProperties(WritabilityPolicy writabilityPolicy, JsonValue jsonSchema)
T
searchFilter(String filter)
Sets the filter which should be used when searching for referenced LDAP entries.T
searchFilter(Filter filter)
Sets the filter which should be used when searching for referenced LDAP entries.String
toString()
T
writability(WritabilityPolicy policy)
Indicates whether the LDAP attribute supports updates.
-
-
-
Method Detail
-
jsonFirstComponentMatchingRule
public T jsonFirstComponentMatchingRule(String jsonFirstComponentMatchingRule)
Sets the JSON matching rule name that should be used for matching JSON properties in Name and JSON LDAP attributes.By default JSON reference properties will be matched using the
JsonSchema.getJsonFirstComponentCaseIgnoreJsonQueryMatchingRule()
.- Parameters:
jsonFirstComponentMatchingRule
- The name or OID of the JSON query matching rule.- Returns:
- This property mapper.
- See Also:
JsonSchema.getJsonFirstComponentCaseExactJsonQueryMatchingRule()
-
extensibleJsonOrderingMatchingRule
public T extensibleJsonOrderingMatchingRule(String extensibleJsonOrderingMatchingRule)
Sets the extensible JSON ordering matching rule name that should be used for comparing JSON properties in Name and JSON LDAP attributes.By default JSON attributes will be matched using the
JsonSchema.getCaseIgnoreExtensibleJsonOrderingMatchingRule()
.- Parameters:
extensibleJsonOrderingMatchingRule
- The name or OID of the extensible JSON ordering matching rule.- Returns:
- This property mapper.
- See Also:
JsonSchema.newJsonOrderingMatchingRuleImpl(List, org.forgerock.util.Options)
-
searchFilter
public final T searchFilter(Filter filter)
Description copied from class:AbstractResourceReferencePropertyMapper
Sets the filter which should be used when searching for referenced LDAP entries. The default is(objectClass=*)
.- Specified by:
searchFilter
in classAbstractResourceReferencePropertyMapper<T extends org.forgerock.opendj.rest2ldap.AbstractReferencePropertyMapper<T>>
- Parameters:
filter
- The filter which should be used when searching for referenced LDAP entries.- Returns:
- This property mapper.
-
searchFilter
public final T searchFilter(String filter)
Description copied from class:AbstractResourceReferencePropertyMapper
Sets the filter which should be used when searching for referenced LDAP entries. The default is(objectClass=*)
.- Specified by:
searchFilter
in classAbstractResourceReferencePropertyMapper<T extends org.forgerock.opendj.rest2ldap.AbstractReferencePropertyMapper<T>>
- Parameters:
filter
- The filter which should be used when searching for referenced LDAP entries.- Returns:
- This property mapper.
-
isRequired
public final T isRequired(boolean isRequired)
Indicates that the LDAP attribute is mandatory and must be provided during create requests.- Parameters:
isRequired
-true
if this property is required.- Returns:
- This property mapper.
-
isMultiValued
public final T isMultiValued(boolean isMultiValued)
Indicates that the LDAP attribute is multi-valued and should be represented in JSON using an array of values.- Parameters:
isMultiValued
-true
if this property is multi-valued.- Returns:
- This property mapper.
-
writability
public final T writability(WritabilityPolicy policy)
Indicates whether the LDAP attribute supports updates. The default isWritabilityPolicy.READ_WRITE
.- Parameters:
policy
- The writability policy.- Returns:
- This property mapper.
-
putWritabilityProperties
public static void putWritabilityProperties(WritabilityPolicy writabilityPolicy, JsonValue jsonSchema)
-
-