Hierarchy Developer's Guide for Oracle Self-Service E-Billing > Extending Advanced Hierarchy Manager Use Cases > Creating New Types of Business Objects to Work with Hierarchy Manager >

Registering Objects with the OMF Module


To use the Object Management Framework (OMF) service, you must register your business objects with the OMF framework. Once you register your business object with OMFService, you can do something similar for your business object instance.

To register business objects with the OMF framework

  1. Edit the omf.xma.xml file, located in the following directory:
    • UNIX. xma/config/omf
    • Windows. xma/config/omf
  2. Add a new OMFObjectManagerConfig bean in the OMFService bean section of the omf.xma.xml file, specifying the following properties:
    • Name. The name of the manager, which can be any string you choose.
    • Type. A unique string that identifies the type of business object. This value must be the same as the one returned from IOMFObject.getOMFObjectType() and IOMFObjectManager.getType().
    • Implementation. The full class name of your object manager class, which is typically a singleton class.

      The OMFService bean in the omf.xma.xml file is shown as follows:

    <bean id="OMFService" class="com.edocs.common.omf.OMFService" singleton="true">
    <property name="registeredOMFanagers">
    <list>
    <bean class="com.edocs.common.omf.OMFObjectManagerConfig">
    <property name="name"><value>chargeTypeManager</value></property>
    <property name="type"><value>edx:omf:chargetype:</value></property>
    <property name="implementation">
    <bean class="com.edocs.common.omf.chargetype.ChargeTypeManager" singleton="true"/>
    </property>
    </bean>

    <bean class="com.edocs.common.omf.OMFObjectManagerConfig">
    <property name="name"><value>companyManager</value></property>
    <property name="type"><value>edx:omf:company:</value></property>
    <property name="implementation"><ref bean="companyManager"/></property>
    </bean>

    <bean class="com.edocs.common.omf.OMFObjectManagerConfig">
    <property name="name"><value>accountManager</value></property>
    <property name="type"><value>edx:amf:account:</value></property>
    <property name="implementation">
    <bean class="com.edocs.domain.telco.amf.defaultimpl.BillingAccountManager" singleton="true"/>
    </property>
    </bean>

    <bean class="com.edocs.common.omf.OMFObjectManagerConfig">
    <property name="name"><value>serviceAgreementManager</value></property>
    <property name="type"><value>edx:omf:serviceagreement:</value></property>
    <property name="implementation">
    <bean class="com.edocs.common.omf.serviceagreement.ServiceAgreementManager" singleton="true"/>
    </property>
    </bean>

    <bean class="com.edocs.common.omf.OMFObjectManagerConfig">
    <property name="name"><value>serviceChargeManager</value></property>
    <property name="type"><value>edx:omf:servicecharge:</value></property>
    <property name="implementation">
    <bean class="com.edocs.common.omf.servicecharge.ServiceChargeManager" singleton="true"/>
    </property>
    </bean>
    </list>
    </property>
    <property name="defaultBillerId"><value>1</value></property>
    </bean>

Code Example: Finding Your Business Object Manager Class

The following code shows an example of finding your business object manager class:

IServiceAgreementManager saMgr =
IOMFService.findOMFObjectManagerByType("edx:omf:serviceAgreement:");

Or

IServiceAgreementManager saMgr =
IOMFService.findOMFObjectManagerByName(serviceAgreementManager);

Code Example: Finding the Corresponding Business Object Instance for an Object URI

The following code shows an example of finding the corresponding business object instance for an object URI:

IServiceCharge sc = IOMFService.findOMFObjectByURI(scURIString);

Hierarchy Developer's Guide for Oracle Self-Service E-Billing Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.