Class SubResourceCollection
- java.lang.Object
-
- org.forgerock.opendj.rest2ldap.SubResource
-
- org.forgerock.opendj.rest2ldap.SubResourceCollection
-
public final class SubResourceCollection extends SubResource
Defines a one-to-many relationship between a parent resource and its children. Removal of the parent resource implies that the children (the sub-resources) are also removed. Collections support all request types.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubResourceCollection
dnTemplate(String dnTemplate)
Sets the relative DN template beneath which the sub-resource LDAP entries will be located.SubResourceCollection
glueObjectClass(String objectClass)
Specifies an LDAP object class which is to be associated with any intermediate "glue" entries forming the DN template.SubResourceCollection
glueObjectClasses(String... objectClasses)
Specifies one or more LDAP object classes which is to be associated with any intermediate "glue" entries forming the DN template.SubResourceCollection
isReadOnly(boolean readOnly)
Indicates whether this sub-resource collection only supports read and query operations.SubResourceCollection
urlTemplate(String urlTemplate)
Sets the relative URL template beneath which the sub-resources will be located.SubResourceCollection
useClientDnNaming(String dnAttribute)
Indicates that the JSON resource ID must be provided by the user, and will be used for naming the associated LDAP entry.SubResourceCollection
useClientNaming(String dnAttribute, String idAttribute)
Indicates that the JSON resource ID must be provided by the user, but will not be used for naming the associated LDAP entry.SubResourceCollection
useServerEntryUuidNaming(String dnAttribute)
Indicates that the JSON resource ID will be derived from the server provided "entryUUID" LDAP attribute.SubResourceCollection
useServerNaming(String dnAttribute, String idAttribute)
Indicates that the JSON resource ID must not be provided by the user, and will not be used for naming the associated LDAP entry.-
Methods inherited from class org.forgerock.opendj.rest2ldap.SubResource
equals, hashCode, toString
-
-
-
-
Method Detail
-
useClientDnNaming
public SubResourceCollection useClientDnNaming(String dnAttribute)
Indicates that the JSON resource ID must be provided by the user, and will be used for naming the associated LDAP entry. More specifically, LDAP entry names will be derived by appending a single RDN to the collection's base DN composed of the specified attribute type and LDAP value taken from the LDAP entry once attribute mapping has been performed.Note that this naming policy requires that the user provides the resource name when creating new resources, which means it must be included in the resource content when not specified explicitly in the create request.
- Parameters:
dnAttribute
- The LDAP attribute which will be used for naming.- Returns:
- A reference to this object.
-
useClientNaming
public SubResourceCollection useClientNaming(String dnAttribute, String idAttribute)
Indicates that the JSON resource ID must be provided by the user, but will not be used for naming the associated LDAP entry. Instead the JSON resource ID will be taken from theidAttribute
in the LDAP entry, and the LDAP entry name will be derived by appending a single RDN to the collection's base DN composed of thednAttribute
taken from the LDAP entry once attribute mapping has been performed.Note that this naming policy requires that the user provides the resource name when creating new resources, which means it must be included in the resource content when not specified explicitly in the create request.
- Parameters:
dnAttribute
- The attribute which will be used for naming LDAP entries.idAttribute
- The attribute which will be used for JSON resource IDs.- Returns:
- A reference to this object.
-
useServerEntryUuidNaming
public SubResourceCollection useServerEntryUuidNaming(String dnAttribute)
Indicates that the JSON resource ID will be derived from the server provided "entryUUID" LDAP attribute. The LDAP entry name will be derived by appending a single RDN to the collection's base DN composed of thednAttribute
taken from the LDAP entry once attribute mapping has been performed.Note that this naming policy requires that the server provides the resource name when creating new resources, which means it must not be specified in the create request, nor included in the resource content.
- Parameters:
dnAttribute
- The attribute which will be used for naming LDAP entries.- Returns:
- A reference to this object.
-
useServerNaming
public SubResourceCollection useServerNaming(String dnAttribute, String idAttribute)
Indicates that the JSON resource ID must not be provided by the user, and will not be used for naming the associated LDAP entry. Instead the JSON resource ID will be taken from theidAttribute
in the LDAP entry, and the LDAP entry name will be derived by appending a single RDN to the collection's base DN composed of thednAttribute
taken from the LDAP entry once attribute mapping has been performed.Note that this naming policy requires that the server provides the resource name when creating new resources, which means it must not be specified in the create request, nor included in the resource content.
- Parameters:
dnAttribute
- The attribute which will be used for naming LDAP entries.idAttribute
- The attribute which will be used for JSON resource IDs.- Returns:
- A reference to this object.
-
urlTemplate
public SubResourceCollection urlTemplate(String urlTemplate)
Sets the relative URL template beneath which the sub-resources will be located. The template may be empty indicating that the sub-resources will be located directly beneath the parent resource. Any URL template variables will be substituted into theDN template
.- Parameters:
urlTemplate
- The relative URL template.- Returns:
- A reference to this object.
-
dnTemplate
public SubResourceCollection dnTemplate(String dnTemplate)
Sets the relative DN template beneath which the sub-resource LDAP entries will be located. The template may be empty indicating that the LDAP entries will be located directly beneath the parent LDAP entry. Any DN template variables will be substituted using values extracted from theURL template
.- Parameters:
dnTemplate
- The relative DN template.- Returns:
- A reference to this object.
-
glueObjectClass
public SubResourceCollection glueObjectClass(String objectClass)
Specifies an LDAP object class which is to be associated with any intermediate "glue" entries forming the DN template. Multiple object classes may be specified.- Parameters:
objectClass
- An LDAP object class which is to be associated with any intermediate "glue" entries forming the DN template.- Returns:
- A reference to this object.
-
glueObjectClasses
public SubResourceCollection glueObjectClasses(String... objectClasses)
Specifies one or more LDAP object classes which is to be associated with any intermediate "glue" entries forming the DN template. Multiple object classes may be specified.- Parameters:
objectClasses
- The LDAP object classes which is to be associated with any intermediate "glue" entries forming the DN template.- Returns:
- A reference to this object.
-
isReadOnly
public SubResourceCollection isReadOnly(boolean readOnly)
Indicates whether this sub-resource collection only supports read and query operations.- Parameters:
readOnly
-true
if this sub-resource collection is read-only.- Returns:
- A reference to this object.
-
-