Dynamic model: adding new entities and properties at deployment time using the wimxmlextension.xml file

Virtual member manager is configured to use 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. In this examples you are going to create a new entity type, ContactPerson, and add a new property type, cellPhone, to this entity type. You are going to define the schemas of the new entity types and property types in the wimxmlextension.xml file.

Procedure

  1. Stop the virtual member manager service.
  2. Open the wimxmlextension.xml file under the VMM_HOME\model directory. If this file does not exist, create a new one with the same 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.
  3. Edit the wimxmlextension.xml file and add the definitions of the new entity types and property types. Make sure the XML is well-formed and confirm to schema defined in wimschema.xsd.
    For example, the following sample defines a new entity type ContactPerson and a new property type called cellPhone and adds this property type to the new entity type ContactPerson:
    <?xml version="1.0" encoding="UTF-8"?>
    <sdo:datagraph xmlns:sdo="commonj.sdo"
        xmlns:wim="http://www.ibm.com/websphere/wim">
      <wim:schema>
        <wim:entitySchema nsPrefix="yourext" 
                          nsURI="http://www.yourco.com/wim/yourext"
            entityName="ContactPerson" parentEntityName="PersonAccount"/>
        <wim:propertySchema nsURI="http://www.yourco.com/yourext" 
                            dataType="STRING" 
                            multiValued="true"
                            propertyName="cellPhone">
          <wim:applicableEntityTypeNames>ContactPerson</wim:applicableEntityTypeNames>
          <wim:metaData name="repositoryPropertyName" 
                       value="cellularTelephoneNumber"/>
        </wim:propertySchema>
      </wim:schema>
    </sdo:datagraph>
    Note: For more information about using the propertySchema and extensionPropertySchema data objects, see the section, Extending property schema in the topic, Programming prerequisites.
  4. 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="yourext:ContactPerson"> 
        <config:rdnProperties>uid</config:rdnProperties>
    </config:supportedEntityTypes>
    
    <config:repositories xsi:type="config:LdapRepositoryType" ...> 
        <config:EntityTypesNotAllowDelete>yourext:ContactPerson</config:EntityTypesNotAllowDelete> 
        <config:ldapEntityTypes name="yourext:ContactPerson"> 
            <config:rdnAttributes name="uid"/>
            <config:objectClasses>eContactPerson</config:objectClasses>
            <config:objectClassesForCreate>eContactPerson</config:objectClassesForCreate>
            <config:objectClassesForCreate>inetOrgPerson</config:objectClassesForCreate>
        </config:ldapEntityTypes>
    </config:repositories>
  5. 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.
  6. Restart the virtual member manager service.

Icon that indicates the type of topic Task topic



Timestamp icon Last updated: March 6, 2017 0:20
File name: dynamicmodeladdingnewentitiesandpropertiesatdeploymenttimeusingthewimxmlextension.xmlfile.html