Add support for specifying the naming attribute in relations.
| | |
| | | <xsd:documentation>A numeric OID.</xsd:documentation> |
| | | </xsd:annotation> |
| | | <xsd:restriction base="xsd:token"> |
| | | <xsd:pattern value="([0-9]+(\.[0-9]+)*)|([a-zA-Z][a-zA-Z0-9\-_]*-oid)" /> |
| | | <xsd:pattern |
| | | value="([0-9]+(\.[0-9]+)*)|([a-zA-Z][a-zA-Z0-9\-_]*-oid)" /> |
| | | </xsd:restriction> |
| | | </xsd:simpleType> |
| | | <xsd:simpleType name="name-type"> |
| | |
| | | </xsd:sequence> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="naming-attribute" type="tns:name-type"> |
| | | <xsd:annotation> |
| | | <xsd:documentation> |
| | | Defines which LDAP attribute should be used to name child |
| | | managed objects referenced by a relation. When not specified, |
| | | "cn" is used by default. |
| | | </xsd:documentation> |
| | | </xsd:annotation> |
| | | </xsd:element> |
| | | <xsd:element name="rdn-sequence" type="xsd:token"> |
| | | <xsd:annotation> |
| | | <xsd:documentation>A sequence of RDNs.</xsd:documentation> |
| | |
| | | '=', |
| | | normalize-space(adm:profile[@name='ldap']/ldap:rdn-sequence), |
| | | '
')" /> |
| | | <xsl:choose> |
| | | <xsl:when |
| | | test="adm:profile[@name='ldap']/ldap:naming-attribute"> |
| | | <xsl:value-of |
| | | select="concat('naming-attribute.', |
| | | normalize-space(@name), |
| | | '=', |
| | | normalize-space(adm:profile[@name='ldap']/ldap:naming-attribute), |
| | | '
')" /> |
| | | </xsl:when> |
| | | <xsl:otherwise> |
| | | <xsl:value-of |
| | | select="concat('naming-attribute.', normalize-space(@name), '=cn
')" /> |
| | | </xsl:otherwise> |
| | | </xsl:choose> |
| | | </xsl:for-each> |
| | | </xsl:template> |
| | | </xsl:stylesheet> |
| | |
| | | */ |
| | | public String getInstantiableRelationChildRDNType( |
| | | InstantiableRelationDefinition<?, ?> r) { |
| | | // For now, assume always "cn". |
| | | return "cn"; |
| | | return resource.getString(r.getParentDefinition(), |
| | | "naming-attribute." + r.getName()); |
| | | } |
| | | |
| | | |