Virtual member manager is configured to use the dynamic
model. You can create new entity types and their associated new property
types at deployment time.
About this task
You need to add new entity types and their associated new
property types. The schemas of the new entity types and property types
can only be a custom extension XSD file (for example, wimextension.xsd).
In the following example you want to create a new entity type ContactPerson
and add a new property type cellPhone to this entity type.
Procedure
- Stop the virtual member manager service.
- Open the wimextension.xsd file under the VMM_HOME\model
directory. If this file does not exist, create a new one
with the same or a different name.
Note: VMM_HOME is the directory
where the virtual member manager files are located. This location
is set to either the system property wim.home or user.install.root/config/cells/local.cell/wim.
- Open the virtual member manager configuration file (wimconfig.xml)
and ensure that the property, xsdFileName, is same as the file name
you used in step 2.
<config:dynamicModel xsdFileName="wimextension.xsd"/>
- Edit the wimextension.xsd and add the definitions of the
new entity types and property types. Ensure that the XSD
file is well-formed. Use a different namespace URI than the virtual
member manager namespace URI: (http://www.ibm.com/websphere/wim).
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.ibm.com/websphere/wim/ext"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:wimext="http://www.ibm.com/websphere/wim/ext"
ecore:package="com.ibm.websphere.wim.model.ext"
xmlns:wim="http://www.ibm.com/websphere/wim">
<xsd:import schemaLocation="wimdatagraph.xsd"
namespace="http://www.ibm.com/websphere/wim"/>
<!-- Custom properties -->
<xsd:element name="cellPhone" type="xsd:string"/>
<!-- Custom entities -->
<xsd:complexType name="ContactPerson">
<xsd:complexContent>
<xsd:extension base="wim:PersonAccount">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" ref="wimext:cellPhone"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
- Manually add the new entity types to the virtual member
manager configuration file (wimconfig.xml).
<config:supportedEntityTypes defaultParent="cn=users,dc=yourco,dc=com"
name="wimext:ContactPerson">
<config:rdnProperties>uid</config:rdnProperties>
</config:supportedEntityTypes>
<config:repositories xsi:type="config:LdapRepositoryType" ...>
<config:EntityTypesNotAllowDelete>wimext:ContactPerson</config:EntityTypesNotAllowDelete>
<config:ldapEntityTypes name="wimext:ContactPerson">
<config:rdnAttributes name="uid"/>
<config:objectClasses>eContactPerson</config:objectClasses>
<config:objectClassesForCreate>eContactPerson</config:objectClassesForCreate>
<config:objectClassesForCreate>inetOrgPerson</config:objectClassesForCreate>
</config:ldapEntityTypes>
</config:repositories>
- Manually add the new property types to each repository
adapter.
- LDAP adapter
- Add the mapping of
the new property types to LDAP attributes to the wimconfig.xml configuration
file.
- DB adapter
- Add the definition of the new property types to the property XML
file of DB Adapter (wimDBProperties.xml) and run DB property loader.
- Restart the virtual member manager service.