Package org.forgerock.opendj.rest2ldap
Class AbstractResourceReferencePropertyMapper<T extends AbstractResourceReferencePropertyMapper<T>>
- java.lang.Object
-
- org.forgerock.opendj.rest2ldap.PropertyMapper
-
- org.forgerock.opendj.rest2ldap.AbstractResourceReferencePropertyMapper<T>
-
- Type Parameters:
T
- the class of this property mapper
- Direct Known Subclasses:
InlineResourcePropertyMapper
public abstract class AbstractResourceReferencePropertyMapper<T extends AbstractResourceReferencePropertyMapper<T>> extends PropertyMapper
Abstract class for property mappers mapping a DN (or DN and JSON) LDAP attribute to a JSON object.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.static void
putWritabilityProperties(WritabilityPolicy writabilityPolicy, JsonValue jsonSchema)
abstract T
searchFilter(String filter)
Sets the filter which should be used when searching for referenced LDAP entries.abstract T
searchFilter(Filter filter)
Sets the filter which should be used when searching for referenced LDAP entries.T
writability(WritabilityPolicy policy)
Indicates whether the LDAP attribute supports updates.
-
-
-
Method Detail
-
searchFilter
public abstract T searchFilter(Filter filter)
Sets the filter which should be used when searching for referenced LDAP entries. The default is(objectClass=*)
.- Parameters:
filter
- The filter which should be used when searching for referenced LDAP entries.- Returns:
- This property mapper.
-
searchFilter
public abstract T searchFilter(String filter)
Sets the filter which should be used when searching for referenced LDAP entries. The default is(objectClass=*)
.- 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)
-
-