TelecomNumber Entity parsing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

TelecomNumber Entity parsing

Ron Wheeler
What are people using to validate and parse Telephone numbers into the
component parts that OFBiz expects?

com.google.i18n.phonenumbers.PhoneNumberUtil (
https://github.com/googlei18n/libphonenumber ) seems to be able parse
and format telephone numbers but then it appears that it needs to be
parsed another time to get the 3 pieces that OFBiz wants.





     <entity entity-name="TelecomNumber"
             package-name="org.ofbiz.party.contact"
             title="Telecommunications Number Entity">
       <field name="contactMechId" type="id-ne"></field>
       <field name="countryCode" type="very-short"></field>
       <field name="areaCode" type="very-short"></field>
       <field name="contactNumber" type="short-varchar"></field>
       <field name="askForName" type="name"></field> <!-- person or
department to ask for at this number -->
       <prim-key field="contactMechId"/>
       <relation type="one" fk-name="TEL_NUM_CMECH"
rel-entity-name="ContactMech">
         <key-map field-name="contactMechId"/>
       </relation>
       <index name="COUNTRY_CODE_IDX">
         <index-field name="countryCode"/>
       </index>
       <index name="AREA_CODE_IDX">
         <index-field name="areaCode"/>
       </index>
       <index name="CONTACT_NUMBER_IDX">
         <index-field name="contactNumber"/>
       </index>
     </entity>

--
Ron Wheeler
President
Artifact Software Inc
email: [hidden email]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102