Hierarchy Developer's Guide for Oracle Billing Insight > 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
- Edit the omf.xma.xml file, located in the following directory:
- UNIX.
xma/config/omf
- Windows.
xma/config/omf
- Add a new OMFObjectManagerConfig bean in the OMFService bean section of the omf.xma.xml file, specifying the following properties:
<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);
|