Express (Distributed operating systems), v8.0 > Secure applications and their environment > Authenticate users > Select a registry or repository > Manage realms in a federated repository > Virtual member manager > Develop with virtual member manager > Integrate virtual member manager into the application > Program tasks
Create an entity type and adding a new property type to it
Use the data graph to create an entity type ContactPerson and add a new property cellPhone to it.
Input data graph
This task must be done in two createSchema calls. First data graph creates an entity type called ContactPerson that extends from the PersonAccount data object.<?xml version="1.0" encoding="UTF-8"?> <sdo:datagraph xmlns:sdo="commonj.sdo" xmlns:wim="//www.ibm.com/websphere/wim"> <wim:Root> <wim:schema> <wim:entitySchema nsURI="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ ://www.yourco.com/wim/yourext" entityName="ContactPerson" parentEntityName="PersonAccount"> <wim:entityConfiguration defaultParent="cn=users,dc=yourco,dc=com" rdnProperty="uid"> <wim:metaData name="objectClasses"> <wim:values>eContactPerson </wim:values> </wim:metaData> <wim:metaData name="objectClassesForCreate"> <wim:values>eContactPerson </wim:values> <wim:values>inetOrgPerson </wim:values> </wim:metaData> <wim:metaData name="rdnAttributes"> <wim:values>uid </wim:values> <wim:values>sn </wim:values> </wim:metaData> </wim:entityConfiguration> </wim:entitySchema> </wim:schema> </wim:Root> </sdo:datagraph>
Output data graph
<?xml version="1.0" encoding="UTF-8"?> <sdo:datagraph xmlns:sdo="commonj.sdo" xmlns:wim="//www.ibm.com/websphere/wim"> <wim:Root> <wim:schema> <wim:entitySchema nsURI="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ ://www.yourco.com/wim/yourext" entityName="ContactPerson" parentEntityName="PersonAccount"> <wim:repositoryIds>LDAP1 </wim:repositoryIds> <wim:entityConfiguration defaultParent="cn=users,dc=yourco,dc=com" rdnProperty="uid"> <wim:metaData name="objectClasses"> <wim:values>eContactPerson </wim:values> </wim:metaData> <wim:metaData name="objectClassesForCreate"> <wim:values>eContactPerson </wim:values> <wim:values>inetOrgPerson </wim:values> </wim:metaData> <wim:metaData name="rdnAttributes"> <wim:values>uid </wim:values> <wim:values>sn </wim:values> </wim:metaData> </wim:entityConfiguration> </wim:entitySchema> </wim:schema> </wim:Root> </sdo:datagraph>
Input data graph
Second data graph creates a property type called cellPhone and adds it to the new entity type ContactPerson.The property cellPhone is mapped to LDAP attribute celluarTelephoneNumber.
<?xml version="1.0" encoding="UTF-8"?> <sdo:datagraph xmlns:sdo="commonj.sdo" xmlns:wim="//www.ibm.com/websphere/wim"> <wim:Root> <wim:schema> <wim:propertySchema nsURI="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ ://www.yourco.com/wim/yourext" dataType="String" propertyName="cellPhone"> <wim:applicableEntityTypeNames>yourext:ContactPerson </wim:applicableEntityTypeNames> <wim:metaData name="repositoryPropertyName"> <wim:values>cellularTelephoneNumber </wim:values> </wim:metaData> </wim:propertySchema> </wim:schema> </wim:Root> </sdo:datagraph>
Output data graph
<?xml version="1.0" encoding="UTF-8"?> <sdo:datagraph xmlns:sdo="commonj.sdo" xmlns:wim="//www.ibm.com/websphere/wim"> <wim:Root> <wim:schema> <wim:propertySchema nsURI="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ ://www.yourco.com/wim/yourext" dataType="String" propertyName="cellPhone"> <wim:repositoryIds>LDAP1 </wim:repositoryIds> <wim:applicableEntityTypeNames>yourext:ContactPerson </wim:applicableEntityTypeNames> <wim:metaData name="repositoryPropertyName"> <wim:values>cellularTelephoneNumber </wim:values> </wim:metaData> </wim:propertySchema> </wim:schema> </wim:Root> </sdo:datagraph>
wimxmlextension.xml file
After schema is created, the wimxmlextension.xml looks like the following snippet:<?xml version="1.0" encoding="UTF-8"?> <sdo:datagraph xmlns:sdo="commonj.sdo" xmlns:wim="//www.ibm.com/websphere/wim"> <wim:schema> <wim:entitySchema nsURI="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ ://www.yourco.com/wim/yourext" entityName="ContactPerson" parentEntityName="PersonAccount"/> <wim:propertySchema nsURI="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ ://www.yourco.com/wim/yourext" dataType="String" propertyName="cellPhone"> <wim:applicableEntityTypeNames>yourext:ContactPerson </wim:applicableEntityTypeNames> </wim:propertySchema> </wim:schema> </sdo:datagraph>
wimconfig.xml file
After schema is created, the following section is added to wimconfig.xml:<config:supportedEntityTypes defaultParent="cn=users,dc=yourco,dc=com" name="yourext:ContactPerson"> <config:rdnProperties>uid </config:rdnProperties> </config:supportedEntityTypes> <config:ldapEntityTypes name="yourext:ContactPerson"> <config:objectClasses>eContactPerson </config:objectClasses> <config:objectClassesForCreate>eContactPerson </config:objectClassesForCreate> <config:objectClassesForCreate>inetOrgPerson </config:objectClassesForCreate> </config:ldapEntityTypes> <config:attributes name="cellularTelephoneNumber" propertyName="yourext:cellPhone"/>
Parent topic: Program tasks