}
private void addBusinessEntityDiscoveryURL(BusinessEntity business)
{
// get the discovery URLs from the business entity
DiscoveryURLs discoveryURLs = business.getDiscoveryURLs();
boolean businessEntityURLExists = false;
String businessEntityUseType = BusinessEntityHandler.TAG_NAME;
if(discoveryURLs != null)
{
Vector discoveryURLVector = discoveryURLs.getDiscoveryURLVector();
if(discoveryURLVector != null)
{
String useType = null;
for (int j=0; j<discoveryURLVector.size(); j++)
{
DiscoveryURL discoveryURL = (DiscoveryURL)discoveryURLVector.get(j);
if(discoveryURL != null)
{
useType = discoveryURL.getUseType();
// check if the business has DiscoveryURL with useType as 'businessEntity'
if(useType.equals(businessEntityUseType))
{
businessEntityURLExists = true;
j = discoveryURLVector.size();
}
}
}
}
}
else
{
// create create a discoveryURLs and add it to business entity
business.setDiscoveryURLs(new DiscoveryURLs());
}
// add the businessEntity if businessEntity URL doesn't exist
if(!businessEntityURLExists)
{